
摘要
卷积神经网络(CNNs)在各种应用中取得成功的同时,也伴随着计算和参数存储成本的显著增加。近期减少这些开销的努力主要集中在不损害原始精度的前提下,对各层的权重进行剪枝和压缩。然而,基于权重大小的剪枝方法虽然能大幅减少全连接层中的参数数量,但由于剪枝后的网络存在不规则稀疏性,可能无法充分降低卷积层的计算成本。本文提出了一种加速CNN的方法,通过识别并剪除对输出精度影响较小的滤波器来实现。通过在网络中移除整个滤波器及其连接的特征图,可以显著降低计算成本。与权重剪枝不同的是,这种方法不会导致稀疏连接模式的出现,因此不需要依赖稀疏卷积库的支持,而是可以直接利用现有的高效BLAS库进行密集矩阵乘法运算。我们展示了即使简单的滤波器剪枝技术也能在CIFAR10数据集上将VGG-16的推理成本降低高达34%,ResNet-110的推理成本降低高达38%,同时通过重新训练网络几乎恢复到原始精度。
代码仓库
VainF/Torch-Pruning
pytorch
GitHub 中提及
mvpzhangqiu/yolov5prune
pytorch
GitHub 中提及
guoxiaolu/model_compression
pytorch
GitHub 中提及
arturjordao/PruningNeuralNetworks
tf
GitHub 中提及
oandrienko/fast-semantic-segmentation
tf
GitHub 中提及
midasklr/yolov5prune
pytorch
GitHub 中提及
mattangus/fast-semantic-segmentation
tf
GitHub 中提及
marcoancona/TorchPruner
pytorch
GitHub 中提及
Adlik/model_optimizer
pytorch
GitHub 中提及
prerakmody/CS4180-DL
pytorch
GitHub 中提及
AlumLuther/PruningFilters
pytorch
GitHub 中提及
matthew-mcateer/Keras_pruning
tf
GitHub 中提及
cailinhang/2018-Graduation-Project
pytorch
GitHub 中提及
EstherBear/implementation-of-pruning-filters
pytorch
GitHub 中提及
he-y/filter-pruning-geometric-median
pytorch
GitHub 中提及
lehduong/ginp
pytorch
GitHub 中提及
PaddlePaddle/PaddleOCR
paddle
lehduong/kesi
pytorch
GitHub 中提及
siyuan0/pytorch_model_prune
pytorch
GitHub 中提及
AnishDelft/ModelCompression
pytorch
GitHub 中提及
mingsun-tse/regularization-pruning
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| network-pruning-on-imagenet | ResNet50-2.3 GFLOPs | Accuracy: 78.79 GFLOPs: 2.335 MParams: 14.811 |
| network-pruning-on-imagenet | ResNet50-1.5 GFLOPs | Accuracy: 78.07 GFLOPs: 1.635 MParams: 10.511 |
| network-pruning-on-imagenet | ResNet50-1G FLOPs | Accuracy: 76.376 GFLOPs: 1.075 MParams: 6.954 |