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

SymbolicValueError During 4-bit Quantized CNN ONNX Export with Brevitas #786

Closed
4 tasks done
Ba1tu3han opened this issue Dec 17, 2023 · 3 comments
Closed
4 tasks done

Comments

@Ba1tu3han
Copy link

Ba1tu3han commented Dec 17, 2023

Prerequisites

Please make sure to check off these prerequisites before submitting a bug report.

  • Test that the bug appears on the current version of the dev-branch. Make sure to include the commit hash of the commit you checked out.
  • Check that the issue hasn't already been reported, by checking the currently open issues.
  • If there are steps to reproduce the problem, make sure to write them down below.
  • If relevant, please include the ONNX files, which were created directly before and/or after the bug.

Quick summary

Encountering a SymbolicValueError during the export of a 4-bit quantized CNN model for MNIST dataset to ONNX format using Brevitas.

Details

Steps to Reproduce

Setup environment with the latest dev version of Brevitas.
Use the provided script for training a 4-bit quantized CNN on the MNIST dataset.
Attempt to export the trained model to ONNX format using export_qonnx function from Brevitas.
The script and the model architecture are as follows: [provide a brief description or a link to the script/model architecture].
The resulting ONNX file and the error log are attached.

Expected behavior

The model should be exported to ONNX format without any errors, allowing for further use in deployment scenarios.

Actual behavior

The export process fails with a SymbolicValueError, indicating an issue with shape inference for onnx.brevitas::Quant type in the exported graph.

Python code:
brevitas-export-4wab-QONNX.zip

image
image

@Giuseppe5
Copy link
Collaborator

Hello,

I have tried your script and everything works fine with the latest release of Brevitas (0.10).

What PyTorch/Brevitas versions are you using?

@Ba1tu3han
Copy link
Author

Hello,

I am using 0.9.1 Okay I will update it, thank you.

@Giuseppe5
Copy link
Collaborator

Happy to help!

Closing this, if the problem continues feel free to reopen.

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