Text-Summarizer-Pytorch-Chinese
Text-Summarizer-Pytorch-Chinese copied to clipboard
请问一下运行eval时报的错,怎末处理
Traceback (most recent call last):
File "D:/Text-Summarizer-Pytorch-Chinese-master/eval.py", line 171, in
IndexError: tensors used as indices must be long, byte or bool tensors
建议debug下
是用的win么?我也遇到了,应该是索引的问题,但是在linux就没报错
把 beams_order = best_scores_id.squeeze(1) / n_extended_vocab 改成 beams_order = best_scores_id.squeeze(1) // n_extended_vocab