Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ago109 committed Jul 1, 2024
1 parent 0bf8bb3 commit 8ece2be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ngclearn/components/synapses/hebbian/hebbianSynapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ def _calc_update(pre, post, W, w_bound, is_nonnegative=True, signVal=1., w_decay
if w_bound > 0.:
dW = dW * (w_bound - jnp.abs(W))
if w_decay > 0.:
dW = dW - jnp.matmul((1. - _pre).T, post) * w_decay
#dW = dW - W * w_decay
dW = dW - W * w_decay
return dW * signVal, db * signVal

@partial(jit, static_argnums=[1,2])
Expand Down

0 comments on commit 8ece2be

Please sign in to comment.