MiniDNN
MiniDNN::SGD Class Reference

#include <SGD.h>

Inheritance diagram for MiniDNN::SGD:
MiniDNN::Optimizer

Public Member Functions

void update (ConstAlignedMapVec &dvec, AlignedMapVec &vec)
 
- Public Member Functions inherited from MiniDNN::Optimizer
virtual void reset ()
 

Public Attributes

Scalar m_lrate
 
Scalar m_decay
 

Detailed Description

The Stochastic Gradient Descent (SGD) algorithm

Definition at line 16 of file SGD.h.

Member Function Documentation

◆ update()

void MiniDNN::SGD::update ( ConstAlignedMapVec &  dvec,
AlignedMapVec &  vec 
)
inlinevirtual

Update the parameter vector using its gradient

It is assumed that the memory addresses of dvec and vec do not change during the training process. This is used to implement optimization algorithms that have "memories". See the AdaGrad algorithm for an example.

Parameters
dvecThe gradient of the parameter. Read-only
vecOn entering, the current parameter vector. On exit, the updated parameters.

Implements MiniDNN::Optimizer.

Definition at line 31 of file SGD.h.


The documentation for this class was generated from the following file: