These learning rule types can be used in any place that Nengo learning rule types can be used.
nengo_extras.learning_rules.
AML
(d, learning_rate=1.0)[source]¶Association matrix learning rule (AML).
Enables one-shot learning without catastrophic forgetting of outer product association matrices.
The cue is provided by the pre-synaptic ensemble. The error signal is split
up: error[0]
provides a scaling factor to the learning rate.
error[1]
provides a decay rate (i.e., weights are multiplied with this
value in every time step), error[2:]
provides the target vector.
The update is given by:
decoders[...] *= error[1] # decay
decoders[...] += alpha * error[0] * error[2:, None] * np.dot(
pre, base_decoders.T)
where alpha is the learning rate adjusted for dt and base_decoders is the decoder matrix for decoding the identity from the pre-ensemble.
Parameters: | d : int
learning_rate : float, optional
|
---|
nengo_extras.learning_rules.
DeltaRule
(learning_rate=0.0001, pre_tau=0.005, post_fn=None, post_tau=None, post_target='in')[source]¶Implementation of the Delta rule.
By default, this implementation pretends the neurons are linear, and thus
does not require the derivative of the postsynaptic neuron activation
function. The derivative function, or a surrogate function, for the
postsynaptic neurons can be provided in post_fn
.
The update is given by:
delta W_ij = eta a_j e_i f(u_i)
where e_i
is the input error in the postsynaptic neuron space,
a_j
is the output activity for presynaptic neuron j,
u_i
is the input for postsynaptic neuron i,
and f
is a provided function.
Parameters: | learning_rate : float
pre_tau : float
post_fn : callable
post_tau : float
|
---|