Computes -1 * x element-wise.
-1 * x
const x = tf.tensor2d([1, 2, -2, 0], [2, 2]);x.neg().print(); // or tf.neg(x) Copy
const x = tf.tensor2d([1, 2, -2, 0], [2, 2]);x.neg().print(); // or tf.neg(x)
The input tensor.
Generated using TypeDoc
Computes
-1 * x
element-wise.