Skip to content

Commit

Permalink
fix discretisation bug; cleaned up notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Feb 18, 2025
1 parent a3d8a88 commit 008be08
Show file tree
Hide file tree
Showing 3 changed files with 1,635 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ model neuromodulated_stdp_synapse:
post_trace += 1

# potentiate synapse
w_ real = Wmax * ( w / Wmax + n * (lambda * ( 1. - ( w / Wmax ) )**mu_plus * pre_trace ))
w = min(Wmax, w_)
w += n * (lambda * ( 1. - w )**mu_plus * pre_trace )
w = min(Wmax, w)

onReceive(pre_spikes):
pre_trace += 1

# depress synapse
w_ real = Wmax * ( w / Wmax - n * ( alpha * lambda * ( w / Wmax )**mu_minus * post_trace ))
w = max(Wmin, w_)
w -= n * ( alpha * lambda * w**mu_minus * post_trace )
w = max(Wmin, w)

# deliver spike to postsynaptic partner
emit_spike(w, d)
Expand Down
Loading

0 comments on commit 008be08

Please sign in to comment.