FakeQuantize#

class FakeQuantize(dtype, enable=True, **kwargs)[source]#

A module to do quant and dequant according to observer’s scale and zero_point.

Parameters:
  • dtype (Union[str, QuantDtypeMeta]) – a string or QuantDtypeMeta indicating the target quantization dtype of input.

  • enable (bool) – whether do normal_forward or fake_quant_forward.