MachineIntelligenceCore:NeuralNets
|
Update in the direction of gradient descent - with momentum. More...
#include <Momentum.hpp>
Public Member Functions | |
Momentum (size_t rows_, size_t cols_, eT momentum_=0.9) | |
mic::types::MatrixPtr< eT > | calculateUpdate (mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > dx_, eT learning_rate_=0.001) |
![]() | |
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 | |
mic::types::MatrixPtr< eT > | v |
Update vector. More... | |
eT | momentum |
Momentum rate. More... | |
Update in the direction of gradient descent - with momentum.
Definition at line 39 of file Momentum.hpp.
|
inline |
Constructor. Sets dimensions and momentum (default=0.9).
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 Momentum.hpp.
References mic::neural_nets::optimization::Momentum< eT >::v.
|
inlinevirtual |
Calculates the update according to the Momentum update rule.
x_ | Pointer to the current matrix. |
dx_ | Pointer to current gradient of that matrix. |
learning_rate_ | Learning rate (default=0.001). NOT USED! |
Implements mic::neural_nets::optimization::OptimizationFunction< eT >.
Definition at line 59 of file Momentum.hpp.
References mic::neural_nets::optimization::Momentum< eT >::momentum, and mic::neural_nets::optimization::Momentum< eT >::v.
|
protected |
Momentum rate.
Definition at line 76 of file Momentum.hpp.
Referenced by mic::neural_nets::optimization::Momentum< eT >::calculateUpdate().
|
protected |
Update vector.
Definition at line 73 of file Momentum.hpp.
Referenced by mic::neural_nets::optimization::Momentum< eT >::calculateUpdate(), and mic::neural_nets::optimization::Momentum< eT >::Momentum().