Run pytorch QAT quantized model on TVM

Thanks. Yes I tried the classification and the label results are the same. My current model is pixel-wise output(0~255) and I find a noticble difference between tvm and pytorch. Is there any model example provides a renference for the difference number?

I don’t know what you mean by that.

Sorry for the confusion. The current mobilenet example is for classification and outputs discrete labels. I mean is if there is a deployed model is for pixel-wise inference. Then compare the results on tvm and PyTorch we could know how different they are (pixel-wise).

I don’t know such models. Actually outside of quantized models in torchvision, I’m not aware of any public quantized PT models.

1 Like

@masahi I notice that all the ReLu6 in the mobilenet v2 is replaced with ReLU. I think one benefit to do that is we fuse the ReLU with conv(). Are there some other benefits to doing that?

We don’t really place relu6 by relu, both of them just lowered to clip https://github.com/apache/tvm/blob/e4946f470ca929ba350ebeaeb06b0812f705f186/python/tvm/relay/frontend/qnn_torch.py#L881-L888