You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched related issues but cannot get the expected help.
I have read related documents and don't know what to do.
Describe the question you meet
I am trying to train a model using QAT. I use the default config files provided by MMRazor for the ResNet18 model and the QAT algorithm. The training seems to work well until I check what is inside the model. I see the observers for the weights but I can't see anything linked with activation quantization...
Can someone explain why? How can I check that the activation observers and the fake quant nodes exist in the quantized model?
Even after deploying and checking the onnx model, I see only FixedPerChannelAffine and Identity blocks corresponding to weight quantization, but nothing for activation quantization.
Post related information
The output of pip list | grep "mmcv\|mmrazor\|^torch"
Also in the get_deploy_model{ method of MMArchitectureQuant, I see that I should have this activation_post_process` blocks when printing the node names. However, I have this instead:
The issue was coming from TensorRT. It seems that this backend doesn't support activation quantization for some layers, such as maxpooling or add. When preparing the model using TensorRTQuantizer, the prepare() torch function (1.13.1 version) always return False when checking if the qconfig is supported by the backend for such layers (L1255). This results in no quantization for activations at all when checking the onnx file...
Checklist
Describe the question you meet
I am trying to train a model using QAT. I use the default config files provided by MMRazor for the ResNet18 model and the QAT algorithm. The training seems to work well until I check what is inside the model. I see the observers for the weights but I can't see anything linked with activation quantization...
Can someone explain why? How can I check that the activation observers and the fake quant nodes exist in the quantized model?
Even after deploying and checking the onnx model, I see only FixedPerChannelAffine and Identity blocks corresponding to weight quantization, but nothing for activation quantization.
Post related information
pip list | grep "mmcv\|mmrazor\|^torch"
When printing
self.qmodels['tensor'].head
, should I see the observers for the activation, isn't it? Instead I have:Also in the
get_deploy_model{ method of MMArchitectureQuant, I see that I should have this
activation_post_process` blocks when printing the node names. However, I have this instead:The text was updated successfully, but these errors were encountered: