MiniDNN
MiniDNN::Optimizer Class Referenceabstract

#include <Optimizer.h>

Inheritance diagram for MiniDNN::Optimizer:
MiniDNN::AdaGrad MiniDNN::RMSProp MiniDNN::SGD

Public Member Functions

virtual void reset ()
 
virtual void update (ConstAlignedMapVec &dvec, AlignedMapVec &vec)=0
 

Detailed Description

The interface of optimization algorithms

Definition at line 19 of file Optimizer.h.

Member Function Documentation

◆ reset()

virtual void MiniDNN::Optimizer::reset ( )
inlinevirtual

Reset the optimizer to clear all historical information

Reimplemented in MiniDNN::RMSProp, and MiniDNN::AdaGrad.

Definition at line 32 of file Optimizer.h.

◆ update()

virtual void MiniDNN::Optimizer::update ( ConstAlignedMapVec &  dvec,
AlignedMapVec &  vec 
)
pure virtual

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.

Implemented in MiniDNN::RMSProp, MiniDNN::AdaGrad, and MiniDNN::SGD.


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