This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: The questions about quantization aware training

Part Number: TDA4VM

Dear support,

     I have some questions about QAT method to get 8-bit model.

      1). I use "QuantTrainModule" to wrap my model, and use "model.module" to load my float model, but the error occurs as shown below —— Some keys can not be loaded. But when I use original model which is not  wrapped, it can load float model normally. Does the QuantTrainModule only support a part of layer? 

      2) If I use Pytorch's QAT method instead of TI's QAT method to get 8-bit pth model, and convert it to onnx model,will the values "scale" and "zero_point" be obtained correctly by TIDL tool? How should I set the config parameters in "tidl_import_config.txt"?

Regards,

Tommy

  • 1) QuantTrainModule inserts some range parameters into the model, which is not in the original model. That is why you are getting the warning that some keys are not loaded. This is expected and not an issue.

    2) Pytorch's QAT is not supported in TIDL at the moment. We will look into it to see how and for which SoCs this support can be added.