Adamax optimiser — Adam variant using the infinity norm.
Replaces Adam's second-moment estimate with an exponentially decayed running maximum, giving a bounded effective step size that is well-behaved when occasional gradient components are very large.
Math
The second-moment recursion is the limit of an Adam-style EMA as , hence "max".
References
Kingma & Ba, "Adam: A Method for Stochastic Optimization", §7.1 "Adamax" (ICLR 2015).
See Also
Adagrad, Adadelta, RMSprop
Parameters
paramsvector of TensorImpllrfloat, default 2e-3beta1float, default 0.9beta2float, default 0.999epsfloat, default 1e-8weight_decayfloat, default 0.0Attributes
m_vector of Storageu_vector of Storagestep_count_intNotes
Unlike Adam there is no bias correction on — the running max is naturally bounded, so dividing it by would over-amplify the very first updates.
Constructors
1Construct the optimiser and resize per-slot state vectors.
Parameters
paramsvector of TensorImpllrfloat, default 2e-3beta1float, default 0.9beta2float, default 0.999epsfloat, default 1e-8weight_decayfloat, default 0.0Virtual methods
2Methods
3Allocate the per-slot state buffers for parameter i.
Parameters
iintNotes
Both m_[i] (first moment) and u_[i] (infinity norm) are
zero-initialised.
Return the versioned state-dict identifier.
Returns
str"adamax_v1" — used by serialisation to validate state-dict layout.
Apply one Adamax update to parameter i.
Parameters
iintgStoragep on this step.Notes
Advances via the EMA, refreshes the envelope , then applies the bias-corrected step in one fused pass.