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
- paddlepaddle: - paddlepaddle-gpu: 2.4.2.post116 - paddlenlp: 2.5.2.post0
在文本分类任务中,使用zero_shot_text_classification和text_classification里的multi_label各训练一个多分类模型,发现两者的准确率相差巨大,通过代码发现zero_shot_text_classification里计算准确率的方法compute_metrics会把多分类的one-hot全部展开为一维,导致macro_f1值偏高很多,而multi_label里的准确率计算是正确的。
文件:applications/zero_shot_text_classification/run_eval.py 将如下代码: preds = preds[labels != -100].numpy() labels = labels[labels != -100].numpy() 改为: preds = preds.numpy() labels = labels.numpy() 即可正常
The text was updated successfully, but these errors were encountered:
lugimzzz
No branches or pull requests
软件环境
重复问题
错误描述
稳定复现步骤 & 代码
文件:applications/zero_shot_text_classification/run_eval.py
将如下代码:
preds = preds[labels != -100].numpy()
labels = labels[labels != -100].numpy()
改为:
preds = preds.numpy()
labels = labels.numpy()
即可正常
The text was updated successfully, but these errors were encountered: