Skip to content

Commit

Permalink
mod to gated-hebb
Browse files Browse the repository at this point in the history
  • Loading branch information
ago109 committed Jul 1, 2024
1 parent 429f855 commit 94b2453
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ngclearn/components/synapses/hebbian/gatedHebbianSynapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def _evolve(bias_init, eta, w_decay, w_bound, pre, post, preSpike,
## calculate synaptic update values
dWeights, dBiases = GatedHebbianSynapse._compute_update(w_bound, pre, post, weights)
weights = weights + dWeights * eta
if bias_init != None:
biases = biases + dBiases * eta
if w_decay > 0.:
Wdec = jnp.matmul((1. - preSpike).T, postSpike) * w_decay
weights = weights - Wdec
if bias_init != None:
biases = biases + dBiases * eta
weights = jnp.clip(weights, 0., w_bound)
return weights, biases, dWeights, dBiases

Expand Down

0 comments on commit 94b2453

Please sign in to comment.