negative

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

Compute the element-wise negative.

\[\text{out} = -x \]
x = dragon.constant([-1, 0, 1])
print(dragon.math.negative(x))
Parameters:
Returns:

dragon.Tensor – The output tensor.