Open Aniruddha-JU opened 1 year ago
The error message is missing.
File "/home/aniruddha/anaconda3/envs/rupak_qg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py", line 1525, in forward return self.beam_search(input_ids, token_type_ids, position_ids, attention_mask, task_idx=task_idx, mask_qkv=mask_qkv) File "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py", line 1732, in beam_search prev_embedding, back_ptrs) File "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py", line 1703, in select_beam_items y = torch.gather(x, 1, ids) RuntimeError: gather(): Expected dtype int64 for index
Describe the bug I am using UniLM-V1 https://github.com/microsoft/unilm/tree/master/unilm-v1/src/biunilm/decode_seq2seq.py. for generation using beam size 3 for indian languages, and getting above error. My code was running successfully earlier (I guess Novembe,21). But now it is getting this error.