Usage
optimizer_adam(
learning_rate = 0.001,
beta_1 = 0.9,
beta_2 = 0.999,
eps = 1e-08,
weight_decay = 0,
amsgrad = FALSE
)
optimizer_adamw(
learning_rate = 0.001,
beta_1 = 0.9,
beta_2 = 0.999,
eps = 1e-08,
weight_decay = 0.01
)
optimizer_sgd(
learning_rate = 0.001,
momentum = 0,
nesterov = FALSE,
weight_decay = 0
)
optimizer_rmsprop(
learning_rate = 0.001,
alpha = 0.99,
momentum = 0,
eps = 1e-08,
weight_decay = 0
)
optimizer_adagrad(
learning_rate = 0.001,
lr_decay = 0,
eps = 1e-10,
weight_decay = 0
)
optimizer_adadelta(
learning_rate = 0.001,
rho = 0.9,
eps = 1e-06,
weight_decay = 0
)
optimizer_adamax(
learning_rate = 0.001,
beta_1 = 0.9,
beta_2 = 0.999,
eps = 1e-08,
weight_decay = 0
)
optimizer_nadam(
learning_rate = 0.001,
beta_1 = 0.9,
beta_2 = 0.999,
eps = 1e-08,
weight_decay = 0
)
Details
No run in this project has compared them on segmentation, so this page says what each one does differently rather than which is better. available_optimizers() lists them with the arguments each accepts.
The rest are here because a configuration should be able to name what torch offers. optimizer_adamw() is Adam with weight decay applied to the weights rather than through the gradient, which is why its decay defaults to 0.01 rather than 0 - choosing it and leaving the decay at zero leaves nothing to choose. optimizer_adagrad() accumulates every squared gradient it has seen, so its step only ever shrinks and a long run can stop learning; optimizer_adadelta() is the same idea with a window instead of a sum. optimizer_adamax() tracks the largest gradient rather than the average of their squares, which is steadier where a few batches carry very large ones. optimizer_rmsprop() is Adam’s denominator without its momentum, and optimizer_nadam() is Adam with the look-ahead that SGD calls nesterov.
Every argument left unset is decided by the engine, which is where the defaults live.