train_loss, train_acc = train(model, sentiment_train_loader, optimizer, criterion, device) File "D:/p_got an u">
赞
踩
Traceback (most recent call last):
File "D:/program/PyChramWorkspace/CS224N/fine tune/TestSA.py", line 131, in <module>
train_loss, train_acc = train(model, sentiment_train_loader, optimizer, criterion, device)
File "D:/program/PyChramWorkspace/CS224N/fine tune/TestSA.py", line 83, in train
output = model(**tokenized_text, label=label)
File "D:\program\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'label'
output = model(**tokenized_text, label=label)
output = model(**tokenized_text, labels=label)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。