• Computes cos of the input tf.Tensor element-wise: cos(x)

    const x = tf.tensor1d([0, Math.PI / 2, Math.PI * 3 / 4]);

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

    Type Parameters

    Parameters

    • x: TensorLike | T

      The input tensor. Must be float32 type.

    Returns T

    Doc

Generated using TypeDoc