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

valueerror: the length of ret_tokens can't match with labels #75

Closed
miaohaa opened this issue Jul 14, 2019 · 2 comments
Closed

valueerror: the length of ret_tokens can't match with labels #75

miaohaa opened this issue Jul 14, 2019 · 2 comments

Comments

@miaohaa
Copy link

miaohaa commented Jul 14, 2019

训练序列标注任务,自己构建的数据集合,和msra_ner一样格式,怎么会出现这句错误valueerror: the length of ret_tokens can't match with labels。ret_tokens是什么意思?可我确定 label的长度和text_a的长度相同了啊。

@Steffy-zxf
Copy link
Contributor

ret_tokens 是指文本经过tokenize处理后的文本。ernie应用于中文序列标注任务时,是针对每一个字进行处理,所以label应该也是对应于每个字的,label的长度需要和文本的字数保持一致。

@ZeyuChen
Copy link
Member

已和用户确定问题已解决。

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

3 participants