-
Notifications
You must be signed in to change notification settings - Fork 154
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
ppv3_rec模型转换不成功 #50
Comments
|
|
转换成功了 感谢 |
暂时还没整理好,这周末看下 |
|
@AstonyJ svtr已更新。但请注意paddle的nn.Dropout(p=last_drop, mode="downscale_in_infer")的"downscale_in_infer"参数 |
|
所以楼主这个问题是怎么解决的呢,为什么会出现这个keyerror呢? |
楼主这个问题是怎么解决的呢,我现在转换也报这个错 |
1、转换的pp模型链接:
https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar
2、运行脚本:
python ./converter/ch_ppocr_v3_rec_converter.py
3、报错:
Traceback (most recent call last):
File "./converter/ch_ppocr_v3_rec_converter.py", line 60, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'Student.backbone.conv1._conv.weight'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./converter/ch_ppocr_v3_rec_converter.py", line 94, in
converter = PPOCRv3RecConverter(cfg, paddle_pretrained_model_path)
File "./converter/ch_ppocr_v3_rec_converter.py", line 22, in init
self.load_paddle_weights([para_state_dict, opti_state_dict])
File "./converter/ch_ppocr_v3_rec_converter.py", line 64, in load_paddle_weights
print('paddle: {}, {}'.format(ppname, para_state_dict[ppname].shape))
KeyError: 'Student.backbone.conv1._conv.weight'
The text was updated successfully, but these errors were encountered: