mlpack  git-master
AMSGradUpdate Class Reference

AMSGrad is an exponential moving average variant which along with having benefits of optimizers like Adam and RMSProp, also guarantees convergence. More...

Public Member Functions

 AMSGradUpdate (const double epsilon=1e-8, const double beta1=0.9, const double beta2=0.999)
 Construct the AMSGrad update policy with the given parameters. More...

 
double Beta1 () const
 Get the smoothing parameter. More...

 
double & Beta1 ()
 Modify the smoothing parameter. More...

 
double Beta2 () const
 Get the second moment coefficient. More...

 
double & Beta2 ()
 Modify the second moment coefficient. More...

 
double Epsilon () const
 Get the value used to initialise the squared gradient parameter. More...

 
double & Epsilon ()
 Modify the value used to initialise the squared gradient parameter. More...

 
void Initialize (const size_t rows, const size_t cols)
 The Initialize method is called by SGD Optimizer method before the start of the iteration update process. More...

 
void Update (arma::mat &iterate, const double stepSize, const arma::mat &gradient)
 Update step for AMSGrad. More...

 

Detailed Description

AMSGrad is an exponential moving average variant which along with having benefits of optimizers like Adam and RMSProp, also guarantees convergence.

Unlike Adam, it uses maximum of past squared gradients rather than their exponential average for updation.

For more information, see the following.

@article{
title = {On the convergence of Adam and beyond},
url = {https://openreview.net/pdf?id=ryQu7f-RZ}
year = {2018}
}

Definition at line 37 of file amsgrad_update.hpp.

Constructor & Destructor Documentation

◆ AMSGradUpdate()

AMSGradUpdate ( const double  epsilon = 1e-8,
const double  beta1 = 0.9,
const double  beta2 = 0.999 
)
inline

Construct the AMSGrad update policy with the given parameters.

Parameters
epsilonThe epsilon value used to initialise the squared gradient parameter.
beta1The smoothing parameter.
beta2The second moment coefficient.

Definition at line 48 of file amsgrad_update.hpp.

Member Function Documentation

◆ Beta1() [1/2]

double Beta1 ( ) const
inline

Get the smoothing parameter.

Definition at line 110 of file amsgrad_update.hpp.

◆ Beta1() [2/2]

double& Beta1 ( )
inline

Modify the smoothing parameter.

Definition at line 112 of file amsgrad_update.hpp.

◆ Beta2() [1/2]

double Beta2 ( ) const
inline

Get the second moment coefficient.

Definition at line 115 of file amsgrad_update.hpp.

◆ Beta2() [2/2]

double& Beta2 ( )
inline

Modify the second moment coefficient.

Definition at line 117 of file amsgrad_update.hpp.

◆ Epsilon() [1/2]

double Epsilon ( ) const
inline

Get the value used to initialise the squared gradient parameter.

Definition at line 105 of file amsgrad_update.hpp.

◆ Epsilon() [2/2]

double& Epsilon ( )
inline

Modify the value used to initialise the squared gradient parameter.

Definition at line 107 of file amsgrad_update.hpp.

◆ Initialize()

void Initialize ( const size_t  rows,
const size_t  cols 
)
inline

The Initialize method is called by SGD Optimizer method before the start of the iteration update process.

Parameters
rowsNumber of rows in the gradient matrix.
colsNumber of columns in the gradient matrix.

Definition at line 66 of file amsgrad_update.hpp.

◆ Update()

void Update ( arma::mat &  iterate,
const double  stepSize,
const arma::mat &  gradient 
)
inline

Update step for AMSGrad.

Parameters
iterateParameters that minimize the function.
stepSizeStep size to be used for the given iteration.
gradientThe gradient matrix.

Definition at line 80 of file amsgrad_update.hpp.


The documentation for this class was generated from the following file: