asyml / texar-pytorch

Integrating the Best of TF into PyTorch, for Machine Learning, Natural Language Processing, and Text Generation. This is part of the CASL project: http://casl-project.ai/
https://asyml.io
Apache License 2.0
744 stars 118 forks source link

texar-pytorch: RuntimeError: expected scalar type Long but found Float #327

Closed mufeiteng closed 3 years ago

mufeiteng commented 3 years ago

Screenshot from 2020-10-28 19-04-34

A error occurs when I run beam search decoder. And I think the error code should be line 490 in the picture. I think the correct code for this operation is: topk_beam_index = topk_ids // vocab_size

gpengzhi commented 3 years ago

Sorry for the late reply. We will take a look at it asap. Thank a lot for your interest in texar-pytorch!

TomNong commented 3 years ago

@mufeiteng sorry, this one was created by typo I think