THUNLP-MT / THUMT

An open-source neural machine translation toolkit developed by Tsinghua Natural Language Processing Group
BSD 3-Clause "New" or "Revised" License
701 stars 197 forks source link

pytorch version ? Providing a bool or integral fill value without setting the optional `dtype` or `out` arguments is currently unsupported. In PyTorch 1.7, #103

Open anbo724 opened 3 years ago

anbo724 commented 3 years ago

训练报错 Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported. In PyTorch 1.7, 什么版本的pytoch可以使用?

GrittyChen commented 3 years ago

训练报错 Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported. In PyTorch 1.7, 什么版本的pytoch可以使用?

可以考虑使用低版本的PyTorch,比如1.4版本,如果方便的话,请告知一下具体报错的代码位置,我们会尽快修复这个bug,谢谢!

leileilin commented 2 years ago

训练报错 Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported. In PyTorch 1.7, 什么版本的pytoch可以使用?

可以考虑使用低版本的PyTorch,比如1.4版本,如果方便的话,请告知一下具体报错的代码位置,我们会尽快修复这个bug,谢谢!

在inference.py中的init_seqs = torch.full([batch_size, beam_size, 1], bos_id, device=device)加上dtype=torch.long应该可以解决。