作者,您好!
我按照环境文档要求,配置了环境变量,在您开源的例子:TNCC数据集上进行finetuning实验复现。 由于电脑配置限制,仅调小了batch_size的值,其余不变。出现以下问题:
Traceback (most recent call last):
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 221, in
main()
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 218, in main
trainer.run_finetune()
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 200, in run_finetune
self.train(model, train_loader, dev_loader, optimizer, schedule)
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 169, in train
dev_true, dev_pred = self.predict(model, valid_loader)
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 137, in predict
test_true.extend(y.squeeze().cpu().numpy().tolist())
TypeError: 'int' object is not iterable
作者,您好! 我按照环境文档要求,配置了环境变量,在您开源的例子:TNCC数据集上进行finetuning实验复现。 由于电脑配置限制,仅调小了batch_size的值,其余不变。出现以下问题: Traceback (most recent call last): File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 221, in
main()
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 218, in main
trainer.run_finetune()
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 200, in run_finetune
self.train(model, train_loader, dev_loader, optimizer, schedule)
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 169, in train
dev_true, dev_pred = self.predict(model, valid_loader)
File "G:/少数/CINO/Chinese-Minority-PLM-main/examples/TNCC/finetune/run_finetune.py", line 137, in predict
test_true.extend(y.squeeze().cpu().numpy().tolist())
TypeError: 'int' object is not iterable
Process finished with exit code 1
您能看看是什么原因吗?