model.tools.layers.CurrentEncoder

model.tools.layers.CurrentEncoder#

class CurrentEncoder[source]#

Bases: LayerGen

Translates scalar data into a spiking form, interpreting it as a presynaptic current

Uses norse.torch.module.encode.ConstantCurrentLIFEncoder module.

Methods

get

Initializes and returns the network layer

get(in_channels: int) Tuple[SNNCell, int][source]#

Initializes and returns the network layer

Parameters:

in_channels (int) – Number of input channels.

Returns:

The generated module and the number of channels that will be after applying this layer to a tensor with in_channels channels.

Return type:

Tuple[nn.Module, int]