norse.torch.functional.spike_latency_lif_encode

norse.torch.functional.spike_latency_lif_encode(input_current: torch.Tensor, seq_length: int, p: 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.)), dt=0.001)torch.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)