norse.torch.functional.lif_refrac module

class norse.torch.functional.lif_refrac.LIFRefracFeedForwardState(lif: norse.torch.functional.lif.LIFFeedForwardState, rho: torch.Tensor)[source]

Bases: tuple

State of a feed forward LIF neuron with absolute refractory period.

Parameters

Create new instance of LIFRefracFeedForwardState(lif, rho)

lif: norse.torch.functional.lif.LIFFeedForwardState

Alias for field number 0

rho: torch.Tensor

Alias for field number 1

class norse.torch.functional.lif_refrac.LIFRefracParameters(lif: norse.torch.functional.lif.LIFParameters = LIFParameters(tau_syn_inv=tensor(200.), tau_mem_inv=tensor(100.), v_leak=tensor(0.), v_th=tensor(1.), v_reset=tensor(0.), method='super', alpha=tensor(100.)), rho_reset: torch.Tensor = tensor(5.))[source]

Bases: tuple

Parameters of a LIF neuron with absolute refractory period.

Parameters
  • lif (LIFParameters) – parameters of the LIF neuron integration

  • rho (torch.Tensor) – refractory state (count towards zero)

Create new instance of LIFRefracParameters(lif, rho_reset)

lif: norse.torch.functional.lif.LIFParameters

Alias for field number 0

rho_reset: torch.Tensor

Alias for field number 1

class norse.torch.functional.lif_refrac.LIFRefracState(lif: norse.torch.functional.lif.LIFState, rho: torch.Tensor)[source]

Bases: tuple

State of a LIF neuron with absolute refractory period.

Parameters
  • lif (LIFState) – state of the LIF neuron integration

  • rho (torch.Tensor) – refractory state (count towards zero)

Create new instance of LIFRefracState(lif, rho)

lif: norse.torch.functional.lif.LIFState

Alias for field number 0

rho: torch.Tensor

Alias for field number 1

norse.torch.functional.lif_refrac.compute_refractory_update(state: norse.torch.functional.lif_refrac.LIFRefracState, z_new: torch.Tensor, v_new: torch.Tensor, p: norse.torch.functional.lif_refrac.LIFRefracParameters = LIFRefracParameters()) Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]
norse.torch.functional.lif_refrac.compute_refractory_update(state: norse.torch.functional.lif_refrac.LIFRefracFeedForwardState, z_new: torch.Tensor, v_new: torch.Tensor, p: norse.torch.functional.lif_refrac.LIFRefracParameters = LIFRefracParameters()) Tuple[torch.Tensor, torch.Tensor, torch.Tensor]

Compute the refractory update.

Parameters
Return type

Tuple[Tensor, Tensor, Tensor]

norse.torch.functional.lif_refrac.lif_refrac_feed_forward_step(input_tensor, state, p=LIFRefracParameters(lif=LIFParameters(tau_syn_inv=tensor(200.), tau_mem_inv=tensor(100.), v_leak=tensor(0.), v_th=tensor(1.), v_reset=tensor(0.), method='super', alpha=tensor(100.)), rho_reset=tensor(5.)), dt=0.001)[source]
Computes a single euler-integration step of a feed forward

LIF neuron-model with a refractory period.

Parameters
Return type

Tuple[Tensor, LIFRefracFeedForwardState]

norse.torch.functional.lif_refrac.lif_refrac_step(input_tensor, state, input_weights, recurrent_weights, p=LIFRefracParameters(lif=LIFParameters(tau_syn_inv=tensor(200.), tau_mem_inv=tensor(100.), v_leak=tensor(0.), v_th=tensor(1.), v_reset=tensor(0.), method='super', alpha=tensor(100.)), rho_reset=tensor(5.)), dt=0.001)[source]
Computes a single euler-integration step of a recurrently connected

LIF neuron-model with a refractory period.

Parameters
  • input_tensor (torch.Tensor) – the input spikes at the current time step

  • s (LIFRefracState) – state at the current time step

  • input_weights (torch.Tensor) – synaptic weights for incoming spikes

  • recurrent_weights (torch.Tensor) – synaptic weights for recurrent spikes

  • p (LIFRefracParameters) – parameters of the lif neuron

  • dt (float) – Integration timestep to use

Return type

Tuple[Tensor, LIFRefracState]