norse.torch.functional.signed_poisson_encode

norse.torch.functional.signed_poisson_encode(input_values: torch.Tensor, seq_length: int, f_max: float = 100, dt: float = 0.001)torch.Tensor[source]

Encodes a tensor of input values, which are assumed to be in the range [-1,1] into a tensor of one dimension higher of binary values, which represent input spikes.

Parameters:

input_values (torch.Tensor): Input data tensor with values assumed to be in the interval [-1,1]. sequence_length (int): Number of time steps in the resulting spike train. f_max (float): Maximal frequency (in Hertz) which will be emitted. dt (float): Integration time step (should coincide with the integration time step used in the model)

Returns:

A tensor with an extra dimension of size seq_length containing values in {-1,0,1}