I cannot run a standard LIF neuron without current decay. Setting the current decay to 1.0 does not disable it, as would be expected from the documentation and the code.
The membrane potential is never increased, see image below:
When setting the current decay to a value very close to 1.0, e.g. 0.999, it does increase the membrane potential:
However, another issue is that the membrane potential gets different values for different values of current decay du, even if the current has the same trace. See below for du=0.9999:
Expected behavior
I would expect that one can turn off current decay completely by simply setting du=1.0, and then the current will be injected for only one timestep, with no leak/decay over future timesteps. The equations in the docstrings of the LIF process also describe such behavior:
u[t] = u[t-1] * (1-du) + a_in # neuron current
v[t] = v[t-1] * (1-dv) + u[t] + bias # neuron voltage
s_out = v[t] > vth # spike if threshold is exceeded
v[t] = 0 # reset at spike
Moreover, I would expect the membrane potential to get updated to the same value given the same current traces.
Environment (please complete the following information):
Device: Laptop & Intel cloud
OS: OSX & Linux
Lava version 0.8.0
Full script to reproduce (simply change the value of dv)
Describe the bug
I cannot run a standard LIF neuron without current decay. Setting the current decay to 1.0 does not disable it, as would be expected from the documentation and the code.
To reproduce current behavior
When I run this code
The membrane potential is never increased, see image below:![_lava_issue_du1_0](https://github.com/lava-nc/lava/assets/19389742/915d2a74-09e6-4637-b514-983da2f3e920)
When setting the current decay to a value very close to 1.0, e.g. 0.999, it does increase the membrane potential:![_lava_issue_du=0_999](https://github.com/lava-nc/lava/assets/19389742/95e88101-4604-4121-bd29-846f6e9df15d)
However, another issue is that the membrane potential gets different values for different values of current decay![_lava_issue_du0_9999](https://github.com/lava-nc/lava/assets/19389742/5988f1db-d61d-48bd-a3af-8e5538e1a6ec)
du
, even if the current has the same trace. See below fordu=0.9999
:Expected behavior
I would expect that one can turn off current decay completely by simply setting
du=1.0
, and then the current will be injected for only one timestep, with no leak/decay over future timesteps. The equations in the docstrings of the LIF process also describe such behavior:Moreover, I would expect the membrane potential to get updated to the same value given the same current traces.
Environment (please complete the following information):
Full script to reproduce (simply change the value of
dv
)