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

FLightNNs:轻量级量化深度神经网络,用于快速准确的推理

FLightNNs: Lightweight Quantized Deep Neural Networks for Fast and Accurate Inference

Carnegie Mellon University(卡内基梅隆大学)

Ruizhou Ding, Zeye Liu, Ting-Wu Chin, Diana Marculescu, R. D., Blanton

摘要:

为了提高深度神经网络(DNN)在定制硬件上的吞吐量和能量效率,轻量级神经网络将DNN的权重约束为2的幂的有限组合(表示为$k\in\{1,2\}$)。在这样的网络中,乘法-累加运算可以用单个移位运算或两个移位和一个加法运算来代替。为了提供更大的设计灵活性,可以最佳地选择每个卷积滤波器的$k$,而不是对每个滤波器固定。在本文中,我们制定的选择$k$是可微的,并描述模型训练确定$k$为基础的权重在每个过滤器的基础上。通过对8种配置和4个数据集的46个FPGA设计实验表明,具有灵活$k$值的轻量级神经网络(FLightNN)充分利用了现场可编程门阵列(FPGA)上的硬件资源,实验结果表明,与具有$k=2$的轻量级神经网络相比,FLightNN可以实现2 $\times$的加速,而精度仅下降0.1\%.与4位定点量化相比,FLightNN实现了更高的精度和高达2个$\times$的推理加速,这是由于它们的轻量级移位运算。此外,我们的实验还表明,FLightNN可以实现更高的计算能量效率的ASIC实现。

英文摘要:

To improve the throughput and energy efficiency of Deep Neural Networks (DNNs) on customized hardware, lightweight neural networks constrain the weights of DNNs to be a limited combination (denoted as $k\in\{1,2\}$) of powers of 2. In such networks, the multiply-accumulate operation can be replaced with a single shift operation, or two shifts and an add operation. To provide even more design flexibility, the $k$ for each convolutional filter can be optimally chosen instead of being fixed for every filter. In this paper, we formulate the selection of $k$ to be differentiable, and describe model training for determining $k$-based weights on a per-filter basis. Over 46 FPGA-design experiments involving eight configurations and four data sets reveal that lightweight neural networks with a flexible $k$ value (dubbed FLightNNs) fully utilize the hardware resources on Field Programmable Gate Arrays (FPGAs), our experimental results show that FLightNNs can achieve 2$\times$ speedup when compared to lightweight NNs with $k=2$, with only 0.1\% accuracy degradation. Compared to a 4-bit fixed-point quantization, FLightNNs achieve higher accuracy and up to 2$\times$ inference speedup, due to their lightweight shift operations. In addition, our experiments also demonstrate that FLightNNs can achieve higher computational energy efficiency for ASIC implementation.

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

↑