From 69575e8ea563d1c42fd4fa676c1f856035d93664 Mon Sep 17 00:00:00 2001 From: dinglinhe Date: Mon, 12 Jul 2021 15:34:34 +0800 Subject: [PATCH] fix the wrong output in the Flatten and OneHot --- mindspore/nn/layer/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/nn/layer/basic.py b/mindspore/nn/layer/basic.py index 90ec67624e9..360692209e3 100644 --- a/mindspore/nn/layer/basic.py +++ b/mindspore/nn/layer/basic.py @@ -203,7 +203,7 @@ class Flatten(Cell): >>> print(f"before flatten the x shape is {x.shape}") before flatten the x shape is (2, 2, 2) >>> print(f"after flatten the output shape is {output.shape}") - after flatten the output shape is (2,4) + after flatten the output shape is (2, 4) """ def __init__(self): @@ -636,7 +636,7 @@ class OneHot(Cell): [1. 0. 0. 0.] [0. 0. 1. 0.]] >>> print(output.shape) - (4, 4) + (4, 4) """ def __init__(self, axis=-1, depth=1, on_value=1.0, off_value=0.0, dtype=mstype.float32):