
Keras Model composed of a linear stack of layers
keras_model_sequential(layers = NULL, name = NULL)
List of layers to add to the model
Name of model
Other model functions: compile
,
evaluate.keras.engine.training.Model
,
evaluate_generator
,
fit_generator
, fit
,
get_config
, get_layer
,
keras_model
, multi_gpu_model
,
pop_layer
,
predict.keras.engine.training.Model
,
predict_generator
,
predict_on_batch
,
predict_proba
,
summary.keras.engine.training.Model
,
train_on_batch
# NOT RUN {
library(keras)
model <- keras_model_sequential()
model %>%
layer_dense(units = 32, input_shape = c(784)) %>%
layer_activation('relu') %>%
layer_dense(units = 10) %>%
layer_activation('softmax')
model %>% compile(
optimizer = 'rmsprop',
loss = 'categorical_crossentropy',
metrics = c('accuracy')
)
# }
Run the code above in your browser using DataLab