New issue
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
NER模型预测为空 #160
Comments
请问您标注了多少数据,模型训练需要大约数千条样本。 |
可能是我的训练集太少了,几百条的量,但是为什么测试train data 也是空呢? |
如果train 也是空的话建议您打印loss看一下,是否学习率等超参数设置的不合理,loss 如果一直下降的话多跑几个epoch 是可以对train 预测出结果的 |
我再查看一下代码吧。因为是我一个人标注,我之后会尝试一些弱标注的方案。这批数据集我在wandb上查看loss,发现有飙升的情况。因此已经尝试过设定新的epochs和学习率,但是traindata没有预测结果的情况依然没有改变。另外我认为已经是traindata了,和学习率已经没关系了,但是我没有找到问题的原因在哪里。总之感谢您的帮助,有不懂的再来请教。感谢。 |
另外请问,学习率是配置文件中的哪个参数,我怕我是不是该错位置了。 |
learning_rate: 1e-3 |
这个可能是应为你模型预测出的结果都是‘o’即没有识别出per, org等自己设计的标签, 建议换一下predict的文本数据。 |
收到,感谢您的帮助。我最近又会涉及到NER的任务。会再尝试检查问题。
qinglongheu ***@***.***> 于2022年12月13日周二 17:24写道:
… *Describe the question*
我标注了一些数据,但是无论怎样,执行predict后,预测的实体都是空。甚至尝试预测了train data中的一条数据,结果同样为空。
我使用是 standard NER模型。
使用的预训练模型是在配置文件中是这样的,配置在文件夹的这里:\conf\hydra\model\bert.yaml,在这个文件中配置了我本地的pre
model
我不清楚是哪里出了问题。
*Environment (please complete the following information):*
- OS: [e.g. mac / window]
- Python Version [e.g. 3.6]
*Screenshots*
If applicable, add screenshots to help explain your problem.
*Additional context*
Add any other context about the problem here.
这个可能是应为你模型预测出的结果都是‘o’即没有识别出per, org等自己设计的标签, 建议换一下predict的文本数据。
—
Reply to this email directly, view it on GitHub
<#160 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTUTZ5VTJI5RLK67JHAPOLWNA6FRANCNFSM6AAAAAARJRKCS4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Describe the question
我不清楚是哪里出了问题。
Environment (please complete the following information):
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: