Closed HelloWorldGitHubUser closed 2 years ago
请问在Seq2Seq模型中,把trg改为tensor类型后,出现以下报错: Traceback (most recent call last): File "E:\nlp-notebook-master\4-1.Seq2seq\train_eval.py", line 54, in trg, src = trg.to(device), src.to(device) AttributeError: 'NoneType' object has no attribute 'to' 是怎么回事呢?
看一下你的trg, src是不是tensor类型
我的也是这个问题,trg里有数据,src里是none。是不是数据读取或者tqdm那里读取据出问题了?
我也是这个问题,请问如何解决
请问在Seq2Seq模型中,把trg改为tensor类型后,出现以下报错: Traceback (most recent call last): File "E:\nlp-notebook-master\4-1.Seq2seq\train_eval.py", line 54, in
trg, src = trg.to(device), src.to(device)
AttributeError: 'NoneType' object has no attribute 'to'
是怎么回事呢?