constant_step.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_OPTIMIZERS_PARALLEL_SGD_CONSTANT_STEP_HPP
13 #define MLPACK_CORE_OPTIMIZERS_PARALLEL_SGD_CONSTANT_STEP_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace optimization {
19 
24 {
25  public:
34  ConstantStep(const double step = 0.01) : step(step) { /* Nothing to do */ }
35 
43  double StepSize(const size_t /* numEpoch */)
44  {
45  return step;
46  }
47  private:
49  double step;
50 };
51 
52 } // namespace optimization
53 } // namespace mlpack
54 
55 #endif
double StepSize(const size_t)
This function is called in each iteration before the gradient update.
.hpp
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
ConstantStep(const double step=0.01)
Member initialization constructor.
Implementation of the ConstantStep stepsize decay policy for parallel SGD.