描述错误
我正在使用UniLM-V1 https://github.com/microsoft/unilm/tree/master/unilm-v1/src/biunilm/decode_seq2seq.py进行生成,使用beam size 3处理印度语言,并遇到了上述错误。我的代码之前运行得很顺利(我猜是11月21日)。但现在它出现了这个错误。
- 平台:Linux
- Python版本:3.6
- PyTorch版本(GPU?):1.1.0
描述错误
我正在使用UniLM-V1 https://github.com/microsoft/unilm/tree/master/unilm-v1/src/biunilm/decode_seq2seq.py进行生成,使用beam size 3处理印度语言,并遇到了上述错误。我的代码之前运行得很顺利(我猜是11月21日)。但现在它出现了这个错误。
2条答案
按热度按时间4uqofj5v1#
错误信息丢失。
dgiusagp2#
文件 "/home/aniruddha/anaconda3/envs/rupak_qg/lib/python3.6/site-packages/torch/nn/modules/module.py",第1102行,在_call_impl函数中
return forward_call(*input, **kwargs)
文件 "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py",第1525行,在forward函数中
return self.beam_search(input_ids, token_type_ids, position_ids, attention_mask, task_idx=task_idx, mask_qkv=mask_qkv)
文件 "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py",第1732行,在beam_search函数中
prev_embedding, back_ptrs)
文件 "/home/aniruddha/Rupak_QG/meta_learning/pytorch_pretrained_bert/modeling.py",第1703行,在select_beam_items函数中
y = torch.gather(x, 1, ids)
运行时错误:gather(): 索引的预期数据类型为int64