pub fn sigmoid<const D: usize>(tensor: Tensor<D>) -> Tensor<D>
Applies the sigmoid function element-wise.
sigmoid(x) = 1 / (1 + exp(-x))