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

How can I export .pth model to .onnx model? #107

Open
thanhtung0406 opened this issue Dec 2, 2021 · 8 comments
Open

How can I export .pth model to .onnx model? #107

thanhtung0406 opened this issue Dec 2, 2021 · 8 comments

Comments

@thanhtung0406
Copy link

I have used
image

But I can not export checkpoint to onnx model. Please help me!

@chriscpy
Copy link

@thanhtung0406 Have you solved this problem?I also encountered the same problem

@chriscpy
Copy link

@wenwenyu

@xuanhaihust
Copy link

xuanhaihust commented May 20, 2022

@thanhtung0406 Have you solved this problem?I also encountered the same problem

We solved it, but in a horrible way and you should not try.

@AtulKumar4
Copy link

AtulKumar4 commented Jun 27, 2022

@thanhtung0406 Have you solved this problem?I also encountered the same problem

We solved it, but in a horrible way and you should not try.

@xuanhaihust Could you share the steps if possible?
Thanks

@RahulJha11
Copy link

Hi @xuanhaihust, can you please share the steps for how to export .pth to onnx ? Or any one
solve this issue.

@xuanhaihust
Copy link

xuanhaihust commented Nov 7, 2022

Hi @RahulJha11, @AtulKumar4 Sorry for the late answer. We could not do it right away, but after break the model to smaller components, we did it and end up with 8 parts (7 .onnx files and 1 torch script).
If you want more details, contact me via Telegram @xuanhaihust or Linkedin @xuanhaihust also.

@thanhsang298
Copy link

Has anyone solved this problem? I also faced this problem.
Thank you

@cqray1990
Copy link

cqray1990 commented Apr 16, 2023

Hi @RahulJha11, @AtulKumar4 Sorry for the late answer. We could not do it right away, but after break the model to smaller components, we did it and end up with 8 parts (7 .onnx files and 1 torch script). If you want more details, contact me via Telegram @xuanhaihust or Linkedin @xuanhaihust also.

the model you convert to ,can infer by dynamic_axis ? torch.onnx.export(dynamic_axis=dynamic_axis)

@xuanhaihust whick version of pytorch and onnx you use when convert to onnx

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

7 participants