yuchaoli / KSE

Exploiting Kernel Sparsity and Entropy for Interpretable CNN Compression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusion about the practical acceleration

dsfour opened this issue · comments

After compressing by KSE, the network is 2D kernels sparse, rather than channels sparse(obtained by the real channel pruning). Therefore, special computation hardware is needed to gain practical acceleration after compressing. Is that right?

Yes, it needs special computation implement to gain acceleration..

请问特殊的计算实现是指什么,特殊的硬件吗还是特殊的框架?

是指特殊的卷积实现,例如depthwise convolution要达到加速效果需要重新实现专门的conv op一样。

请问特殊的卷积实现是指论文中的“The convolution operation is split into two parts, 2D convolution and channel fusion (addition).”吗?有相关代码吗?

请问特殊的卷积实现是指论文中的“The convolution operation is split into two parts, 2D convolution and channel fusion (addition).”吗?有相关代码吗?

是指通过我们方法压缩后的卷积,详见utils/utils.py line75.

谢谢你的回答!我看了这部分代码,其中的逻辑应该把原始的kernels替换为了聚类后的kernels?这样的话,卷积核的数量没变,卷积计算量应该也不会减小,而且好像代码也没有体现论文中“sharing 2D activation maps”的**?我用你的方法对openpose网络做了下剪枝, 权重文件的大小有所下降,但推理速度不升反降,而且随着剪枝的层数越多,推理速度越低.......不知道我的理解对不对,烦请指教!

谢谢你的回答!我看了这部分代码,其中的逻辑应该把原始的kernels替换为了聚类后的kernels?这样的话,卷积核的数量没变,卷积计算量应该也不会减小,而且好像代码也没有体现论文中“sharing 2D activation maps”的**?我用你的方法对openpose网络做了下剪枝, 权重文件的大小有所下降,但推理速度不升反降,而且随着剪枝的层数越多,推理速度越低.......不知道我的理解对不对,烦请指教!

卷积核的数量虽然没有变化,但是实际参与计算的权重数量是变少了。推理速度没下降主要是因为这种计算方式需要专门的底层kernel优化,这块目前还没有专门的实现。