I am trying to export a quantized int8 PyTorch model to ONNX from the following tutorial.
https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html
However, PyTorch to ONNX conversion of quantized models is not supported. Various types of quantized models will either explicitly say their conversion is not supported or they will throw an attribute error.
My question is — how do we do the conversion manually? Specifically, how do we define a custom mapping of ONNX operations for PyTorch classes? I assume the logic is the same for non-quantized layers, whose conversion needed to be defined until it was built-in, but I am having trouble finding an example.