torch.ao.quantization.stubs#
Quantize stub module, before calibration, this is same as an observer, it will be swapped as nnq.Quantize in convert. |
|
Dequantize stub module, before calibration, this is same as identity, this will be swapped as nnq.DeQuantize in convert. |
|
A wrapper class that wraps the input module, adds QuantStub and DeQuantStub and surround the call to module with call to quant and dequant modules. |