Skip to content

Commit

Permalink
Fix the doc error of step operator
Browse files Browse the repository at this point in the history
  • Loading branch information
xhcao committed Dec 1, 2022
1 parent 9d28deb commit 6f05027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tfjs-core/src/ops/step.ts
Expand Up @@ -26,15 +26,15 @@ import {TensorLike} from '../types';
import {op} from './operation';

/**
* Computes step of the input `tf.Tensor` element-wise: `x > 0 ? 1 : alpha * x`
* Computes step of the input `tf.Tensor` element-wise: `x > 0 ? 1 : alpha`
*
* ```js
* const x = tf.tensor1d([0, 2, -1, -3]);
*
* x.step(.5).print(); // or tf.step(x, .5)
* ```
* @param x The input tensor.
* @param alpha The gradient when input is negative.
* @param alpha The gradient when input is negative. Defaults to 0.
*
* @doc {heading: 'Operations', subheading: 'Basic math'}
*/
Expand Down

0 comments on commit 6f05027

Please sign in to comment.