From e53142af9ed7a77969adf8618577ff835053898e Mon Sep 17 00:00:00 2001 From: Keisuke Umezawa Date: Sat, 26 Aug 2017 16:04:16 +0900 Subject: [PATCH] fix parse error --- chainer/functions/array/reshape.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chainer/functions/array/reshape.py b/chainer/functions/array/reshape.py index f8a954f0b900..b48462e00e66 100644 --- a/chainer/functions/array/reshape.py +++ b/chainer/functions/array/reshape.py @@ -75,7 +75,7 @@ def reshape(x, shape): (8,) >>> y.data array([1, 2, 3, 4, 5, 6, 7, 8]) - >>> y = F.reshape(x, (4, -1)) # the shape of output is inferred + >>> y = F.reshape(x, (4, -1)) # the shape of output is inferred >>> y.shape (4, 2) >>> y.data @@ -83,11 +83,10 @@ def reshape(x, shape): [3, 4], [5, 6], [7, 8]]) - >>> y = F.reshape(x, (4, 3)) \ + >>> y = F.reshape(x, (4, 3)) \ # the shape of input and output are not consistent Traceback (most recent call last): - ... - chainer.utils.type_check.InvalidType: + ... Invalid operation is performed in: Reshape (Forward) Expect: prod(in_types[0].shape) == prod((4, 3)) Actual: 8 != 12