Browse Source

!10299 update the example of NMSWithMask operator and modify the format of description of ScatterUpdate operator.

From: @wangshuide2020
Reviewed-by: @liangchenghui,@wuxuejian
Signed-off-by: @liangchenghui
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
253e49543e
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      mindspore/ops/operations/array_ops.py
  2. +3
    -3
      mindspore/ops/operations/math_ops.py

+ 1
- 1
mindspore/ops/operations/array_ops.py View File

@@ -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:].



+ 3
- 3
mindspore/ops/operations/math_ops.py View File

@@ -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


Loading…
Cancel
Save