Python wrappers
Public Python APIs implemented by this engine symbols.Autograd node for the logistic sigmoid .
Saves the output rather than the input because the gradient formula depends only on . This avoids a redundant forward pass and keeps the saved tensor at the same dtype as the activation.
Math
Attributes
schema_v1OpSchema"sigmoid", AmpPolicy::Promote — half-precision inputs are promoted to float32 to keep from underflowing for large .Notes
The eager backward builds via mul_scalar(-1) + add_scalar(1)
to reuse the existing storage primitives rather than introducing a dedicated
subtract kernel.
Static methods
1Methods
2Eager-mode backward: using the saved output .
Graph-mode backward: out * (1 - out) * g expressed as composable ops so the chain remains differentiable.