MachineIntelligenceCore:NeuralNets
|
Updates according to classical Hebbian rule (wij += ni * x * y) with additional normalization. More...
#include <NormalizedHebbianRule.hpp>
Public Member Functions | |
NormalizedHebbianRule (size_t rows_, size_t cols_) | |
virtual | ~NormalizedHebbianRule () |
virtual void | update (mic::types::MatrixPtr< eT > p_, mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > y_, eT learning_rate_=0.001) |
virtual mic::types::MatrixPtr< eT > | calculateUpdate (mic::types::MatrixPtr< eT > x_, mic::types::MatrixPtr< eT > y_, 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) |
Protected Attributes | |
mic::types::MatrixPtr< eT > | delta |
Calculated update. More... | |
Updates according to classical Hebbian rule (wij += ni * x * y) with additional normalization.
Definition at line 44 of file NormalizedHebbianRule.hpp.
|
inline |
Constructor. Sets dimensions, momentum rates (beta1=0.9 and beta2=0.999) 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 51 of file NormalizedHebbianRule.hpp.
References mic::neural_nets::learning::NormalizedHebbianRule< eT >::delta.
|
inlinevirtual |
Definition at line 58 of file NormalizedHebbianRule.hpp.
|
inlinevirtual |
Calculates the update according to the hebbian rule.
x_ | Pointer to the input data matrix. |
y_ | Pointer to the output data matrix. |
learning_rate_ | Learning rate (default=0.001). |
Implements mic::neural_nets::optimization::OptimizationFunction< eT >.
Definition at line 93 of file NormalizedHebbianRule.hpp.
References mic::neural_nets::learning::NormalizedHebbianRule< eT >::delta.
Referenced by mic::neural_nets::learning::NormalizedHebbianRule< eT >::update().
|
inlinevirtual |
Updates the weight matrix according to the hebbian rule with normalization (l2 norm).
p_ | Pointer to the parameter (weight) matrix. |
x_ | Pointer to the input data matrix. |
y_ | Pointer to the output data matrix. |
learning_rate_ | Learning rate (default=0.001). |
Reimplemented from mic::neural_nets::optimization::OptimizationFunction< eT >.
Definition at line 68 of file NormalizedHebbianRule.hpp.
References mic::neural_nets::learning::NormalizedHebbianRule< eT >::calculateUpdate(), and mic::neural_nets::learning::NormalizedHebbianRule< eT >::delta.
|
protected |
Calculated update.
Definition at line 105 of file NormalizedHebbianRule.hpp.
Referenced by mic::neural_nets::learning::NormalizedHebbianRule< eT >::calculateUpdate(), mic::neural_nets::learning::NormalizedHebbianRule< eT >::NormalizedHebbianRule(), and mic::neural_nets::learning::NormalizedHebbianRule< eT >::update().