You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/work/doc2query/./OpenNMT-py/translate.py", line 46, in <module>
main(opt)
File "/home/work/doc2query/./OpenNMT-py/translate.py", line 25, in main
translator.translate(
File "/home/work/doc2query/OpenNMT-py/onmt/translate/translator.py", line 314, in translate
batch_data = self.translate_batch(
File "/home/work/doc2query/OpenNMT-py/onmt/translate/translator.py", line 498, in translate_batch
return self._translate_batch(
File "/home/work/doc2query/OpenNMT-py/onmt/translate/translator.py", line 650, in _translate_batch
beam.advance(log_probs, attn)
File "/home/work/doc2query/OpenNMT-py/onmt/translate/beam_search.py", line 155, in advance
torch.div(self.topk_ids, vocab_size, out=self._batch_index)
RuntimeError: result type Float can't be cast to the desired output type Long
Sorry for the rudimentary question.
For predicting queries, I run the following code as instructed in README.md:
Then, I got an error as follows:
ref:
It seems dtype of
self._batch_index
istorch.float
, but it causes another error.Does anyone know how to fix it?
Thanks in advance!
The text was updated successfully, but these errors were encountered: