Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

optimizer_sgd

Stochastic gradient descent optimizer


Description

Stochastic gradient descent optimizer with support for momentum, learning rate decay, and Nesterov momentum.

Usage

optimizer_sgd(
  lr = 0.01,
  momentum = 0,
  decay = 0,
  nesterov = FALSE,
  clipnorm = NULL,
  clipvalue = NULL
)

Arguments

lr

float >= 0. Learning rate.

momentum

float >= 0. Parameter that accelerates SGD in the relevant direction and dampens oscillations.

decay

float >= 0. Learning rate decay over each update.

nesterov

boolean. Whether to apply Nesterov momentum.

clipnorm

Gradients will be clipped when their L2 norm exceeds this value.

clipvalue

Gradients will be clipped when their absolute value exceeds this value.

Value

Optimizer for use with compile.keras.engine.training.Model.

See Also


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.