From 60a28b45429424c48c8babcb8c0293f470c110f9 Mon Sep 17 00:00:00 2001 From: zhaozhenlong Date: Wed, 2 Dec 2020 09:46:31 +0800 Subject: [PATCH] add whitespace after comma --- mindspore/nn/layer/basic.py | 2 +- mindspore/nn/layer/image.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mindspore/nn/layer/basic.py b/mindspore/nn/layer/basic.py index 996e5513d95..361aba64d1b 100644 --- a/mindspore/nn/layer/basic.py +++ b/mindspore/nn/layer/basic.py @@ -530,7 +530,7 @@ class Pad(Cell): >>> class Net(nn.Cell): ... def __init__(self): ... super(Net, self).__init__() - ... self.pad = nn.Pad(paddings=((1,1),(2,2)), mode="CONSTANT") + ... self.pad = nn.Pad(paddings=((1, 1), (2, 2)), mode="CONSTANT") ... def construct(self, x): ... return self.pad(x) >>> x = np.random.random(size=(2, 3)).astype(np.float32) diff --git a/mindspore/nn/layer/image.py b/mindspore/nn/layer/image.py index 3a488d69c6a..ab60559d6d8 100644 --- a/mindspore/nn/layer/image.py +++ b/mindspore/nn/layer/image.py @@ -55,7 +55,7 @@ class ImageGradients(Cell): Examples: >>> net = nn.ImageGradients() - >>> image = Tensor(np.array([[[[1,2],[3,4]]]]), dtype=mindspore.int32) + >>> image = Tensor(np.array([[[[1, 2], [3, 4]]]]), dtype=mindspore.int32) >>> output = net(image) >>> print(output) (Tensor(shape=[1, 1, 2, 2], dtype=Int32, value= @@ -219,8 +219,8 @@ class SSIM(Cell): Examples: >>> net = nn.SSIM() - >>> img1 = Tensor(np.random.random((1,3,16,16)), mindspore.float32) - >>> img2 = Tensor(np.random.random((1,3,16,16)), mindspore.float32) + >>> img1 = Tensor(np.random.random((1, 3, 16, 16)), mindspore.float32) + >>> img2 = Tensor(np.random.random((1, 3, 16, 16)), mindspore.float32) >>> output = net(img1, img2) >>> print(output) [0.12174469] @@ -394,8 +394,8 @@ class PSNR(Cell): Examples: >>> net = nn.PSNR() - >>> img1 = Tensor(np.random.random((1,3,16,16))) - >>> img2 = Tensor(np.random.random((1,3,16,16))) + >>> img1 = Tensor(np.random.random((1, 3, 16, 16))) + >>> img2 = Tensor(np.random.random((1, 3, 16, 16))) >>> output = net(img1, img2) >>> print(output) [7.7229595]