tf.math.negative

Computes numerical negative value element-wise.

tf.math.negative(
    x, name=None
)

I.e., \(y = -x\).

Args:

Returns:

A Tensor. Has the same type as x.

If x is a SparseTensor, returns SparseTensor(x.indices, tf.math.negative(x.values, ...), x.dense_shape)