brainpy.math.surrogate.SlayerGrad

brainpy.math.surrogate.SlayerGrad#

class brainpy.math.surrogate.SlayerGrad(alpha=1.0)[source]#

Judge spiking state with the slayer surrogate gradient function.

See also

slayer_grad

__init__(alpha=1.0)[source]#

Methods

__init__([alpha])

surrogate_fun(x)

The surrogate function.

surrogate_grad(x)

The gradient function of the surrogate function.