torch.ao.quantization.observer.ObserverBase#
- class torch.ao.quantization.observer.ObserverBase(dtype)[源代码]#
Base observer Module. Any observer implementation should derive from this class.
Concrete observers should follow the same API. In forward, they will update the statistics of the observed Tensor. And they should provide a calculate_qparams function that computes the quantization parameters given the collected statistics.
- 参数
dtype – Quantized data type