arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.14928cs.LG
收藏

基于类的Quantization在神经网络中的应用

Class-based Quantization for Neural Networks

Technical University of Munich(慕尼黑工业大学);TU Darmstadt(达姆施塔特工业大学);Xidian University(西安电子科技大学)

Wenhao Sun, Grace Li Zhang, Huaxi Gu, Bing Li, Ulf Schlichtmann

摘要:

在深度神经网络(DNN)中,有大量的权重和乘法累加(MAC)运算。因此,在资源受限的平台上应用DNN是具有挑战性的,例如,手机量化是减少DNN的大小和计算复杂性的方法。现有的量化方法要么需要硬件开销来实现非均匀量化,要么专注于模型式和层式均匀量化,其不如滤波器式量化那样细粒度。在本文中,我们提出了一种基于类的量化方法来确定DNN中每个滤波器或神经元的最小量化比特数。在所提出的方法中,每个过滤器或神经元相对于数据集中的类的数量的重要性得分首先进行评估。分数越大,滤波器或神经元越重要,因此量化比特的数量应该越大。然后,采用搜索算法来利用滤波器和神经元的不同重要性来确定每个滤波器或神经元的量化比特数。实验结果表明,该方法可以在低量化比特宽度的情况下保持推理精度。在相同量化比特数的情况下,该方法也可以比现有方法获得更好的推理精度。

英文摘要:

In deep neural networks (DNNs), there are a huge number of weights and multiply-and-accumulate (MAC) operations. Accordingly, it is challenging to apply DNNs on resource-constrained platforms, e.g., mobile phones. Quantization is a method to reduce the size and the computational complexity of DNNs. Existing quantization methods either require hardware overhead to achieve a non-uniform quantization or focus on model-wise and layer-wise uniform quantization, which are not as fine-grained as filter-wise quantization. In this paper, we propose a class-based quantization method to determine the minimum number of quantization bits for each filter or neuron in DNNs individually. In the proposed method, the importance score of each filter or neuron with respect to the number of classes in the dataset is first evaluated. The larger the score is, the more important the filter or neuron is and thus the larger the number of quantization bits should be. Afterwards, a search algorithm is adopted to exploit the different importance of filters and neurons to determine the number of quantization bits of each filter or neuron. Experimental results demonstrate that the proposed method can maintain the inference accuracy with low bit-width quantization. Given the same number of quantization bits, the proposed method can also achieve a better inference accuracy than the existing methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑