Skip to content

Commit

Permalink
Fix: RefractoryLIF unit test to test the voltage dynamics
Browse files Browse the repository at this point in the history
  • Loading branch information
monkin77 committed Mar 22, 2024
1 parent 549a30c commit 12fcbcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/lava/proc/lif/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,11 @@ def test_float_model(self):

# Two neurons with different biases
lif_refractory = LIFRefractory(shape=(num_neurons,),
u=np.arange(num_neurons),
u=np.zeros(num_neurons), # Keep the input current at 0 for this test to vary the voltage based on the bias
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)
Expand All @@ -856,6 +856,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)

0 comments on commit 12fcbcb

Please sign in to comment.