Ben-Louis / FisherPruning-Pytorch

An implementation of <Group Fisher Pruning for Practical Network Compression> based on pytorch and mmcv
17 stars 4 forks source link

error when pruning mobilenet #5

Open zhaoxin111 opened 2 years ago

zhaoxin111 commented 2 years ago

Firstly, thanks for your excellect job! I had tried to prune the mobilenet, it contains many DWConv. To support DWConv pruning, I make little changes image Otherwise, the following error will be reported image

When finetuning the pruned model, there was error about the DWConv. image

image

Ben-Louis commented 2 years ago

Thank you very much! Would you like to open a PR to fix this bug?

zhaoxin111 commented 2 years ago

Thank you very much! Would you like to open a PR to fix this bug?

Maybe you misunderstood me, I haven't fixed the problem mentioned in the picture, do you have any suggestions?

zhaoxin111 commented 2 years ago

I found that the group convolution in a certain module is not divided into the same group as the subsequent convolution 1660033165544 1660033177597

zhaoxin111 commented 2 years ago

In method make_groups, delete the beak in the loop and merge the groups like image

image

After the above modifications, the problem seems to be fixed

dukeconv commented 1 year ago

any updates ? regarding getting error as KeyError: Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)