Sigmoid Derivative#

class src.model.SurrogateGradient.SigmoidDerivative(*args, **kwargs)#

Bases: Function

Class that implements the sigmoid derivative function as the surrogate gradient for the backward pass.

static backward(ctx, grad_output: Tensor) Tensor#

Backward pass using surrogate gradient function: sigmoid derivative

static forward(ctx, input_: Tensor) Tensor#

Forward pass using 'Heaviside step function'

spiking_mode: str = 'binary'#
surrogate_scale: float = 2.0#