!411 Modify examples of Cast/NMSWithMask

Merge pull request !411 from Simson/push-to-opensource
This commit is contained in:
mindspore-ci-bot 2020-04-17 15:12:55 +08:00 committed by Gitee
commit f5aa3a2eab
2 changed files with 2 additions and 3 deletions

View File

@ -175,10 +175,9 @@ class Cast(PrimitiveWithInfer):
Examples:
>>> input_np = np.random.randn(2, 3, 4, 5).astype(np.float32)
>>> input_x = Tensor(input_np)
>>> type_dst = mindspore.int32
>>> type_dst = mindspore.float16
>>> cast = P.Cast()
>>> result = cast(input_x, type_dst)
>>> expect = input_np.astype(type_dst)
"""
@prim_attr_register

View File

@ -1872,7 +1872,7 @@ class NMSWithMask(PrimitiveWithInfer):
>>> bbox = np.random.rand(128, 5)
>>> bbox[:, 2] += bbox[:, 0]
>>> bbox[:, 3] += bbox[:, 1]
>>> inputs = Tensor(bbox)
>>> inputs = Tensor(bbox, mindspore.float32)
>>> nms = P.NMSWithMask(0.5)
>>> output_boxes, indices, mask = nms(inputs)
"""