8000
您好,我在运行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"
谢谢!
把model(...)换成model.forward(...)试试
model(...)
model.forward(...)
Activity
YuChuXi commentedon May 13, 2023
把
model(...)换成model.forward(...)试试ziqing0701 commentedon May 13, 2023