wenwenyu / PICK-pytorch

Code for the paper "PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks" (ICPR 2020)
https://arxiv.org/abs/2004.07464
MIT License
553 stars 191 forks source link

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

Open thanhtung0406 opened 2 years ago

thanhtung0406 commented 2 years ago

I have used image

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

chriscpy commented 2 years ago

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

chriscpy commented 2 years ago

@wenwenyu

xuanhaihust commented 2 years ago

@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 commented 2 years ago

@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 commented 1 year ago

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

xuanhaihust commented 1 year ago

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 commented 1 year ago

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

cqray1990 commented 1 year ago

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