15 #ifndef MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_UPDATE_HPP 16 #define MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_UPDATE_HPP 21 namespace optimization {
55 const double alpha = 0.99) :
72 meanSquaredGradient = arma::zeros<arma::mat>(rows, cols);
83 const double stepSize,
84 const arma::mat& gradient)
86 meanSquaredGradient *= alpha;
87 meanSquaredGradient += (1 - alpha) * (gradient % gradient);
88 iterate -= stepSize * gradient / (arma::sqrt(meanSquaredGradient) +
93 double Epsilon()
const {
return epsilon; }
98 double Alpha()
const {
return alpha; }
110 arma::mat meanSquaredGradient;
double Alpha() const
Get the smoothing parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double & Alpha()
Modify the smoothing parameter.
double Epsilon() const
Get the value used to initialise the squared gradient parameter.
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 proc...
RMSProp is an optimizer that utilizes the magnitude of recent gradients to normalize the gradients...
RMSPropUpdate(const double epsilon=1e-8, const double alpha=0.99)
Construct the RMSProp update policy with the given parameters.
void Update(arma::mat &iterate, const double stepSize, const arma::mat &gradient)
Update step for RMSProp.
double & Epsilon()
Modify the value used to initialise the squared gradient parameter.