MiniDNN
MiniDNN::AdaGrad Class Reference

#include <AdaGrad.h>

Inheritance diagram for MiniDNN::AdaGrad:
MiniDNN::Optimizer

Public Member Functions

void reset ()
 
void update (ConstAlignedMapVec &dvec, AlignedMapVec &vec)
 

Public Attributes

Scalar m_lrate
 
Scalar m_eps
 

Detailed Description

The AdaGrad algorithm

Definition at line 17 of file AdaGrad.h.

Member Function Documentation

◆ reset()

void MiniDNN::AdaGrad::reset ( )
inlinevirtual

Reset the optimizer to clear all historical information

Reimplemented from MiniDNN::Optimizer.

Definition at line 35 of file AdaGrad.h.

◆ update()

void MiniDNN::AdaGrad::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 37 of file AdaGrad.h.


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