yusuketomoto / chainer-char-rnn

karpathy's char-rnn (https://github.com/karpathy/char-rnn) implementation by Chainer
MIT License
167 stars 62 forks source link

invalid type of embed #2

Closed icycandy closed 9 years ago

icycandy commented 9 years ago
[candy@f22] $ python sample.py --vocabulary data/tinyshakespeare/vocab.bin --model cv/charrnn_epoch_0.45.chainermodel
Traceback (most recent call last):
  File "sample.py", line 62, in <module>
    state, prob = model.predict(prev_char, state)
  File "/data1/olivertang/projects/chainer-char-rnn/CharRNN.py", line 36, in predict
    h0      = self.embed(x)
  File "build/bdist.linux-x86_64/egg/chainer/function.py", line 137, in __call__
  File "build/bdist.linux-x86_64/egg/chainer/function.py", line 191, in _check_data_type_forward
  File "build/bdist.linux-x86_64/egg/chainer/functions/embed_id.py", line 42, in check_type_forward
  File "build/bdist.linux-x86_64/egg/chainer/utils/type_check.py", line 457, in expect
  File "build/bdist.linux-x86_64/egg/chainer/utils/type_check.py", line 428, in expect
chainer.utils.type_check.InvalidType: Expect: in_types[0].dtype == <type 'numpy.int32'>
Actual: int64 != <type 'numpy.int32'>
icycandy commented 9 years ago

I submited a PR to resolve this issuse 730cd69

yusuketomoto commented 9 years ago

Many thanks!!