!14659 update document of Select

From: @dinglinhe123
Reviewed-by: @liangchenghui,@wuxuejian
Signed-off-by: @liangchenghui
pull/14659/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 3404ea7345

@ -2752,15 +2752,14 @@ class Select(PrimitiveWithInfer):
Returns the selected elements, either from input :math:`x` or input :math:`y`, depending on the `condition`.
Given a tensor as input, this operation inserts a dimension of 1 at the dimension,
if both :math:`x` and :math:`y` are none, the operation returns the coordinates of the true
element in the `condition`, the coordinates are returned as a two-dimensional
tensor, where the first dimension (row) represents the number of true elements
and the second dimension (columns) represents the coordinates of the true
it was invalid when both math: 'x' and math: 'y' are none,
the coordinates are returned as a two-dimensional tensor, where the first dimension (row) represents
the number of true elements and the second dimension (columns) represents the coordinates of the true
elements. Keep in mind that the shape of the output tensor can vary depending
on how many true values are in the input. Indexes are output in row-first
order.
If neither is None, :math:`x` and :math:`y` must have the same shape. If :math:`x` and :math:`y` are
math:`x` and :math:`y` must have the same shape. If :math:`x` and :math:`y` are
scalars, the conditional tensor must be a scalar. If :math:`x` and :math:`y` are
higher-dimensional vectors, the `condition` must be a vector whose size matches the
first dimension of :math:`x`, or must have the same shape as :math:`y`.

@ -2246,21 +2246,21 @@ class MulNoNan(_MathBinaryOp):
When the inputs are one tensor and one scalar, the scalar could only be a constant.
Note:
The shapes of X and y should be same or can be broadcasting.
The shapes of x and y should be same or can be broadcasted.
Inputs:
- **input_x** (Union[Tensor]) - The first input is a tensor whose data type is number.
- **input_y** (Union[Tensor]) - The second input is a tensor whose data type is number.
- **input_x** (Union[Tensor]) - The first input is a tensor whose data type is number or scalar.
- **input_y** (Union[Tensor]) - The second input is a tensor whose data type is number or scalar.
Outputs:
Tensor, the shape is the same as the one after broadcasting,
and the data type is the one with higher precision or higher digits among the two inputs.
Tensor, the shape is same to the shape after broadcasting,
the data type is the number with higher precision or higher digits in the two inputs.
Supported Platforms:
``Ascend``
Raise:
TypeError: If x or y is a bool tensor.
TypeError: If neither `input_x` nor `input_y` is a bool tensor.
Examples:
>>> x = Tensor(np.array([[-1.0, 6.0, np.inf], [np.nan, -7.0, 4.0]]), ms.float32)

Loading…
Cancel
Save