norse.torch.functional.encode#
Stateless encoding functionality for Norse, offering different ways to convert numerical inputs to the spiking domain. Note that some functions, like population_encode does not return spikes, but rather numerical values that will have to be converted into spikes via, for instance, the poisson encoder.
Functions
|
Encodes input currents as fixed (constant) voltage currents, and simulates the spikes that occur during a number of timesteps/iterations (seq_length). |
|
Simple euclidean distance metric. |
|
A gaussian radial basis kernel that calculates the radial basis given a distance value (distance between \(x\) and a data value \(x'\), or \(\|\mathbf{x} - \mathbf{x'}\|^2\) below). |
|
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. |
|
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. |
|
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. |
|
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. |
|
Creates a poisson distributed signed spike vector, when |
|
For all neurons, remove all but the first spike. |
|
Encodes an input value by the time the first spike occurs. |