Computes step of the input tf.Tensor element-wise: x > 0 ? 1 : alpha
tf.Tensor
x > 0 ? 1 : alpha
const x = tf.tensor1d([0, 2, -1, -3]);x.step(.5).print(); // or tf.step(x, .5) Copy
const x = tf.tensor1d([0, 2, -1, -3]);x.step(.5).print(); // or tf.step(x, .5)
The input tensor.
Optional
The gradient when input is negative. Defaults to 0.
Generated using TypeDoc
Computes step of the input
tf.Tensor
element-wise:x > 0 ? 1 : alpha