module owlite.calib.entropy_calibrator
class EntropyCalibrator
EntropyCalibrator class.
The EntropyCalibrator compares the distribution of original data and the distribution of quantized data using KL divergence. When the original data $$ X $$ and the quantized data $$ X{quant} $$ is given, the $$step\size$$ is calculated as follow:
$$ step\size = \underset {step\size}{\operatorname{argmax}} \, KL \left( X || X_{quant} \right) $$
This approach minimizes the divergence between two distributions.
method __init__
python
__init__(quantizer: 'FakeINTQuantizer')
method update
python
update() → None
Update step_size using "entropy
".
Updated: 2024-06-13T23:42:41