We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,我在运行train()时报错 TypeError: unsupported operand type(s) for /: 'str' and 'int' (lm_loss), *_ = model(input_ids, labels=lm_labels, token_type_ids=token_type_ids) loss = lm_loss / args.gradient_accumulation_steps
debug发现lm_loss 是str类型,请问是哪里出错了。 用的预训练thu-coai/CDial-GPT_LCCC-base模型,"--data_path"是"data/STC.json"
谢谢!
The text was updated successfully, but these errors were encountered:
把model(...)换成model.forward(...)试试
model(...)
model.forward(...)
Sorry, something went wrong.
No branches or pull requests
您好,我在运行train()时报错 TypeError: unsupported operand type(s) for /: 'str' and 'int'
(lm_loss), *_ = model(input_ids, labels=lm_labels, token_type_ids=token_type_ids)
loss = lm_loss / args.gradient_accumulation_steps
debug发现lm_loss 是str类型,请问是哪里出错了。
用的预训练thu-coai/CDial-GPT_LCCC-base模型,"--data_path"是"data/STC.json"
谢谢!
The text was updated successfully, but these errors were encountered: