From 727c3c0eed6c3929254fed9ab3581939d561cfbd Mon Sep 17 00:00:00 2001 From: Monkin Date: Fri, 22 Mar 2024 14:40:38 +0000 Subject: [PATCH] Fix: RefractoryLIF unit test to test the voltage dynamics --- tests/lava/proc/lif/test_models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/lava/proc/lif/test_models.py b/tests/lava/proc/lif/test_models.py index d9ec66528..1d9f29943 100644 --- a/tests/lava/proc/lif/test_models.py +++ b/tests/lava/proc/lif/test_models.py @@ -837,12 +837,13 @@ def test_float_model(self): refractory_period = 1 # Two neurons with different biases + # No Input current provided to make the voltage dependent on the bias lif_refractory = LIFRefractory(shape=(num_neurons,), - u=np.arange(num_neurons), + u=np.zeros(num_neurons), bias_mant=np.arange(num_neurons) + 1, bias_exp=np.ones( (num_neurons,), dtype=float), - vth=4., + vth=4, refractory_period=refractory_period) v_logger = io.sink.Read(buffer=num_steps) @@ -856,6 +857,6 @@ def test_float_model(self): # Voltage is expected to remain at reset level for two time steps v_expected = np.array([[1, 2, 3, 4, 0, 0, 1, 2], - [2, 0, 0, 2, 0, 0, 2, 0]], dtype=float) + [2, 4, 0, 0, 2, 4, 0, 0]], dtype=float) assert_almost_equal(v, v_expected)