hxtorch.spiking.functional.refractory

Refractory update for neurons with refractory behaviour

Classes

NamedTuple(typename[, fields])

Typed version of namedtuple.

Unterjubel(*args, **kwargs)

Unterjubel hardware observables to allow correct gradient flow

Functions

hxtorch.spiking.functional.refractory.refractory_update(z: torch.Tensor, v: torch.Tensor, z_hw: torch.Tensor, v_hw: torch.Tensor, ref_state: torch.Tensor, params: NamedTuple, dt: float = 1e-06)Tuple[torch.Tensor, ]

Update neuron membrane and spikes to account for refractory period. This implemention is widly adopted from: https://github.com/norse/norse/blob/main/norse/torch/functional/lif_refrac.py :param z: The spike tensor at time step t. :param v: The membrane tensor at time step t. :param ref_state: The refractory state holding the number of time steps the

neurons has to remain in the refractory period.

Parameters
  • z_hw – The hardware spikes corresponding to the current time step. In case this is None, no HW spikes will be injected.

  • v_hw – The hardware cadc traces corresponding to the current time step. In case this is None, no HW cadc values will be injected.

  • params – Parameter object holding the LIF parameters.

Returns

Returns a tuple (z, v, ref_state) holding the tensors of time step t.