13 #ifndef MLPACK_CORE_OPTIMIZERS_SARAH_SARAH_PLUS_UPDATE_HPP 14 #define MLPACK_CORE_OPTIMIZERS_SARAH_SARAH_PLUS_UPDATE_HPP 19 namespace optimization {
51 const arma::mat& gradient,
52 const arma::mat& gradient0,
53 const size_t batchSize,
54 const double stepSize,
57 v += (gradient - gradient0) / (
double) batchSize;
58 iterate -= stepSize * v;
60 if (arma::norm(v) <= gamma * vNorm)
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 vNorm)
Update step for SARAH+.
SARAH+ provides an automatic and adaptive choice of the inner loop size.
The core includes that mlpack expects; standard C++ includes and Armadillo.
SARAHPlusUpdate(const double gamma=0.125)