PiecewiseExp#

class braincore.surrogate.PiecewiseExp(alpha=1.0)[source]#

Judge spiking state with a piecewise exponential function.

See also

piecewise_exp

surrogate_fun(x)[source]#

The surrogate function.

surrogate_grad(x)[source]#

The gradient function of the surrogate function.