ethanhe42 / channel-pruning

Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)
https://arxiv.org/abs/1707.06168
MIT License
1.07k stars 310 forks source link

why Resnet-50 channel pruning is worse with reconstruction ? #71

Open zlheos opened 6 years ago

zlheos commented 6 years ago

I try to prune resnet-50

first, Merge batchnorm and conv , the precise is 92% second, I set channel ration = 0.9 , I only prune before res2a-brach2c , but the precise drop to 65% I don't know what is wrong ?

then , I only prune channel without reconstruction , prune before res2a-brach2c and the precise drop less, I don't know why is worse with reconstruction ?

Thank you for your answer

Johnson-yue commented 6 years ago

@zlheos hi , I see you are also insterested in ResNet pruning, so am I. Do you successful? should I run add_bn() first?

Toory465 commented 6 years ago

Any news about pruning resNet-18? I have been trying to prune it for sometimes, but I could not get better that 80% accuracy for 10 percent compression.

bbjy commented 6 years ago

@Toory465 @zlheos Could you please tell me how you can apply the channel pruning without 3c? I don't know how to delete the spatial decompose and the channel decompose. Thank you so much!

Toory465 commented 6 years ago

@bbjy for resNet I only applied it on 8 filters of all net( basically 2 out of 5 conv layers of each residual block. I guess you need 3c for the filters that their input our outputs are affected by residual shortcut. However, I also tried to use 3c , prune filters from other layers and reconstruct error with linear regression which was not worked in my case.

bbjy commented 6 years ago

@Toory465 Actually, I donnot want to use 3c , I only want to use the channel pruning method in my case, but I don't know how to delet the other two in the code. And would you please tell me is there any modification in your cfgs.py ?Thank you so much!

bbjy commented 6 years ago

@zlheos Have you already pruned the resnet-50? I am very interested in it, and I am trying to prune it, but failed.

zlheos commented 6 years ago

@bbjy I try to prune resnet-50 with only cp, but the result will be worse but VGG-16 with cp is good I guess the reason is batchnorm layer, now I cannot give the conclusion

bbjy commented 6 years ago

@zlheos Ok,thank you.

zlheos commented 6 years ago

@bbjy , have you try to cp resnet-50 ?

bbjy commented 6 years ago

I tried, but failed.

bbjy commented 6 years ago

I tried, but failed.@zlheos

JinyangGuo commented 5 years ago

@zlheos @bbjy @Toory465 Have you succeed to prune resnet-56? I encounter same problem. The accuracy drops a lot when I just reconstruct the weights without prune the channel. I guess the problem is in the extract_feature?