lukas-blecher / LaTeX-OCR

pix2tex: Using a ViT to convert images of equations into LaTeX code.
https://lukas-blecher.github.io/LaTeX-OCR/
MIT License
12.59k stars 1.03k forks source link

How to get the model with weights,Want to Export PyTorch model to ONNX format #264

Open tsharing00 opened 1 year ago

tsharing00 commented 1 year ago

Thank you for the hard work. As a beginner, I would like to export a complete network model (including structure and weights),and transform it into ONNX format,How to do it?Thanks.

pineking commented 1 year ago

https://github.com/lukas-blecher/LaTeX-OCR/blob/main/pix2tex/model/checkpoints/get_latest_checkpoint.py#L41

tranngocduvnvp commented 8 months ago

Hi all, I currently convert model Latex-OCR to ONNX sucessfully. The model's encoder and decoder are converted separately. Details about the code via Code If it's useful for your work please ⭐ my repo