torch.sigmoid¶
-
torch.
sigmoid
(input, *, out=None) → Tensor¶ Returns a new tensor with the sigmoid of the elements of
input
.- Parameters
input (Tensor) – the input tensor.
- Keyword Arguments
out (Tensor, optional) – the output tensor.
Example:
>>> a = torch.randn(4) >>> a tensor([ 0.9213, 1.0887, -0.8858, -1.7683]) >>> torch.sigmoid(a) tensor([ 0.7153, 0.7481, 0.2920, 0.1458])