直接使用预训练模型报错
Describe the question
A clear and concise description of what the question is. 在学习框架时,RE和Ner的standard模型部分,参考教程直接使用预训练的模型进行预测,均报错
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.;使用自己训练好的模型就不会出问题。
Environment (please complete the following information):
- OS: [e.g. mac / window]windows10
- Python Version [e.g. 3.6]3.8 环境配置和推荐的一致
Screenshots
If applicable, add screenshots to help explain your problem.
NER句子: 《星空黑夜传奇》是连载于起点中文网的网络小说,作者是啤酒的罪孽 NER结果: Traceback (most recent call last): File ".\predict.py", line 14, in main result = model.predict(text) File "e:\data_study\nlp\deepke-main\src\deepke\name_entity_re\standard\models\InferBert.py", line 141, in predict tag[wordstype].append(''.join(tmp)) KeyError: 'YAS'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Additional context
Add any other context about the problem here.
你这可能没有用到最新的代码,可以git pull最新代码
明白了,感谢回复!
收到,感谢!!!