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
如下代码,为什么这里要硬编码entitie_label == 2呢,如果关联关系里面正好没有值为2的这个关系,就会报错, 例如有4个label:{'a':1,'b':2,'c':3,'d':4},训练数据里的关系只有[(1,3),(1,4)],走到这一步时就会产生一个空集合,再往下面走就会报Floating point exception
代码位置如下: https://github.com/PaddlePaddle/PaddleNLP/blob/164896107fae422bb108eb48dc37dd0158aef88a/paddlenlp/transformers/layoutxlm/modeling.py#LL1163C57-L1163C57
all_possible_relations2 = all_possible_relations2[entitie_label == 2]
The text was updated successfully, but these errors were encountered:
请问您的paddle和paddlenlp的环境是什么?
Sorry, something went wrong.
wawltor
linjieccc
No branches or pull requests
请提出你的问题
如下代码,为什么这里要硬编码entitie_label == 2呢,如果关联关系里面正好没有值为2的这个关系,就会报错,
例如有4个label:{'a':1,'b':2,'c':3,'d':4},训练数据里的关系只有[(1,3),(1,4)],走到这一步时就会产生一个空集合,再往下面走就会报Floating point exception
代码位置如下:
https://github.com/PaddlePaddle/PaddleNLP/blob/164896107fae422bb108eb48dc37dd0158aef88a/paddlenlp/transformers/layoutxlm/modeling.py#LL1163C57-L1163C57
all_possible_relations2 = all_possible_relations2[entitie_label == 2]
The text was updated successfully, but these errors were encountered: