forked from OSSInnovation/mindspore
!411 Modify examples of Cast/NMSWithMask
Merge pull request !411 from Simson/push-to-opensource
This commit is contained in:
commit
f5aa3a2eab
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue