forked from mindspore-Ecosystem/mindspore
modify examples of Cast/NMSWithMask
This commit is contained in:
parent
51de42bc05
commit
10877f077e
|
@ -174,10 +174,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