megengine.quantization.apply_easy_quant#

apply_easy_quant(module, data, start=0.8, stop=1.2, num=40)[source]#

Implementation of EasyQuant: https://arxiv.org/pdf/2006.16669. Search for optimal scales.

Parameters:
  • module (Module) – root module.

  • data (Tensor) – input tensor used to search optimal scale.

  • start (float) – lower bound of the search interval.

  • stop (float) – upper bound of the search interval.

  • num (int) – number of samples to search.

  • module – Module: