frotms / PaddleOCR2Pytorch

PaddleOCR inference in PyTorch. Converted from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
Apache License 2.0
877 stars 174 forks source link

请教一下,pytorch ocr crnn的resnet34 pth文件怎么转onnx? #64

Open nissansz opened 1 year ago

nissansz commented 1 year ago

请教一下,pytorch ocr crnn的resnet34 pth文件怎么转onnx?

frotms commented 1 year ago

构建好网络加载好权重后,用torch.onnx.export就可以转了

nissansz commented 1 year ago

怎么构建?有demo 代码吗?

frotms commented 1 year ago

按文档能推理起来,在推理代码后面加这一句就可以了

nissansz commented 1 year ago

infer可以成功,但是加上torch.onnx.export 报错