sigmoid

dragon.vm.torch.nn.functional.sigmoid(
  input,
  inplace=False
)[source]

Apply the sigmoid function to input.

The Sigmoid function is defined as:

\[\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)} \]
Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • inplace (bool, optional, default=False) – Whether to do the operation in-place.
Returns:

dragon.vm.torch.Tensor – The output tensor.