14 #ifndef MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_HPP
15 #define MLPACK_CORE_OPTIMIZERS_RMSPROP_RMSPROP_HPP
20 namespace optimization {
63 template<
typename DecomposableFunctionType>
86 RMSprop(DecomposableFunctionType&
function,
87 const double stepSize = 0.01,
88 const double alpha = 0.99,
89 const double eps = 1e-8,
90 const size_t maxIterations = 100000,
91 const double tolerance = 1e-5,
92 const bool shuffle =
true);
102 double Optimize(arma::mat& iterate);
105 const DecomposableFunctionType&
Function()
const {
return function; }
107 DecomposableFunctionType&
Function() {
return function; }
115 double Alpha()
const {
return alpha; }
141 DecomposableFunctionType&
function;
153 size_t maxIterations;
167 #include "rmsprop_impl.hpp"
DecomposableFunctionType & Function()
Modify the instantiated function.
The core includes that mlpack expects; standard C++ includes and Armadillo.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
double & Alpha()
Modify the smoothing parameter.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
RMSprop(DecomposableFunctionType &function, const double stepSize=0.01, const double alpha=0.99, const double eps=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.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
double & Tolerance()
Modify the tolerance for termination.
double StepSize() const
Get the step size.
double Epsilon() const
Get the value used to initialise the mean squared gradient parameter.
const DecomposableFunctionType & Function() const
Get the instantiated function to be optimized.
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
double Alpha() const
Get the smoothing parameter.
double & Epsilon()
Modify the value used to initialise the mean squared gradient parameter.
double Tolerance() const
Get the tolerance for termination.
double Optimize(arma::mat &iterate)
Optimize the given function using RMSprop.
RMSprop is an optimizer that utilizes the magnitude of recent gradients to normalize the gradients...
double & StepSize()
Modify the step size.