negative

dragon.vm.tensorflow.math.negative(
  x,
  name=None
)[source]

Compute the element-wise negative.

\[\text{out} = -\text{input} \]
x = tf.constant([-1, 0, 1])
print(tf.math.negative(x))
Parameters:
  • x (dragon.Tensor) – The input tensor.
  • name (str, optional) – The operation name.
Returns:

dragon.Tensor – The output tensor.