Hopfield¶
-
class
Hopfield
: public BasePlasticity¶ Public Functions
-
Hopfield
(const int &outputs, const int &batch_size, update_args optimizer = update_args(optimizer_t::sgd), weights_initialization weights_init = weights_initialization(weights_init_t::normal), int epochs_for_convergency = 1, float convergency_atol = 0.01, float delta = .4f, float p = 2.f, int k = 2)¶ Construct the object using the list of training parameters.
The constructor follows the same nomenclature of the Python counterpart.
Note
- Parameters
outputs – Number of hidden units.
batch_size – Size of the minibatch.
optimizer – update_args Optimizer object (default=SGD algorithm).
weights_init – weights_initialization object (default=uniform initialization in [-1, 1]).
epochs_for_convergency – Number of stable epochs requested for the convergency.
convergency_atol – Absolute tolerance requested for the convergency.
delta – Strength of the anti-hebbian learning
p – Lebesgue norm of the weights.
k – Ranking parameter, must be integer that is bigger or equal than 2.
-
Hopfield
(const Hopfield &b)¶ Copy constructor.
The copy constructor provides a deep copy of the object, i.e. all the arrays are copied and not moved.
- Parameters
b – Hopfield object
-
Hopfield &
operator=
(const Hopfield &b)¶ Copy operator.
The operator performs a deep copy of the object and if there are buffers already allocated, the operatore deletes them and then re-allocates an appropriated portion of memory.
- Parameters
b – Hopfield object
-
~Hopfield
() = default¶ Destructor.
Completely delete the object and release the memory of the arrays.
-