penghuic:

File “/home/xxx/python3.7/site-packages/torch/quantization/quantize_jit.py”, line 58, in _prepare_jit
quant_type)
RuntimeError: torch.torch.nn.modules.conv.___torch_mangle_67.Conv2d (of Python compilation unit at: 0x56088f811c00) is not compatible with the type torch.torch.nn.modules.conv.___torch_mangle_66.Conv2d (of Python compilation unit at: 0x56088f811c00) for the field ‘conv1’


prepare_jit/convert_jit is no longer being maintained, for automatic quantization please try fx graph mode quantization: (prototype) FX Graph Mode Post Training Static Quantization — PyTorch Tutorials 1.8.0 documentation 3
if you encounter problems with symbolic tracing, you can take a look at: (prototype) FX Graph Mode Quantization User Guide — PyTorch Tutorials 1.8.0 documentation 2