forked from mindspore-Ecosystem/mindspore
add print comment and fix some example
This commit is contained in:
parent
d1b452cf3a
commit
08775a67e7
|
@ -65,7 +65,7 @@ class AllReduce(PrimitiveWithInfer):
|
|||
The contents depend on the specified operation.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore.communication.management import init
|
||||
>>> from mindspore.communication import init
|
||||
>>> import mindspore.ops.operations as P
|
||||
>>> init('nccl')
|
||||
>>> class Net(nn.Cell):
|
||||
|
@ -130,7 +130,7 @@ class AllGather(PrimitiveWithInfer):
|
|||
then the shape of output is :math:`(N, x_1, x_2, ..., x_R)`.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore.communication.management import init
|
||||
>>> from mindspore.communication import init
|
||||
>>> import mindspore.ops.operations as P
|
||||
>>> init('nccl')
|
||||
>>> class Net(nn.Cell):
|
||||
|
@ -187,7 +187,7 @@ class ReduceScatter(PrimitiveWithInfer):
|
|||
ValueError: If the first dimension of input can not be divided by rank size.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore.communication.management import init
|
||||
>>> from mindspore.communication import init
|
||||
>>> import mindspore.ops.operations as P
|
||||
>>> init('nccl')
|
||||
>>> class Net(nn.Cell):
|
||||
|
@ -252,7 +252,7 @@ class Broadcast(PrimitiveWithInfer):
|
|||
TypeError: If root_rank is not a integer or group is not a string.
|
||||
|
||||
Examples:
|
||||
>>> from mindspore.communication.management import init
|
||||
>>> from mindspore.communication import init
|
||||
>>> import mindspore.ops.operations as P
|
||||
>>> init('nccl')
|
||||
>>> class Net(nn.Cell):
|
||||
|
|
|
@ -161,6 +161,9 @@ class Print(PrimitiveWithInfer):
|
|||
"""
|
||||
Output tensor or string to stdout.
|
||||
|
||||
Note:
|
||||
The print operation cannot support float64 and bool types currently.
|
||||
|
||||
Inputs:
|
||||
- **input_x** (Union[Tensor, str]) - The graph node to attach to. The input supports
|
||||
multiple strings and tensors which are separated by ','.
|
||||
|
|
|
@ -120,7 +120,7 @@ class BoundingBoxDecode(PrimitiveWithInfer):
|
|||
|
||||
Examples:
|
||||
>>> boundingbox_decode = P.BoundingBoxDecode(means=(0.0, 0.0, 0.0, 0.0), stds=(1.0, 1.0, 1.0, 1.0),
|
||||
max_shape=(768, 1280), wh_ratio_clip=0.016)
|
||||
>>> max_shape=(768, 1280), wh_ratio_clip=0.016)
|
||||
>>> bbox = boundingbox_decode(anchor_box, deltas)
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue