SoftwareX (Sep 2024)
FlexiPrune: A Pytorch tool for flexible CNN pruning policy selection
Abstract
The application of pruning techniques to convolutional neural networks has made it possible to reduce the size of the model and the time required for inference. However, determining the best pruning policy, i.e. the pair of pruning method and pruning distribution that allows obtaining the highest accuracy or F1 score of the pruned model, is not a task that can be easily performed with the available tools. For this, we propose a library called FlexiPrune, written in Python language and using the Pytorch framework, which allows the user to select an unpruned model and choose the pruning policy from a set of available options. FlexiPrune makes it very easy to compare the impact of different pruning methods and pruning distributions, so that decision making is based on the performance of the pruned model for the specific GPR (Global Pruning Rate) value and classification problem, rather than simply following generic pruning policy recommendations.