diff --git a/mindspore/ops/primitive.py b/mindspore/ops/primitive.py index 7e3df2639bc..c16577bce13 100644 --- a/mindspore/ops/primitive.py +++ b/mindspore/ops/primitive.py @@ -143,10 +143,10 @@ class Primitive(Primitive_): Args: stage (int): The stage id for the current operation. Example: - >>> from mindspore.ops import operations as P - >>> add = P.Add() - >>> print(add.set_stage(0)) - Prim[Add] + >>> from mindspore.ops import operations as P + >>> add = P.Add() + >>> print(add.set_stage(0)) + Prim[Add] """ self.add_prim_attr("stage", stage) return self @@ -162,10 +162,10 @@ class Primitive(Primitive_): Args: strategy (tuple): Strategy describes the distributed parallel mode of the current primitive. Example: - >>> from mindspore.ops import operations as P - >>> add = P.Add() - >>> print(add.shard(((1, 1), (1, 1)))) - Prim[Add] + >>> from mindspore.ops import operations as P + >>> add = P.Add() + >>> print(add.shard(((1, 1), (1, 1)))) + Prim[Add] """ mode = context.get_auto_parallel_context("parallel_mode") if strategy is not None: