From 27c8a89d938d25045fbab34531cfd0c9be289404 Mon Sep 17 00:00:00 2001 From: ago109 Date: Mon, 1 Jul 2024 11:11:51 -0400 Subject: [PATCH] added surrogate compartment to LIFCell --- ngclearn/components/neurons/spiking/LIFCell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngclearn/components/neurons/spiking/LIFCell.py b/ngclearn/components/neurons/spiking/LIFCell.py index d2ce9c3f7..0358b494c 100644 --- a/ngclearn/components/neurons/spiking/LIFCell.py +++ b/ngclearn/components/neurons/spiking/LIFCell.py @@ -260,11 +260,11 @@ def _advance_state(t, dt, tau_m, R_m, v_rest, v_reset, v_decay, refract_T, thr, tau_theta, theta_plus, one_spike, intgFlag, d_spike_fx, key, j, v, s, rfr, thr_theta, tols): skey = None ## this is an empty dkey if single_spike mode turned off - if one_spike: ## old code ~> if self.one_spike is False: + if one_spike: key, skey = random.split(key, 2) ## run one integration step for neuronal dynamics j = j * R_m - surrogate = d_spike_fx(j) + surrogate = d_spike_fx(j, thr + thr_theta) v, s, raw_spikes, rfr = _run_cell(dt, j, v, thr, thr_theta, rfr, skey, tau_m, v_rest, v_reset, v_decay, refract_T, intgFlag)