Fast Adjustable Threshold For Uniform Neural Network Quantization (Winning solution of LPIRC-II)

Alexander Goncharenko, Andrey Denisov, Sergey Alyamkin, Evgeny Terentev
12/19/2018
cs.LGstat.ML

Official code: agoncharenko1992/FAT-fast-adjustable-threshold (19 stars, TensorFlow, last commit 2018-12-20).

Abstract

Neural network quantization procedure is the necessary step for porting of neural networks to mobile devices. Quantization allows accelerating the inference, reducing memory consumption and model size. It can be performed without fine-tuning using calibration procedure (calculation of parameters necessary for quantization), or it is possible to train the network with quantization from scratch. Training with quantization from scratch on the labeled data is rather long and resource-consuming procedure. Quantization of network without fine-tuning leads to accuracy drop because of outliers which appear during the calibration. In this article we suggest to simplify the quantization procedure significantly by introducing the trained scale factors for quantization thresholds. It allows speeding up the process of quantization with fine-tuning up to 8 epochs as well as reducing the requirements to the set of train images. By our knowledge, the proposed method allowed us to get the first public available quantized version of MNAS without significant accuracy reduction - 74.8% vs 75.3% for original full-precision network. Model and code are ready for use and available at: https://github.com/agoncharenko1992/FAT-fast_adjustable_threshold.

View on arXivView PDF

Code Implementations(1)

TensorFlow

This is th code to FAT method with links to quantized tflite models. (CC BY-NC-ND)

198Python, Jupyter NotebookNov 23, 20187 years ago
python3tensorflowtflite

Similar Papers

Cite this paper

@article{goncharenko2018fast,
  title  = {Fast Adjustable Threshold For Uniform Neural Network Quantization (Winning solution of LPIRC-II)},
  author = {Alexander Goncharenko and Andrey Denisov and Sergey Alyamkin and Evgeny Terentev},
  year   = {2018},
  eprint = {1812.07872},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1812.07872}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1812.07872.svg)](https://codeofpaper.com/paper/1812.07872)

Discussion