activation
Contents
activation#
Spiking layers can choose any combination of spike generation, reset mechanism and surrogate gradient function.
Spike Generation#
|
PyTorch-compatible function that returns a single spike per time step. |
|
PyTorch-compatible function that returns the number of spikes emitted, given a membrane potential value and in a "threshold subtracting" regime. |
|
Wrapper for MaxSpikeInner that does not require passing max_num_spikes_per_bin when calling apply but only at instantiation. |
Reset Mechanisms#
|
Reset the membrane potential v_mem to a given value after it spiked. |
|
Subtract the spiking threshold from the membrane potential for every neuron that spiked. |
Surrogate Gradient Functions#
|
Surrogate gradient as defined in Shrestha and Orchard, 2018. |
|
Surrogate gradient as defined in Weidel and Sheik, 2021. |
|
Heaviside surrogate gradient with optional shift. |
|
Surrogate gradient as defined in Yin et al., 2021. |