brainpy.math.surrogate.PiecewiseLeakyRelu

brainpy.math.surrogate.PiecewiseLeakyRelu#

class brainpy.math.surrogate.PiecewiseLeakyRelu(c=0.01, w=1.0)[source]#

Judge spiking state with a piecewise leaky relu function.

__init__(c=0.01, w=1.0)[source]#

Methods

__init__([c, w])

surrogate_fun(x)

The surrogate function.

surrogate_grad(x)

The gradient function of the surrogate function.