iflytek / cino

CINO: Pre-trained Language Models for Chinese Minority (少数民族语言预训练模型)
http://cino.hfl-rc.com
Apache License 2.0
212 stars 28 forks source link

TNCC数据集上实验例子报错 #15

Closed qq260612718 closed 2 years ago

qq260612718 commented 2 years ago

作者,您好! 我按照环境文档要求,配置了环境变量,在您开源的例子: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

您能看看是什么原因吗?

GeekDream-x commented 2 years ago

您好,感谢反馈。是由于batch_size调小引起的,已修复,请使用最新版示例代码进行尝试~