AI Model Efficiency Toolkit (AIMET) Forum

Passing onnx to AIMET

I am working in a network architecture and to create an onnx of the .pth equivalent, I need to pass img_metas, however QuantSim() does not support this.
Is there a way to pass onnx directly to QuantSim() or to extend any existing class to override the way pth to onnx is generated?

Hi @akhobare
Could you please suggest how to proceed further? Thanks in Advance.

Hi @Selventhiran

AIMET does not support accepting a ONNX model as input.
For your use case, can you take a look at the code in QuantizationSimModel.export()

Perhaps we have to figure out a way to pass the sample model input (needed for tracing) more generically. If you can figure out the change needed, please submit a PR. Or update this issue with the necessary details.

If you cannot figure out a solution based on the above, we can look further. Will need more concrete details from you.