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,
88 const double alpha = 0.99,
89 const double eps = 1e-8,
102 double Optimize(arma::mat& iterate);
105 const DecomposableFunctionType&
Function()
const {
return function; }
107 DecomposableFunctionType&
Function() {
return function; }
141 DecomposableFunctionType&
function;
167 #include "rmsprop_impl.hpp" double & Alpha()
Modify the smoothing parameter.
double Alpha() const
Get the smoothing parameter.
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.
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t maxIterations
The maximum number of allowed iterations.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double eps
The value used to initialise the mean squared gradient parameter.
double tolerance
The tolerance for termination.
double StepSize() const
Get the step size.
bool shuffle
Controls whether or not the individual functions are shuffled when iterating.
double alpha
The smoothing parameter.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
const DecomposableFunctionType & Function() const
Get the instantiated function to be optimized.
double stepSize
The step size for each example.
DecomposableFunctionType & Function()
Modify the instantiated function.
double & Tolerance()
Modify the tolerance for termination.
double Epsilon() const
Get the value used to initialise the mean squared gradient parameter.
double Optimize(arma::mat &iterate)
Optimize the given function using RMSprop.
double & Epsilon()
Modify the value used to initialise the mean squared gradient parameter.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
RMSprop is an optimizer that utilizes the magnitude of recent gradients to normalize the gradients...
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
double & StepSize()
Modify the step size.
double Tolerance() const
Get the tolerance for termination.