GLIF1

class GLIF1(shape: tuple[int, ...] | int, step_time: float, *, rest_v: float, reset_v: float, thresh_v: float, refrac_t: float, time_constant: float, resistance: float = 1.0, batch_size: int = 1)[source]

Bases: VoltageMixin, SpikeRefractoryMixin, InfernoNeuron

Simulation of generalized leaky integrate-and-fire 1 (GLIF1) neuron dynamics.

Alias for LIF.

See also

For more details and references, visit Generalized Leaky Integrate-and-Fire 1 (GLIF1) in the zoo.

clear(**kwargs) None[source]

Resets neurons to their resting state.

property dt: float

Length of the simulation time step, in milliseconds.

Parameters:

value (float) – new simulation time step length.

Returns:

present simulation time step length.

Return type:

float

forward(inputs: Tensor, refrac_lock=True, **kwargs) Tensor[source]

Runs a simulation step of the neuronal dynamics.

Parameters:
  • inputs (torch.Tensor) – presynaptic currents, \(I(t)\), in \(\text{nA}\).

  • refrac_lock (bool, optional) – if membrane voltages should be fixed while in the refractory period. Defaults to True.

Returns:

if the corresponding neuron generated an action potential.

Return type:

torch.Tensor