MachineIntelligenceCore:NeuralNets
|
Update using AdaGrad - adaptive gradient descent. More...
#include <AdaGrad.hpp>
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_) |
![]() | |
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... | |
Update using AdaGrad - adaptive gradient descent.
Definition at line 39 of file AdaGrad.hpp.
|
inline |
Constructor. Sets dimensions and eps (default=1e-8).
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.
|
inlinevirtual |
Performs update according to the AdaGrad update rule.
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.
|
protected |
Calculated update.
Definition at line 87 of file AdaGrad.hpp.
Referenced by mic::neural_nets::optimization::AdaGrad< eT >::AdaGrad(), and mic::neural_nets::optimization::AdaGrad< eT >::calculateUpdate().
|
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().
|
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().