15 #ifndef MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_HPP 16 #define MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_HPP 24 namespace optimization {
89 RMSProp(
const double stepSize = 0.01,
90 const size_t batchSize = 32,
91 const double alpha = 0.99,
92 const double epsilon = 1e-8,
93 const size_t maxIterations = 100000,
94 const double tolerance = 1e-5,
95 const bool shuffle =
true);
107 template<
typename DecomposableFunctionType>
108 double Optimize(DecomposableFunctionType&
function, arma::mat& iterate)
110 return optimizer.Optimize(
function, iterate);
114 double StepSize()
const {
return optimizer.StepSize(); }
116 double&
StepSize() {
return optimizer.StepSize(); }
119 size_t BatchSize()
const {
return optimizer.BatchSize(); }
124 double Alpha()
const {
return optimizer.UpdatePolicy().Alpha(); }
126 double&
Alpha() {
return optimizer.UpdatePolicy().Alpha(); }
129 double Epsilon()
const {
return optimizer.UpdatePolicy().Epsilon(); }
131 double&
Epsilon() {
return optimizer.UpdatePolicy().Epsilon(); }
139 double Tolerance()
const {
return optimizer.Tolerance(); }
144 bool Shuffle()
const {
return optimizer.Shuffle(); }
146 bool&
Shuffle() {
return optimizer.Shuffle(); }
RMSProp(const double stepSize=0.01, const size_t batchSize=32, const double alpha=0.99, const double epsilon=1e-8, const size_t maxIterations=100000, const double tolerance=1e-5, const bool shuffle=true)
Construct the RMSProp optimizer with the given function and parameters.
double Tolerance() const
Get the tolerance for termination.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
double StepSize() const
Get the step size.
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 mean squared gradient parameter.
size_t BatchSize() const
Get the batch size.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
double & Tolerance()
Modify the tolerance for termination.
double Optimize(DecomposableFunctionType &function, arma::mat &iterate)
Optimize the given function using RMSProp.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
see subsection cli_alt_reg_tut Alternate DET regularization The usual regularized error f $R_ alpha(t)\f$ of a node \f $t\f$ is given by
Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...
double & Epsilon()
Modify the value used to initialise the mean squared gradient parameter.
RMSProp is an optimizer that utilizes the magnitude of recent gradients to normalize the gradients...
double Alpha() const
Get the smoothing parameter.
double & StepSize()
Modify the step size.
size_t & BatchSize()
Modify the batch size.