Skip to content

Commit

Permalink
fix parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
keisuke-umezawa committed Aug 26, 2017
1 parent 3b0fe15 commit e53142a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions chainer/functions/array/reshape.py
Expand Up @@ -75,19 +75,18 @@ 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
array([[1, 2],
[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
Expand Down

0 comments on commit e53142a

Please sign in to comment.