he-y / soft-filter-pruning

Soft Filter Pruning for Accelerating Deep Convolutional Neural Networks
https://arxiv.org/abs/1808.06866
376 stars 74 forks source link

what is the rule that to choose the skip list #13

Closed JinShchen closed 5 years ago

JinShchen commented 5 years ago

In pruning_train.py, the resnet50' total layers num is 150, but in code, the last layer's index is 159 which is out of range. So I wonder what is the rule to choose the skip layer? Thanks.

JinShchen commented 5 years ago

And what is the mean of mask_index?

he-y commented 5 years ago

skip layer is the downsampling layer.

last_index = 159 is the index of fc layer, so we could prune conv layers via this line.

mask_index is the index of the pruned filter in 1-dimension.

JinShchen commented 5 years ago

skip layer is the downsampling layer.

last_index = 159 is the index of fc layer, so we could prune conv layers via this line.

mask_index is the index of the pruned filter in 1-dimension.

Yes, I know this parameters literally. But when I checked these layer, I found that these layer were not exactly the layer you want to skip. And ALSO, fc layer's number is not what you list in that file. So I wonder which version of the resnet do you use? Is it the origin version in pytorchvision? (I thought it was the origin vision which is you include in your code, but that version can not correspond to what I mention above). Thanks!

he-y commented 5 years ago

Please provide your detailed results here. My model is same to official torchvision model.