Computes rectified linear 6 element-wise: min(max(x, 0), 6).
min(max(x, 0), 6)
const x = tf.tensor1d([-1, 2, -3, 8]);x.relu6().print(); // or tf.relu6(x) Copy
const x = tf.tensor1d([-1, 2, -3, 8]);x.relu6().print(); // or tf.relu6(x)
The input tensor. If the dtype is bool, the output dtype will be int32.
bool
int32
Generated using TypeDoc
Computes rectified linear 6 element-wise:
min(max(x, 0), 6)
.