diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index d09be041c1..83adb3e2b9 100644 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -3167,7 +3167,7 @@ class ScatterUpdate(_ScatterOp_Dynamic): Inputs: - **input_x** (Parameter) - The target tensor, with data type of Parameter. - **indices** (Tensor) - The index of input tensor. With int32 data type. - If there are duplicates in indices, the order for updating is undefined. + If there are duplicates in indices, the order for updating is undefined. - **updates** (Tensor) - The tensor to update the input tensor, has the same type as input, and updates.shape = indices.shape + input_x.shape[1:]. diff --git a/mindspore/ops/operations/math_ops.py b/mindspore/ops/operations/math_ops.py index 0dcb49c84e..726b67df6b 100644 --- a/mindspore/ops/operations/math_ops.py +++ b/mindspore/ops/operations/math_ops.py @@ -3376,9 +3376,9 @@ class NMSWithMask(PrimitiveWithInfer): >>> inputs = Tensor(bbox, mindspore.float32) >>> nms = ops.NMSWithMask(0.5) >>> output_boxes, indices, mask = nms(inputs) - >>> print(output_boxes) - [[0.39990234 0.19995117 0.7998047 0.5 0.09997559] - [0.39990234 0.30004883 1. 1.0996094 0.7001953 ]] + >>> indices_np = indices.asnumpy() + >>> print(indices_np[mask.asnumpy()]) + [0 1] """ @prim_attr_register