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

This commit is contained in:
wangshuide2020 2020-12-21 20:20:59 +08:00
parent 7273864945
commit 3d1647d770
2 changed files with 4 additions and 4 deletions

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

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