12 #ifndef MLPACK_CORE_OPTIMIZERS_SARAH_SARAH_UPDATE_HPP
13 #define MLPACK_CORE_OPTIMIZERS_SARAH_SARAH_UPDATE_HPP
18 namespace optimization {
40 const arma::mat& gradient,
41 const arma::mat& gradient0,
42 const size_t batchSize,
43 const double stepSize,
46 v += (gradient - gradient0) / (
double) batchSize;
47 iterate -= stepSize * v;
The core includes that mlpack expects; standard C++ includes and Armadillo.
Vanilla update policy for SARAH.
bool Update(arma::mat &iterate, arma::mat &v, const arma::mat &gradient, const arma::mat &gradient0, const size_t batchSize, const double stepSize, const double)
Update step for SARAH.