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