SingleSpike#
- class sinabs.activation.SingleSpike(*args, **kwargs)[source]#
Autograd function that returns membrane potential divided by spike threshold for a maximum of one spike per time step. Do not instantiate this class when passing as spike_fn (see example). Can be combined with different surrogate gradient functions.
Example
>>> layer = sinabs.layers.LIF(spike_fn=SingleSpike, ...)