ribs.emitters.opt.AdamOpt¶
- class ribs.emitters.opt.AdamOpt(theta0, lr=0.001, beta1=0.9, beta2=0.999, epsilon=1e-08, l2_coeff=0.0)[source]¶
Adam optimizer.
Refer to Kingma and Ba 2014 for more information on hyperparameters.
- Parameters
theta0 (array-like) – Initial solution. 1D array.
lr (float) – Learning rate for the update.
beta1 (float) – Exponential decay rate for the moment estimates.
beta2 (float) – Another exponential decay rate for the moment estimates.
epsilon (float) – Hyperparameter for numerical stability.
l2_coeff (float) – Coefficient for L2 regularization. Note this is not the same as “weight decay” – see this blog post <https://www.fast.ai/posts/2018-07-02-adam-weight-decay.html>_ and Loshchilov and Hutler 2019 <https://arxiv.org/abs/1711.05101>_ for more info.
Methods
reset
(theta0)Resets the solution point to a new value.
step
(gradient)Ascends the solution based on the given gradient.
Attributes
The current solution point.
- reset(theta0)[source]¶
Resets the solution point to a new value.
- Parameters
theta0 (array-like) – The new solution point. 1D array.
- step(gradient)[source]¶
Ascends the solution based on the given gradient.
- Parameters
gradient (array-like) – The (estimated) gradient of the current solution point. 1D array.
- property theta¶
The current solution point.