From 791442288cd7dc12b959f5109f566cec0734978c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E4=B8=87=E6=B2=A1=E6=83=B3=E5=88=B0?= Date: Tue, 14 Apr 2020 17:21:00 +0800 Subject: [PATCH] fix format typo in examples --- mindspore/ops/operations/control_ops.py | 4 ++-- mindspore/ops/operations/other_ops.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/ops/operations/control_ops.py b/mindspore/ops/operations/control_ops.py index d4e8b279ba..30f1e25a34 100644 --- a/mindspore/ops/operations/control_ops.py +++ b/mindspore/ops/operations/control_ops.py @@ -50,7 +50,7 @@ class ControlDepend(Primitive): >>> # step should be increased, so the add operation should depend on the data calculation operation. >>> class Net(nn.Cell): >>> def __init__(self): - >>> super(Net, self).__init__() + >>> super(Net, self).__init__() >>> self.global_step = mindspore.Parameter(initializer(0, [1]), name="global_step") >>> self.rate = 0.2 >>> self.control_depend = P.ControlDepend() @@ -89,7 +89,7 @@ class GeSwitch(PrimitiveWithInfer): Examples: >>> class Net(nn.Cell): >>> def __init__(self): - >>> super(Net, self).__init__() + >>> super(Net, self).__init__() >>> self.square = P.Square() >>> self.add = P.TensorAdd() >>> self.value = Tensor(np.full((1), 3), mindspore.float32) diff --git a/mindspore/ops/operations/other_ops.py b/mindspore/ops/operations/other_ops.py index 4ac7f2e554..b6182f0476 100644 --- a/mindspore/ops/operations/other_ops.py +++ b/mindspore/ops/operations/other_ops.py @@ -39,7 +39,7 @@ class Assign(PrimitiveWithInfer): >>> self.y = mindspore.Parameter(Tensor([1.0], mindspore.float32), name="y") >>> >>> def construct(self, x): - >>> Assign()(self.y, x) + >>> P.Assign()(self.y, x) >>> return x >>> x = Tensor([2.0], mindspore.float32) >>> net = Net()