fn
sigmoid
→Tensorsigmoid(input: Tensor)Element-wise logistic sigmoid.
Squashes the real line into . Often used for binary classification heads.
Parameters
inputTensorInput tensor.
Returns
TensorElement-wise result with the same shape as input.
Notes
Mathematical definition:
Gradient: . Numerically stable for large negative x via the engine implementation.
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.sigmoid(x)
Tensor([...])