torch.ao.quantization.observer.FixedQParamsObserver#

class torch.ao.quantization.observer.FixedQParamsObserver(scale, zero_point, dtype=torch.quint8, qscheme=torch.per_tensor_affine, quant_min=0, quant_max=255)[源代码]#

Observer that simulates quantize and dequantize with fixed quantization parameters in training time. Only per tensor quantization is supported.

参数
  • scale (float) – fixed scale for the observer

  • zero_point (int) – fixed zero point for the observer

  • dtype

  • qscheme

  • quant_min

  • quant_max