brainpy.math.surrogate.LeakyRelu

brainpy.math.surrogate.LeakyRelu#

class brainpy.math.surrogate.LeakyRelu(alpha=0.1, beta=1.0)[source]#

Judge spiking state with the Leaky ReLU function.

See also

leaky_relu

__init__(alpha=0.1, beta=1.0)[source]#

Methods

__init__([alpha, beta])

surrogate_fun(x)

The surrogate function.

surrogate_grad(x)

The gradient function of the surrogate function.