brainpy.math.surrogate.MultiGaussianGrad#
- class brainpy.math.surrogate.MultiGaussianGrad(h=0.15, s=6.0, sigma=0.5, scale=0.5)[source]#
Judge spiking state with the multi-Gaussian gradient function.
See also
Methods
__init__
([h, s, sigma, scale])call
(x)Call the function for surrogate gradient propagation.
surrogate_fun
(x)The surrogate function.
surrogate_grad
(dz, x)The gradient for the surrogate function.
true_fun
(x)The original true function.