Adadelta optimiser — Adagrad without a fixed learning rate.
Replaces Adagrad's monotonically growing accumulator with an EMA of
squared gradients and additionally maintains an EMA of
squared parameter updates . The ratio of the
two acts as a self-tuning step size, so lr only serves as a
global scale and is conventionally left at 1.0.
Math
References
Zeiler, "ADADELTA: An Adaptive Learning Rate Method" (arXiv:1212.5701, 2012).
See Also
Adagrad, RMSprop
Parameters
paramsvector of TensorImpllrfloat, default 1.0rhofloat, default 0.9epsfloat, default 1e-6weight_ decayfloat, default 0.0Attributes
sq_ avg_vector of Storageaccumulated_ update_vector of StorageNotes
Adadelta's unit-matching argument: the ratio has the same units as (rather than ), which is the original motivation for the method.
Constructors
1Construct the optimiser and resize per-slot state vectors.
Parameters
paramsvector of TensorImpllrfloat, default 1.0rhofloat, default 0.9epsfloat, default 1e-6weight_ decayfloat, default 0.0Static methods
1check_hyperparams
void check_hyperparams(double lr, double rho, double eps, double weight_decay)Check Adadelta's hyper-parameters — the reference framework's constructor checks, run by the constructor and set_hyperparams.
Raises
InvalidArgumentlr, eps or weight_decay is negative or NaN, or rho lies outside [0, 1].Virtual methods
2Methods
5Allocate the two per-slot EMA buffers for parameter i.
Parameters
iintNotes
Both sq_avg_[i] and accumulated_update_[i] are
zero-initialised.
set_hyperparams
void set_hyperparams(double lr, double rho, double eps, double weight_decay)Replace the hyper-parameters between steps; nothing is applied when check_hyperparams rejects them.
Return the versioned state-dict identifier.
Returns
str"adadelta_v1".
Apply one Adadelta update to parameter i.
Parameters
iintgStoragep on this step.Notes
Both running averages are advanced and the unit-matched step is applied in a single fused pass.