Replies: 1 comment 2 replies
-
Hello, Could you post a script to reproduce your issue? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm working with Brevitas to run simulations and need to load a trained QONNX model into a new notebook using Brevitas/PyTorch. However, I've encountered an issue.
I've successfully loaded the weights for layers such as conv1, conv2, fc1, fc2, and fc3 from a LeNet-5 model. However, I'm having trouble with the scale factors. For instance, the scale of model.relu1.act_quant is 0.003921568859368563, whereas the corresponding scale in the QONNX model is 0.023734445. Here's what I tried: model.relu1.act_quant.scale().item() = weights['/relu1/act_quant/export_handler/Constant_output_0']. This results in the following error: SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
I'm unsure how to update the scale parameters. How can I properly set the scale factor for the ReLU activation quantizer, for example?
Is there a specific method or approach for converting from ONNX to Brevitas that I might not be aware of?
Thanks in advance for any assistance!
Best,
Vylfrëd
Beta Was this translation helpful? Give feedback.
All reactions