module owlite.calib.histogram_calibrator
class HistogramCalibrator
Histogram Calibrator Class.
Attributes:
histograms
(list[torch.Tensor]
): list of histogram counts. Each element defaults to [0, ..., 0], len = 2048.bin_edges
(list[torch.Tensor]
): histogram edges. Each element defaults to [0, ..., 0], len = 2049.
method __init__
python
__init__(quantizer: 'FakeQuantizer')
Initialize for histogram calibrator.
method clear
python
clear() → None
Clear attributes of histogram(histogram
, bin_edges
) and registered forward_hook.
method prepare
python
prepare() → RemovableHandle
Prepare forward hook function.
method update
python
update() → None
Updated: 2024-06-13T23:42:41