PICK-pytorch icon indicating copy to clipboard operation
PICK-pytorch copied to clipboard

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

Open thanhtung0406 opened this issue 3 years ago • 8 comments

I have used image

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

thanhtung0406 avatar Dec 02 '21 07:12 thanhtung0406

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

chriscpy avatar Dec 27 '21 07:12 chriscpy

@wenwenyu

chriscpy avatar Dec 27 '21 07:12 chriscpy

@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 avatar May 20 '22 09:05 xuanhaihust

@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

AtulKumar4 avatar Jun 27 '22 09:06 AtulKumar4

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

RahulJha11 avatar Nov 02 '22 06:11 RahulJha11

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.

xuanhaihust avatar Nov 07 '22 16:11 xuanhaihust

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

thanhsang298 avatar Mar 16 '23 04:03 thanhsang298

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

cqray1990 avatar Apr 16 '23 10:04 cqray1990