Paper Reading AI Learner

Trained Uniform Quantization for Accurate and Efficient Neural Network Inference on Fixed-Point Hardware

2019-03-19 15:50:24
Sambhav R. Jain, Albert Gural, Michael Wu, Chris Dick

Abstract

We propose a method of training quantization clipping thresholds for uniform symmetric quantizers using standard backpropagation and gradient descent. Our quantizers are constrained to use power-of-2 scale-factors and per-tensor scaling for weights and activations. These constraints make our methods better suited for hardware implementations. Training with these difficult constraints is enabled by a combination of three techniques: using accurate threshold gradients to achieve range-precision trade-off, training thresholds in log-domain, and training with an adaptive gradient optimizer. We refer to this collection of techniques as Adaptive-Gradient Log-domain Threshold Training (ALT). 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 floating-point or near-floating-point accuracy on traditionally difficult networks such as MobileNets in less than 5 epochs of quantized (8-bit) retraining. Finally, we present Graffitist, a framework that enables immediate quantization of TensorFlow graphs using our methods. Code available at https://github.com/Xilinx/graffitist .

Abstract (translated)

提出了一种利用标准反向传播和梯度下降训练均匀对称量化器量化削波阈值的方法。我们的量化器被限制使用2次幂因子和每张量标度的权重和激活。这些约束使我们的方法更适合硬件实现。利用这些困难的约束进行训练可以通过以下三种技术的组合来实现:使用精确的阈值梯度来实现范围精度权衡,在对数域中训练阈值,以及使用自适应梯度优化器进行训练。我们将这些技术集合称为自适应梯度对数域阈值训练(alt)。我们对我们的方法的一般稳健性提供了分析支持,并在各种CNN上对其进行了经验验证,以用于图像网分类。我们能够在传统的困难网络上实现浮点或接近浮点的精度,例如在不到5个量化(8位)再培训阶段的mobilenet。最后,我们提出了涂鸦,一个框架,可以使用我们的方法即时量化张量流图。代码可在https://github.com/xilinx/grafitist上找到。

URL

https://arxiv.org/abs/1903.08066

PDF

https://arxiv.org/pdf/1903.08066.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot