-
Notifications
You must be signed in to change notification settings - Fork 525
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
load albert model error #147
Comments
您好,这是转换脚本中的一个bug,已经更新了转换脚本,您可以重新测试一下,非常感谢您对项目的关注 |
您好,我用了新的轉換腳本,後續有新的錯誤 使用之config.json為 |
您好,可以提供一下您的运行命令吗 |
https://github.com/autoliuweijie/K-BERT?utm_source=catalyzex.com |
有关albert的微调可以参考这里https://github.com/dbiir/UER-py/wiki/下游任务微调 |
hello冒昧打扰一下,想问一下你这里问题解决了嘛,我在用albert做pretrain model的时候出现了相同的问题 |
File "run_kbert_cls.py", line 261, in main
model.load_state_dict(torch.load(args.pretrained_model_path), strict=False)
File "/opt/conda/envs/phchen-k/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1044, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Model:
size mismatch for embedding.segment_embedding.weight: copying a param with shape torch.Size([1, 128]) from checkpoint, the shape in current model is torch.Size([3, 128]).
您好,
這是我載入albert-base-chinese 時發生的問題 ,使用的config.json為uer所提供之
{"emb_size": 128, "feedforward_size": 3072, "hidden_size": 768, "heads_num": 12, "layers_num": 12, "dropout": 0.0}
想請問這裡的segment_embedding 能由哪裡做修改? 很感謝妳們的付出 萬分感謝 stay safe
The text was updated successfully, but these errors were encountered: