Caffe2 - C++ API
A deep learning, cross platform ML framework
kl_minimization.h
1 #pragma once
2 
3 #include "quantization_error_minimization.h"
4 
5 namespace dnnlowp {
6 
11  public:
12  TensorQuantizationParams ChooseQuantizationParams(
13  const Histogram& hist,
14  bool preserve_sparsity = false,
15  int precision = 8) override;
16 };
17 
18 } // namespace dnnlowp
A quantization scheme that minimizes Kullback-Leiber divergence.
bin_width = (max - min)/nbins ith bin (zero-based indexing) contains [i*bin_width, (i+1)*bin_width) with an exception that (nbins - 1)th bin contains [(nbins-1)*bin_width, nbins*bin_width]