class sinabs.layers.Sig2SpikeLayer(channels_in, tw: int = 1, norm_level: float = 1, spk_out: bool = True)[source]#

Layer to convert analog Signals to spikes.

  • channels_in – number of channels in the analog signal

  • tw (int) – int number of time steps for each sample of the signal (up sampling)

  • layer_name – string layer name

  • norm_level (float) –

  • spk_out (bool) –


Defines the computation performed at every call.

Should be overridden by all subclasses.


Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.