norse.torch.module.encode

norse.torch.module.encode#

Stateful encoders as torch modules.

Classes

ConstantCurrentLIFEncoder(seq_length[, p, dt])

Encodes input currents as fixed (constant) voltage currents, and simulates the spikes that occur during a number of timesteps/iterations (seq_length).

PoissonEncoder(seq_length[, f_max, dt])

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

PoissonEncoderStep([f_max, dt])

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.

PopulationEncoder(out_features, scale, ...)

Encodes a set of input values into population codes, such that each singular input value is represented by a list of numbers (typically calculated by a radial basis kernel), whose length is equal to the out_features.

SignedPoissonEncoder(seq_length[, f_max, dt])

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

SignedPoissonEncoderStep([f_max, dt])

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

SpikeLatencyEncoder(*args, **kwargs)

For all neurons, remove all but the first spike.

SpikeLatencyLIFEncoder(seq_length[, p, dt])

Encodes an input value by the time the first spike occurs.