Skip to content

sigmoid

Module: strata.utils • Kind: function
Source: strata/utils/math.mojo

def sigmoid[dtype: DType = DType.float64](x: Scalar[dtype]) -> Scalar[dtype]
from strata.utils import sigmoid

Compute the logistic sigmoid function σ(x)\sigma(x).

σ(x)=11+e−x\sigma(x) = \frac{1}{1 + e^{-x}}

Returns: Scalar[dtype] — Scalar[dtype]: Evaluated sigmoid activation in the range (0,1)(0, 1).