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

RuntimeError: Error(s) in loading state_dict for BertRe: Unexpected key(s) in state_dict: "bert.embeddings.position_ids". #4

Open
shui-di-star opened this issue Nov 4, 2023 · 3 comments

Comments

@shui-di-star
Copy link

将data_name改成dgre,然后运行predict.py,就报错RuntimeError: Error(s) in loading state_dict for BertRe:
Unexpected key(s) in state_dict: "bert.embeddings.position_ids". 但是data_name = duie就不报错,为什么呀?

@taishan1994
Copy link
Owner

确保加载模型的时候是正确的。

@xuanxuanxuanxuan
Copy link

训练和测试时候的环境要是一致的

@yukePeng0815
Copy link

将data_name改成dgre,然后运行predict.py,就报错RuntimeError: Error(s) in loading state_dict for BertRe: Unexpected key(s) in state_dict: "bert.embeddings.position_ids". 但是data_name = duie就不报错,为什么呀?
请问解决了吗?同问

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

4 participants