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

Exporting FINN-ONNX from pre-trained network in PyTorch #537

Open
MJokar1643 opened this issue Feb 17, 2023 · 3 comments
Open

Exporting FINN-ONNX from pre-trained network in PyTorch #537

MJokar1643 opened this issue Feb 17, 2023 · 3 comments

Comments

@MJokar1643
Copy link

Hello;
Thank you for your wonderful tool.

Here it is said that to export FINN-ONNX, the network can be trained in PyTorch or Brevitas. As far as I looked in the tutorials, I did not see that FINN-ONNX was generated from a pre-trained network in PyTorch. Is there any example or documentation for this?

@Ba1tu3han
Copy link

Hello,

I'm looking for the same example. Did you find any document?

@MJokar1643
Copy link
Author

Hello,

No, unfortunately. I couldn't find an example. But I defined my own model and was able to produce FINN-ONNX in both training modes with PyTorch and training with Brevitas.

@Ba1tu3han
Copy link

Ba1tu3han commented Dec 10, 2023

Hello,

It is written here how to export basic model to ONNX format after training.

Weight-activation-bias model
export_onnx_qcdq(quant_weight_act_bias_lenet, torch.randn(1, 3, 32, 32), export_path='4b_weight_act_bias_lenet.onnx')

FINN expects FINN-ONNX and not all ONNX graphs are supported.

I could not find how to export to FINN-ONNX. Could you help me about in this point?

Best,

Batuhan

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

2 participants