cal_kl_threshold

paddle.fluid.contrib.slim.quantization.cal_kl_threshold. cal_kl_threshold ( hist, bin_width, bits ) [source]

Using the KL-divergenc method to get the more precise threshold.

Parameters
  • hist (List) – The hist of the tensor.

  • bin_width (float) – The bin width for the hist.

  • bits (int) – The quantization bits.