I try to quantize my pretrained model from timm library. But it not work, so the question is why it not work and how to make timm models being quantized?
import timm 

model = timm.create_model('mobilenetv2_120d', pretrained=True)

model_int8 = torch.quantization.quantize_dynamic(
    model,  # the original model
    {torch.nn.Linear, torch.nn.Conv2d, torch.nn.ReLU, torch.nn.BatchNorm2d}, 
    dtype=torch.qint8) 

print_model_size(model)
print_model_size(model_int8)

23.74 MB
23.74 MB