Skip to content

Commit 0bf8bb3

Browse files
committed
tweak
1 parent f6091f1 commit 0bf8bb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ngclearn/components/synapses/hebbian/hebbianSynapse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def _calc_update(pre, post, W, w_bound, is_nonnegative=True, signVal=1., w_decay
4141
if w_bound > 0.:
4242
dW = dW * (w_bound - jnp.abs(W))
4343
if w_decay > 0.:
44-
dW = dW - W * w_decay
44+
dW = dW - jnp.matmul((1. - _pre).T, post) * w_decay
45+
#dW = dW - W * w_decay
4546
return dW * signVal, db * signVal
4647

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

0 commit comments

Comments
 (0)