MachineIntelligenceCore:NeuralNets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
mic::neural_nets::optimization::AdaGrad< eT > Class Template Reference

Update using AdaGrad - adaptive gradient descent. More...

#include <AdaGrad.hpp>

Inheritance diagram for mic::neural_nets::optimization::AdaGrad< eT >:
Collaboration diagram for mic::neural_nets::optimization::AdaGrad< eT >:

Public Member Functions

 AdaGrad (size_t rows_, size_t cols_, eT eps_=1e-8)
 
mic::types::MatrixPtr< eT > calculateUpdate (mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > dx_, eT learning_rate_)
 
- Public Member Functions inherited from mic::neural_nets::optimization::OptimizationFunction< eT >
 OptimizationFunction ()
 
virtual ~OptimizationFunction ()
 Virtual destructor - empty. More...
 
virtual void update (mic::types::MatrixPtr< eT > p_, mic::types::MatrixPtr< eT > dp_, eT learning_rate_, eT decay_=0.0)
 
virtual void update (mic::types::MatrixPtr< eT > p_, mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > y_, eT learning_rate_=0.001)
 

Protected Attributes

eT eps
 Smoothing term that avoids division by zero. More...
 
mic::types::MatrixPtr< eT > G
 Sum of all of the squares of the gradients up to time t ("diagonal matrix"). More...
 
mic::types::MatrixPtr< eT > delta
 Calculated update. More...
 

Detailed Description

template<typename eT = float>
class mic::neural_nets::optimization::AdaGrad< eT >

Update using AdaGrad - adaptive gradient descent.

Author
tkornuta

Definition at line 39 of file AdaGrad.hpp.

Constructor & Destructor Documentation

template<typename eT = float>
mic::neural_nets::optimization::AdaGrad< eT >::AdaGrad ( size_t  rows_,
size_t  cols_,
eT  eps_ = 1e-8 
)
inline

Constructor. Sets dimensions and eps (default=1e-8).

Parameters
rows_Number of rows of the updated matrix/its gradient.
cols_Number of columns of the updated matrix/its gradient.

Definition at line 47 of file AdaGrad.hpp.

References mic::neural_nets::optimization::AdaGrad< eT >::delta, and mic::neural_nets::optimization::AdaGrad< eT >::G.

Member Function Documentation

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::neural_nets::optimization::AdaGrad< eT >::calculateUpdate ( mic::types::MatrixPtr< eT >  x_,
mic::types::MatrixPtr< eT >  dx_,
eT  learning_rate_ 
)
inlinevirtual

Performs update according to the AdaGrad update rule.

Parameters
x_Pointer to the current matrix.
dx_Pointer to current gradient of that matrix.
learning_rate_Learning rate (default=0.001).

Implements mic::neural_nets::optimization::OptimizationFunction< eT >.

Definition at line 63 of file AdaGrad.hpp.

References mic::neural_nets::optimization::AdaGrad< eT >::delta, mic::neural_nets::optimization::AdaGrad< eT >::eps, and mic::neural_nets::optimization::AdaGrad< eT >::G.

Member Data Documentation

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::neural_nets::optimization::AdaGrad< eT >::delta
protected
template<typename eT = float>
eT mic::neural_nets::optimization::AdaGrad< eT >::eps
protected

Smoothing term that avoids division by zero.

Definition at line 81 of file AdaGrad.hpp.

Referenced by mic::neural_nets::optimization::AdaGrad< eT >::calculateUpdate().

template<typename eT = float>
mic::types::MatrixPtr<eT> mic::neural_nets::optimization::AdaGrad< eT >::G
protected

Sum of all of the squares of the gradients up to time t ("diagonal matrix").

Definition at line 84 of file AdaGrad.hpp.

Referenced by mic::neural_nets::optimization::AdaGrad< eT >::AdaGrad(), and mic::neural_nets::optimization::AdaGrad< eT >::calculateUpdate().


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