Study on pruning optimization based on HRank pruning method
Abstract
Convolutional neural network (CNN), as one of the most important pillars of deep learning technology, has been paid increased attention to by researchers. However, by the expansion of the application of convolutional neural network, it faces more and more complex problems and more and more diverse situations. In order to solve these problems more appropriately, the number of parameters of convolutional neural networks continuously increases. This limits its potential to be deployed to distal devices with relatively low computing power and memory space. To improve this situation, this paper studies the compression of convolutional neural network model with acceptable sacrifice of accuracy. Based on Pytorch, Resnet-56 on CIFAR-10 is pruned. By using HRank pruning method, convolution kernels of each convolution layers are ordered according to the size of their determinant rank. Through deleting low-rank, less importance convolution kernels and reserving high-rank, more important convolution kernels, the pruning purpose is achieved. By changing the default compression ratio of different convolution layer, more important ones are applied with lower compression rates and less important ones are applied with higher compression rates, the paper achieves higher compression rate with the acceptable loss of accuracy. At the same time, the paper tests the efficiency of pruning under different learning rates. Finally, the paper finds that when the preset compression rate of the intermediate convolutional layer is changed slightly, the accuracy maintains at the level of 92.720% but the compress rate of Params reaches to 44.7% with 0.47M left and the compress rate of Flops reaches 51.1% with 61.39M left. In addition, the paper finds that when the learning rate is 0.05, the learning efficiency reaches its optimum.
References
- Yin Q, Zhang R, Shao X L. 2019 CNN and RNN mixed model for image classification MATEC web of conferences. EDP Sci, 277: 02001.
- Xinyu Z, Hongbo G, Jianhui Z, et al. 2018 Overview of deep learning intelligent driving methods. J. Tsinghua Univ., 58(4): 438-444.
- Qing L I U, Shi-chao L I, Wen-shan W, et al. 2021 Image stabilization repair method combining time series network and pyramid fusion. J. Graph., 42(1): 65.
- Zeng Kai, Li Xiang, Jia Jian-Mei, Wen Ji-Feng, Wang Xiang, 2022 Optimal Model for Defect Detection Based on YOLOv3-spp, Soft. Tec. 213-219.
- Lai C I J, Zhang Y, Liu A H, et al. 2021 Parp: Prune, adjust and re-prune for self-supervised speech recognition. Adv. Neu. Inf. Proc. Sys. 34: 21256-21272.
- Tan J H, Chan C S, Chuah J H. 2022 End-to-end supermask pruning: Learning to prune image captioning models. Pat. Rec. 122: 108366.
- Bayasi N, Hamarneh G, Garbi R. 2021 Culprit-Prune-Net: Efficient Continual Sequential Multi-domain Learning with Application to Skin Lesion Classification. Inter. Conf. Med. Image Compu. Com. Inter. 165-175.
- Lin M, Ji R, Wang Y, et al. 2020 HRank: Filter pruning using high-rank feature map, Conf. Com. Vis. Pat. Rec. 1529-1538.
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016 Deep residual learning for image recognition. Conf. Com. Vis. Pat. Rec., 12, 5-16.
- Alex Krizhevsky, Geoffrey Hinton, et al. 2009 Learning multiple layers of features from tiny images. Tec. Rep. 2-5.