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

训练产生CKPT之后该如何做 #287

Open
d0649855 opened this issue Oct 11, 2023 · 3 comments
Open

训练产生CKPT之后该如何做 #287

d0649855 opened this issue Oct 11, 2023 · 3 comments

Comments

@d0649855
Copy link

我在使用trainer产生出ckpt档之后该从哪边生成模型?
看之前的issue有人是直接调用ocr = CnOcr(model_fp="./lightning_logs/version_7/checkpoints/last.ckpt")
但是这个并不管用,也并不是实际调用该ckpt档案
有没有大佬或作者提示下一步方向该如何做 困扰好久

@d0649855
Copy link
Author

尝试使用cnocr resave -i ./last.ckpt -o ./my_model.onnx
产生出的onnx不能使用 用netron开模型看看起来也没有建模成功
ckpt从档案大小和训练过程看起来是没问题的..
是哪边出问题了 求个提示帮助

@BoAn-influxfin
Copy link

我遇到的error是[ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /home/boan/桌面/working_space/CnOCR-master/runs/CnOCR-Rec/iuin8j4n/checkpoints/cnocr-v2.3-densenet_lite_136-gru-epoch=025-val-complete_match-epoch=0.9345.ckpt failed:Protobuf parsing failed

train的過程完全沒報錯,求解

@BoAn-influxfin
Copy link

後來發現是參數要改成rec_model_backend='pytorch'

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

2 participants