torch.ao.quantization.stubs#

QuantStub

Quantize stub module, before calibration, this is same as an observer, it will be swapped as nnq.Quantize in convert.

DeQuantStub

Dequantize stub module, before calibration, this is same as identity, this will be swapped as nnq.DeQuantize in convert.

QuantWrapper

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.