Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid operation is performed in: Concat (Forward) #1

Open
ikegami-yukino opened this issue May 12, 2017 · 0 comments
Open

Invalid operation is performed in: Concat (Forward) #1

ikegami-yukino opened this issue May 12, 2017 · 0 comments

Comments

@ikegami-yukino
Copy link

ikegami-yukino commented May 12, 2017

When executing ptb/gentext.py based my script using the model trained by train_ptb_nstep.py, then raise following error:

Traceback (most recent call last):
  File "predict.py", line 100, in <module>
    main()
  File "predict.py", line 77, in main
    prob = F.softmax(model.predictor(prev_word))
  File "/work/rnnlm/train.py", line 40, in __call__
    ex = self.embed(F.concat(xs, axis=0))
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/functions/array/concat.py", line 87, in concat
    return Concat(axis=axis)(*xs)
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/function.py", line 189, in __call__
    self._check_data_type_forward(in_data)
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/function.py", line 273, in _check_data_type_forward
    self.check_type_forward(in_type)
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/functions/array/concat.py", line 23, in check_type_forward
    type_check.Variable(self.axis, 'axis'))
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/utils/type_check.py", line 487, in expect
    expr.expect()
  File "/work/venv/py3/lib/python3.6/site-packages/chainer/utils/type_check.py", line 449, in expect
    '{0} {1} {2}'.format(left, self.inv, right))
chainer.utils.type_check.InvalidType: 
Invalid operation is performed in: Concat (Forward)

Expect: in_types[0].ndim > axis
Actual: 0 <= 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant