sigmoid

dragon.math.sigmoid(
  inputs,
  inplace=False,
  **kwargs
)[source]

Compute the sigmoid result of input.

The Sigmoid function is defined as:

\[\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)} \]

Examples:

x = dragon.constant([0.2, 0.4, 0.6, 0.8, 1.0])
print(dragon.math.sigmoid(x))
Parameters:
  • inputs (dragon.Tensor) – The input tensor.
  • inplace (bool, optional, default=False) – Call in-place or return a new tensor.
Returns:

dragon.Tensor – The output tensor