Browse Source

!411 Modify examples of Cast/NMSWithMask

Merge pull request !411 from Simson/push-to-opensource
tags/v0.2.0-alpha
mindspore-ci-bot Gitee 5 years ago
parent
commit
f5aa3a2eab
2 changed files with 2 additions and 3 deletions
  1. +1
    -2
      mindspore/ops/operations/array_ops.py
  2. +1
    -1
      mindspore/ops/operations/math_ops.py

+ 1
- 2
mindspore/ops/operations/array_ops.py 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


+ 1
- 1
mindspore/ops/operations/math_ops.py 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)
"""


Loading…
Cancel
Save