brainpy.math.surrogate.ReluGrad

brainpy.math.surrogate.ReluGrad#

class brainpy.math.surrogate.ReluGrad(alpha=0.3, width=1.0)[source]#

Judge spiking state with the ReLU gradient function.

See also

relu_grad

__init__(alpha=0.3, width=1.0)[source]#

Methods

__init__([alpha, width])

surrogate_fun(x)

The surrogate function.

surrogate_grad(x)

The gradient function of the surrogate function.