• Computes square of x element-wise: x ^ 2

    const x = tf.tensor1d([1, 2, Math.sqrt(2), -1]);

    x.square().print(); // or tf.square(x)

    Type Parameters

    Parameters

    Returns T

    Doc

Generated using TypeDoc