Stochastic Gradient Descent with momentum optimizer class.
More...
#include <dnn_opt.h>
Stochastic Gradient Descent with momentum optimizer class.
SGD with momentum algorithm, see https://arxiv.org/pdf/1609.04747.pdf
Definition at line 194 of file dnn_opt.h.
◆ opt_SGD_momentum()
SGD with momentum constructor.
- Parameters
-
[in] | s | Step size - learning rate |
[in] | m | Momentum |
[in] | l | Regularisation param lambda |
[in] | a | Regularisation param alpha |
Definition at line 208 of file dnn_opt.h.
◆ ~opt_SGD_momentum()
dnn::opt_SGD_momentum::~opt_SGD_momentum |
( |
| ) |
|
|
inline |
◆ apply()
Apply the optimizer to the layer parameters.
- Parameters
-
[in,out] | W,B | Learnable parameters |
[in] | Wgrad,Bgrad | Gradient of the learnable parameters |
Implements dnn::opt.
Definition at line 225 of file dnn_opt.h.
◆ get_algorithm()
std::string dnn::opt_SGD_momentum::get_algorithm |
( |
void |
| ) |
|
|
inlinevirtual |
Get the optimizer algorithm information.
- Returns
- Algorithm information string
Reimplemented from dnn::opt.
Definition at line 256 of file dnn_opt.h.
◆ mom
arma::Cube<DNN_Dtype> dnn::opt_SGD_momentum::v |
|
private |
Velocity internal variable for weight.
Definition at line 197 of file dnn_opt.h.
◆ vB
arma::Mat<DNN_Dtype> dnn::opt_SGD_momentum::vB |
|
private |
Velocity internal variable for bias.
Definition at line 198 of file dnn_opt.h.
The documentation for this class was generated from the following file: