Computes square of x element-wise: x ^ 2
x
x ^ 2
const x = tf.tensor1d([1, 2, Math.sqrt(2), -1]);x.square().print(); // or tf.square(x) Copy
const x = tf.tensor1d([1, 2, Math.sqrt(2), -1]);x.square().print(); // or tf.square(x)
The input Tensor.
Generated using TypeDoc
Computes square of
x
element-wise:x ^ 2