norse.torch.functional.poisson_encode_step

norse.torch.functional.poisson_encode_step#

norse.torch.functional.poisson_encode_step(input_values: Tensor, f_max: float = 1000, dt: float = 0.001, generator: Generator = None) Tensor[source]#

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

See for example https://www.cns.nyu.edu/~david/handouts/poisson.pdf.

Parameters:

input_values (torch.Tensor): Input data tensor with values assumed to be in the interval [0,1]. 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 containing binary values in .