• Computes rectified linear 6 element-wise: min(max(x, 0), 6).

    const x = tf.tensor1d([-1, 2, -3, 8]);

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

    Type Parameters

    Parameters

    • x: TensorLike | T

      The input tensor. If the dtype is bool, the output dtype will be int32.

    Returns T

    Doc

Generated using TypeDoc