brainpy.math.surrogate.GaussianGrad#
- class brainpy.math.surrogate.GaussianGrad(sigma=0.5, alpha=0.5)[source]#
Judge spiking state with the Gaussian gradient function.
See also
Methods
__init__
([sigma, alpha])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.