arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.14713cs.CVcs.AI
收藏

卷积神经网络的1 × N剪枝模式

1xN Pattern for Pruning Convolutional Neural Networks

Xiamen University(厦门大学);Tencent Youtu Lab(腾讯优图实验室);Alibaba Group(阿里巴巴集团);Peking University(北京大学)

Mingbao Lin, Yuxin Zhang, Yuchao Li, Bohong Chen, Fei Chao, Mengdi Wang, Shen Li, Yonghong Tian, Rongrong Ji

摘要:

虽然网络修剪在降低卷积神经网络(CNN)的复杂性方面受到欢迎,但同时保持模型准确性以及在通用CPU上实现显着加速仍然是一个悬而未决的问题。在本文中,我们提出了一种新的1xN修剪模式,以打破这一限制。特别地,具有相同输入通道索引的连续N个输出核被分组到一个块中,这作为我们的修剪模式的基本修剪粒度。我们的1xN模式修剪了这些被认为不重要的块。我们还提供了一个滤波器重排的工作流程,首先在输出通道维度中重排权重矩阵,以获得更有影响力的块来提高精度,然后将类似的重排应用于输入通道维度中的下一层权重,以确保正确的卷积操作。此外,在我们的1xN修剪之后的输出计算可以通过并行化的逐块向量化操作来实现,从而在通用CPU上实现显著的加速。在ILSVRC-2012上的实验证明了该剪枝模式的有效性。例如,给定50%的修剪率和N=4,我们的模式在MobileNet-V2的前1精度中获得了比过滤器修剪约3.0%的改进。同时,它在Cortex-A7 CPU上获得了56.04ms的推理节省。我们的项目可以在https://github.com/lmbxmu/1xN上找到。

英文摘要:

Though network pruning receives popularity in reducing the complexity of convolutional neural networks (CNNs), it remains an open issue to concurrently maintain model accuracy as well as achieve significant speedups on general CPUs. In this paper, we propose a novel 1xN pruning pattern to break this limitation. In particular, consecutive N output kernels with the same input channel index are grouped into one block, which serves as a basic pruning granularity of our pruning pattern. Our 1xN pattern prunes these blocks considered unimportant. We also provide a workflow of filter rearrangement that first rearranges the weight matrix in the output channel dimension to derive more influential blocks for accuracy improvements and then applies similar rearrangement to the next-layer weights in the input channel dimension to ensure correct convolutional operations. Moreover, the output computation after our 1xN pruning can be realized via a parallelized block-wise vectorized operation, leading to significant speedups on general CPUs. The efficacy of our pruning pattern is proved with experiments on ILSVRC-2012. For example, given the pruning rate of 50% and N=4, our pattern obtains about 3.0% improvements over filter pruning in the top-1 accuracy of MobileNet-V2. Meanwhile, it obtains 56.04ms inference savings on Cortex-A7 CPU over weight pruning. Our project is made available at https://github.com/lmbxmu/1xN.

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

↑