MultiGaussian#
- class sinabs.activation.MultiGaussian(mu: float = 0.0, sigma: float = 0.5, h: float = 0.15, s: float = 6, grad_scale: float = 1.0)[source]#
Surrogate gradient as defined in Yin et al., 2021.
https://www.biorxiv.org/content/10.1101/2021.03.22.436372v2
- Parameters:
mu (float) – The mean of the Gaussian.
sigma (float) – The standard deviation of the Gaussian.
h (float) – Controls the magnitude of the negative parts of the kernel.
s (float) – Controls the width of the negative parts of the kernel.
grad_scale (float) – Scale the gradients arbitrarily.