Skip to content

Commit 6dccb6a

Browse files
authored
Fix the doc error of step operator (#7120)
1 parent 9d28deb commit 6dccb6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tfjs-core/src/ops/step.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ import {TensorLike} from '../types';
2626
import {op} from './operation';
2727

2828
/**
29-
* Computes step of the input `tf.Tensor` element-wise: `x > 0 ? 1 : alpha * x`
29+
* Computes step of the input `tf.Tensor` element-wise: `x > 0 ? 1 : alpha`
3030
*
3131
* ```js
3232
* const x = tf.tensor1d([0, 2, -1, -3]);
3333
*
3434
* x.step(.5).print(); // or tf.step(x, .5)
3535
* ```
3636
* @param x The input tensor.
37-
* @param alpha The gradient when input is negative.
37+
* @param alpha The gradient when input is negative. Defaults to 0.
3838
*
3939
* @doc {heading: 'Operations', subheading: 'Basic math'}
4040
*/

0 commit comments

Comments
 (0)