public class Sigmoid<T extends AbstractFloat = Float> extends ElementwiseActivation<T>
Element-wise logistic activation: sigmoid(x) = 1 / (1 + exp(-x)). The implementation evaluates only a non-positive exponential to avoid overflow. Outputs lie in [0, 1]; infinities map to 0/1 and NaN remains NaN. Backward multiplies the upstream derivative by y * (1 - y), using the saved output y during training. No tensor is modified and there are no parameters. Supports arbitrary batch sample shapes on CPU and supported GPUs.
layer = klyn.math.nn.layers.Dense<Float>(32, activation="sigmoid")
output = Sigmoid<Float>().forward(inputs)