Skip to content
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

运行main.py --model bert_bilstm_crf_adv --data msra,msr 时报错: #13

Open
desfc opened this issue Jul 21, 2022 · 3 comments
Open

Comments

@desfc
Copy link

desfc commented Jul 21, 2022

No description provided.

@desfc
Copy link
Author

desfc commented Jul 21, 2022

报错内容:
………………
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,0] = 57 is not in [0, 49)
[[{{node task2_msr/crf_layer/GatherV2_1}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/kg_projects/ChineseNER-bert-bilstm-crf/ChineseNER-main/main.py", line 150, in
multitask_train(args)
File "E:/kg_projects/ChineseNER-bert-bilstm-crf/ChineseNER-main/main.py", line 110, in multitask_train
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
File "C:\Users\return0.conda\envs\ChineseNER-main\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 473, in train_and_evaluate
return executor.run()
………………
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,0] = 57 is not in [0, 49)
[[node task2_msr/crf_layer/GatherV2_1 (defined at E:\kg_projects\ChineseNER-bert-bilstm-crf\ChineseNER-main\tools\layer.py:126) ]]
………………

请问是什么原因呀?

@desfc
Copy link
Author

desfc commented Jul 21, 2022

感觉出现这个报错的原因是msr数据集。因为多任务NER只要使用msr数据集就会报上面的错,但是单任务NER使用msr数据集却不会报错。
此外使用bert_bilstm_crf_adv模型进行其它多任务NER并不会报这个错,msra数据集用在其它NER任务中也不会报错

@DSXiangLi
Copy link
Owner

@fengxuefx 辛苦发一下你的运行脚本吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants