Bag of Tricks with Quantized Convolutional Neural Networks for image classification

Jie Hu,Mengze Zeng,Enhua Wu
DOI: https://doi.org/10.48550/arXiv.2303.07080
2023-03-13
Abstract:Deep neural networks have been proven effective in a wide range of tasks. However, their high computational and memory costs make them impractical to deploy on resource-constrained devices. To address this issue, quantization schemes have been proposed to reduce the memory footprint and improve inference speed. While numerous quantization methods have been proposed, they lack systematic analysis for their effectiveness. To bridge this gap, we collect and improve existing quantization methods and propose a gold guideline for post-training quantization. We evaluate the effectiveness of our proposed method with two popular models, ResNet50 and MobileNetV2, on the ImageNet dataset. By following our guidelines, no accuracy degradation occurs even after directly quantizing the model to 8-bits without additional training. A quantization-aware training based on the guidelines can further improve the accuracy in lower-bits quantization. Moreover, we have integrated a multi-stage fine-tuning strategy that works harmoniously with existing pruning techniques to reduce costs even further. Remarkably, our results reveal that a quantized MobileNetV2 with 30\% sparsity actually surpasses the performance of the equivalent full-precision model, underscoring the effectiveness and resilience of our proposed scheme.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the high computational and memory costs when deploying deep neural networks on resource - constrained devices. Specifically, the authors focus on how to reduce the memory footprint of the model and improve the inference speed through quantization techniques while maintaining the accuracy of the model. Although quantization methods have been widely studied, there is a lack of systematic analysis to evaluate their effectiveness. Therefore, this paper aims to collect and improve existing quantization methods and propose a set of golden guidelines for post - training quantization. In addition, the author also proposes a multi - stage fine - tuning strategy to work in synergy with existing pruning techniques to further reduce costs. Experimental results show that, by following the proposed guidelines, there will be no loss of accuracy even when the model is directly quantized to 8 - bit. For low - bit quantization, quantization - aware training based on the guidelines can further improve the accuracy. In particular, the quantized MobileNetV2, in the case of 30% sparsity, even outperforms the equivalent full - precision model, which proves the effectiveness and robustness of the proposed scheme.