16 #ifndef MLPACK_CORE_OPTIMIZERS_ADA_DELTA_ADA_DELTA_HPP 17 #define MLPACK_CORE_OPTIMIZERS_ADA_DELTA_ADA_DELTA_HPP 24 namespace optimization {
86 AdaDelta(
const double stepSize = 1.0,
87 const size_t batchSize = 32,
88 const double rho = 0.95,
89 const double epsilon = 1e-6,
90 const size_t maxIterations = 100000,
91 const double tolerance = 1e-5,
92 const bool shuffle =
true);
105 template<
typename DecomposableFunctionType>
106 double Optimize(DecomposableFunctionType&
function, arma::mat& iterate)
108 return optimizer.Optimize(
function, iterate);
112 double StepSize()
const {
return optimizer.StepSize(); }
114 double&
StepSize() {
return optimizer.StepSize(); }
117 size_t BatchSize()
const {
return optimizer.BatchSize(); }
122 double Rho()
const {
return optimizer.UpdatePolicy().Rho(); }
124 double&
Rho() {
return optimizer.UpdatePolicy().Rho(); }
127 double Epsilon()
const {
return optimizer.UpdatePolicy().Epsilon(); }
129 double&
Epsilon() {
return optimizer.UpdatePolicy().Epsilon(); }
137 double Tolerance()
const {
return optimizer.Tolerance(); }
142 bool Shuffle()
const {
return optimizer.Shuffle(); }
144 bool&
Shuffle() {
return optimizer.Shuffle(); }
AdaDelta is an optimizer that uses two ideas to improve upon the two main drawbacks of the Adagrad me...
AdaDelta(const double stepSize=1.0, const size_t batchSize=32, const double rho=0.95, const double epsilon=1e-6, const size_t maxIterations=100000, const double tolerance=1e-5, const bool shuffle=true)
Construct the AdaDelta optimizer with the given function and parameters.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Rho() const
Get the smoothing parameter.
double Epsilon() const
Get the value used to initialise the mean squared gradient parameter.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
double & Rho()
Modify the smoothing parameter.
bool Shuffle() const
Get whether or not the individual functions are shuffled.
size_t & BatchSize()
Modify the batch size.
double Tolerance() const
Get the tolerance for termination.
double & Tolerance()
Modify the tolerance for termination.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
bool & Shuffle()
Modify whether or not the individual functions are shuffled.
Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...
double Optimize(DecomposableFunctionType &function, arma::mat &iterate)
Optimize the given function using AdaDelta.
size_t BatchSize() const
Get the batch size.
double & StepSize()
Modify the step size.
double StepSize() const
Get the step size.
double & Epsilon()
Modify the value used to initialise the mean squared gradient parameter.