norse.torch.functional.spike_latency_lif_encode

norse.torch.functional.spike_latency_lif_encode#

norse.torch.functional.spike_latency_lif_encode(input_current: Tensor, seq_length: int, p: LIFParameters = (tensor(200.), tensor(100.), tensor(0.), tensor(1.), tensor(0.), 'super', tensor(100.)), dt=0.001) Tensor[source]#

Encodes an input value by the time the first spike occurs. Similar to the ConstantCurrentLIFEncoder, but the LIF can be thought to have an infinite refractory period.

Parameters:

input_current (torch.Tensor): Input current to encode (needs to be positive). sequence_length (int): Number of time steps in the resulting spike train. p (LIFParameters): Parameters of the LIF neuron model. dt (float): Integration time step (should coincide with the integration time step used in the model)