brainpy.math.surrogate.S2NN

brainpy.math.surrogate.S2NN#

class brainpy.math.surrogate.S2NN(alpha=4.0, beta=1.0, epsilon=1e-08)[source]#

Judge spiking state with the S2NN surrogate spiking function.

See also

s2nn

__init__(alpha=4.0, beta=1.0, epsilon=1e-08)[source]#

Methods

__init__([alpha, beta, epsilon])

surrogate_fun(x)

The surrogate function.

surrogate_grad(x)

The gradient function of the surrogate function.