Skip to content

Commit

Permalink
cleaned up raf-cell
Browse files Browse the repository at this point in the history
  • Loading branch information
ago109 committed Aug 9, 2024
1 parent 94f37f7 commit 73e5aa1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ngclearn/components/neurons/spiking/RAFCell.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,16 @@ def _advance_state(t, dt, tau_v, resist_v, tau_w, thr, omega, b,
## continue with centered dynamics
j_ = j * resist_v
if intgFlag == 1: ## RK-2/midpoint
## Note: we integrate ODEs in order: first w, then v
w_params = (j_, v, tau_w, omega, b)
_, _w = step_rk2(0., w, _dfw, dt, w_params)
v_params = (j_, w, tau_v, omega, b)
v_params = (j_, _w, tau_v, omega, b)
_, _v = step_rk2(0., v, _dfv, dt, v_params)
else: # integType == 0 (default -- Euler)
## Note: we integrate ODEs in order: first w, then v
w_params = (j_, v, tau_w, omega, b)
_, _w = step_euler(0., w, _dfw, dt, w_params)
v_params = (j_, w, tau_v, omega, b)
v_params = (j_, _w, tau_v, omega, b)
_, _v = step_euler(0., v, _dfv, dt, v_params)
s = _emit_spike(_v, thr)
## hyperpolarize/reset/snap variables
Expand Down

0 comments on commit 73e5aa1

Please sign in to comment.