Last chance! 50% off unlimited learning
Sale ends in
Utility function to construct optimiser from keras, primarily for internal use.
get_keras_optimizer(
optimizer = "adam",
lr = 0.02,
beta_1 = 0.9,
beta_2 = 0.999,
epsilon = NULL,
decay = 0,
clipnorm = NULL,
clipvalue = NULL,
schedule_decay = 0.004,
momentum = 0,
nesterov = FALSE
)
(character(1))
Optimizer to construct, see details for those available.
Default is "adam"
.
(numeric(1))
Passed to all optimizers except adadelta
and adagrad
.
(numeric(1))
Passed to adamax
, adam
, and nadam
.
(numeric(1))
Passed to adamax
, adam
, and sgd
.
(numeric(1))
Passed to adamax
, adam
, nadam
, and sgd
.
(numeric(1))
Passed to nadam
.
(numeric(1))
Passed to sgd
.
(logical(1))
Passed to sgd
.
Implemented optimizers are
"adadelta"
keras::optimizer_adadelta
"adagrad"
keras::optimizer_adagrad
"adamax"
keras::optimizer_adamax
"adam"
keras::optimizer_adam
"nadam"
keras::optimizer_nadam
"rmsprop"
keras::optimizer_rmsprop
"sgd"
keras::optimizer_sgd
# NOT RUN {
if (requireNamespaces("keras")) {
get_keras_optimizer()
get_keras_optimizer(optimizer = "adamax", decay = 0.1, lr = 0.01)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab