Abstract

Structured pruning methods have been used in several convolutional neural networks (CNNs). However, group-based structured pruning is a challenging task. In previous methods, the number of groups is manually determined for all layers, which is suboptimal. Moreover, which kernels should be appropriately removed? Model accuracy may be significantly reduced when the number of kernels is removed. To address these challenges, we propose an automatic group-based structured pruning method with reinforcement learning, named AGSPRL, which can generate pruned models with different compression rates automatically. We first develop a reinforcement learning (RL) framework to learn the pruning rate for group-based channel pruning layer by layer. Then, based on the learned kernel pruning rate, we propose an efficient group configuration algorithm to adaptively determine the number of groups for each convolution layer. Finally, we introduce a channel pruning method with an attention mechanism as a tiny auxiliary filter selector for each group to dynamically determine which part of the kernels should be selected into the group convolution and which part of the kernels should be removed. To demonstrate the efficiency of our method, we apply it to a variety of CNNs in classification and detection datasets. The experimental results show that the AGSPRL not only adaptively but also accurately configures the number of groups. The accuracy is reduced by less than 1% and improved by 1%. Moreover, compared to other state-of-the-art methods, AGSPRL is more effective and has less accuracy loss.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call