qingkongzhiqian / GPT2-Summary

基于GPT2的中文摘要生成模型

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

求助 在GPU上用自己的数据训练模型,明明都to device了,结果还是会报RuntimeError错误

wasdfghjklr opened this issue · comments

把作者提供的train.py里的数据换成自己定义的,预训练模型用的是bert-large那个,在gpu上训练,no_cuda参数选择的False,代码里面的device部分以及模型和数据前的to(device)都没有改动,但是会报错
RuntimeError: Input, output and indices must be on the current device
有没有人遇到这种情况呢。。。

在前面的issue里有==