abs

dragon.math.abs(
  inputs,
  **kwargs
)[source]

Compute the absolute value of input.

\[\text{out} = \left| x \right| \]

Examples:

x = dragon.constant([-1, 0, 1])
print(dragon.math.abs(x))  # [1, 0, 1]
Parameters:
Returns:

dragon.Tensor – The output tensor.