-
-
Save rvndbalaji/4fdc661a3fedd937e5341da4e39c8fc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Using Keras | |
model = keras_model_sequential() | |
model %>% | |
layer_dense(units = 3, input_shape = c(5), activation = 'relu') %>% | |
layer_dense(units = 2, activation = 'relu') %>% | |
layer_dense(units = 1, activation = 'sigmoid') | |
model %>% compile( | |
loss = 'binary_crossentropy', | |
optimizer = optimizer_adam(), | |
metrics = c('accuracy') | |
) | |
history = model %>% fit( | |
x_train,y_train, | |
epochs = 130, batch_size = 2000, | |
validation_split = 0.2 | |
) | |
#Output | |
#loss [1] 0.08656487 | |
#acc [1] 0.9869172 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment