brainpy.math.surrogate.S2NN#

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

Judge spiking state with the S2NN surrogate spiking function.

See also

s2nn

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

Methods

__init__([alpha, beta, epsilon, ...])

call(x)

Call the function for surrogate gradient propagation.

surrogate_fun(x)

The surrogate function.

surrogate_grad(dz, x)

The gradient for the surrogate function.

true_fun(x)

The original true function.