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.
double Tolerance() const
Get the tolerance for termination.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
Linear algebra utility functions, generally performed on matrices or vectors.
double StepSize() const
Get the step size.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double & Alpha()
Modify 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.
double Epsilon() const
Get the value used to initialise the mean squared gradient parameter.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
double & Tolerance()
Modify the tolerance for termination.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
double & Epsilon()
Modify the value used to initialise the mean squared gradient parameter.
const DecomposableFunctionType & Function() const
Get the instantiated function to be optimized.
double Optimize(arma::mat &iterate)
Optimize the given function using RMSprop.
double Alpha() const
Get the smoothing parameter.
RMSprop is an optimizer that utilizes the magnitude of recent gradients to normalize the gradients...
double & StepSize()
Modify the step size.