Channel Pruning for Accelerating Very Deep Neural Networks论文笔记

论文阅读

https://arxiv.org/abs/1707.06168

总结

利用channel pruning实现网络inference过程中的加速,预训练模型上剪枝,包括两个步骤(1)LASSO regression based channel selection (2)least square reconstruction

方法

1. 单层剪枝,两步操作:

(1)channel selection (most representative) ——多次迭代直到beta满足稀疏约束

​ 穷举法太耗时,引入LASSO 回归,选择结果用系数beta表示,beta=0时剪去

Channel Pruning for Accelerating Very Deep Neural Networks论文笔记

(2)reconstruction ——一次计算即可

​ linear least squares,X:选择之后的channel,Y:网络压缩前的outputs,下一层channel暂时没有减少,对w进行微调。同时固定系数beta与X联合以匹配w维度。这也解释了为什么最后caffemodel没有减小,因为新的model中增加了beta作为mask,并没有直接减去

Channel Pruning for Accelerating Very Deep Neural Networks论文笔记

2. 对于多层,序列逐层剪枝

3. 对于多分支网络

实验对比 VGG-16

单层剪枝
  1. 对比channel selection的重要性:first k 选取前k个channels;max response选取filter绝对值之和最大的;选择之后利用本文的reconstruction对w进行微调

  2. 对结果的讨论:(1)随着speed-up ratio的上升,误差逐渐加大;(2)sometimes max response比first k 还要差,推测绝对值较大的filter之间相关性很强;因此feature map之间的相关性更值得研究(3)channel selection对reconstruction影响很大;(4)浅网络的channel pruning比深网络容易,说明浅网络冗余度更大

整体模型剪枝
  1. 不同层的剪枝力度不一样——体现在通道数目的设置

2. 本文方法结果

Channel Pruning for Accelerating Very Deep Neural Networks论文笔记

   3. 结合其他压缩方法spatial, channel factorization, and channel pruning

Channel Pruning for Accelerating Very Deep Neural Networks论文笔记


代码实现

https://github.com/yihui-he/channel-pruning

实现结果:计算量的对比,每层通道数的变化

实现手段:LASSO和线性回归

网络设计:需要经验设计每层剩余通道数目,比较麻烦。