norse.torch.functional.lif_current_encoder

norse.torch.functional.lif_current_encoder#

norse.torch.functional.lif_current_encoder(input_current: Tensor, voltage: Tensor, p: LIFParameters, dt: float = 0.001) Tuple[Tensor, Tensor][source]#

Computes a single euler-integration step of a leaky integrator. More specifically it implements one integration step of the following ODE

v˙=1/τmem(vleakv+i)i˙=1/τsyni
Parameters:

input (torch.Tensor): the input current at the current time step voltage (torch.Tensor): current state of the LIF neuron p (LIFParameters): parameters of a leaky integrate and fire neuron dt (float): Integration timestep to use