Trained Quantization Thresholds for Accurate and Efficient Fixed-Point Inference of Deep Neural Networks

Sambhav R. Jain, Albert Gural, Michael Wu, Chris H. Dick
3/19/2019
180 citations
cs.CVcs.AIcs.LG

Official code: Xilinx/graffitist (170 stars, Python, TensorFlow, last commit 2019-12-09).

Abstract

We propose a method of training quantization thresholds (TQT) for uniform symmetric quantizers using standard backpropagation and gradient descent. Contrary to prior work, we show that a careful analysis of the straight-through estimator for threshold gradients allows for a natural range-precision trade-off leading to better optima.

Show full abstract

Our quantizers are constrained to use power-of-2 scale-factors and per-tensor scaling of weights and activations to make it amenable for hardware implementations. We present analytical support for the general robustness of our methods and empirically validate them on various CNNs for ImageNet classification. We are able to achieve near-floating-point accuracy on traditionally difficult networks such as MobileNets with less than 5 epochs of quantized (8-bit) retraining. Finally, we present Graffitist, a framework that enables automatic quantization of TensorFlow graphs for TQT (available at https://github.com/Xilinx/graffitist ).

View on arXivView PDF

Code Implementations(1)

Xilinx/graffitistOfficial100%
TensorFlow

Graph Transforms to Quantize and Retrain Deep Neural Nets in TensorFlow

17035PythonFeb 26, 20196 years agoNOASSERTION
deep-neural-networksquantizationretrainingtensorflow

Similar Papers

Cite this paper

@article{jain2019trained,
  title  = {Trained Quantization Thresholds for Accurate and Efficient Fixed-Point Inference of Deep Neural Networks},
  author = {Sambhav R. Jain and Albert Gural and Michael Wu and Chris H. Dick},
  year   = {2019},
  eprint = {1903.08066},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1903.08066}
}

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/1903.08066.svg)](https://codeofpaper.com/paper/1903.08066)

Discussion