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 f6091f1 commit 0bf8bb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ngclearn/components/synapses/hebbian/hebbianSynapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ 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 - W * w_decay
dW = dW - jnp.matmul((1. - _pre).T, post) * w_decay
#dW = dW - W * w_decay
return dW * signVal, db * signVal

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

0 comments on commit 0bf8bb3

Please sign in to comment.