Skip to content

Commit 429f855

Browse files
committed
mod to gated-hebb
1 parent 5f7c33b commit 429f855

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: ngclearn/components/synapses/hebbian/gatedHebbianSynapse.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ def _compute_update(w_bound, pre, post, weights):
3838
return dW, db
3939

4040
@staticmethod
41-
def _evolve(bias_init, eta, w_decay, w_bound, pre, post, weights, biases):
41+
def _evolve(bias_init, eta, w_decay, w_bound, pre, post, preSpike,
42+
postSpike, weights, biases):
4243
## calculate synaptic update values
4344
dWeights, dBiases = GatedHebbianSynapse._compute_update(w_bound, pre, post, weights)
4445
weights = weights + dWeights * eta
4546
if bias_init != None:
4647
biases = biases + dBiases * eta
4748
if w_decay > 0.:
48-
Wdec = jnp.matmul((1. - pre).T, post) * w_decay
49+
Wdec = jnp.matmul((1. - preSpike).T, postSpike) * w_decay
4950
weights = weights - Wdec
5051
weights = jnp.clip(weights, 0., w_bound)
5152
return weights, biases, dWeights, dBiases

0 commit comments

Comments
 (0)