simplify icon indicating copy to clipboard operation
simplify copied to clipboard

Accuracy drop after simplify

Open ZhuLIAO001 opened this issue 2 years ago • 5 comments

Hi guys, thank you for your library. It is quite cool.

However, I have met a problem when I try to use Simplify with Resnet18 on CIFAR10 dataset. I have used global_unstructured pruning in Pytorch and the sparsity was set to 0.875. Then I have transfer the weights of a list of neurons in layer4.1.Conv1 (Penultimate layer) to zero. In the next, I implemented the Simplify. The test_acc after “pruning” is 92.6%, after “pruning + transfer neurons’ weight to 0” is 92.24%, after “pruning + transfer neurons’ weight to 0 + simplify” is 92.21%.

I think there was supposed to be no test_acc decrease after the Simplify process. Could you please help me understand what happens here? I hope I have described my problem well.

If you want to reproduce, here is the link of my code and required files. https://partage.imt.fr/index.php/s/9jemn7WfkBWS5tx

ZhuLIAO001 avatar May 05 '23 13:05 ZhuLIAO001

@ZhuLIAO001 Hi, thanks for opening the issue. I'll take a look ASAP. Also, feel free to open a pull request if you notice anything.

AndreaBrg avatar May 07 '23 06:05 AndreaBrg

@ZhuLIAO001 I'm unable to run the script. Is it possible that the file with the model class is missing?

AndreaBrg avatar May 07 '23 07:05 AndreaBrg

@ZhuLIAO001 I'm unable to run the script. Is it possible that the file with the model class is missing?

Hi. I have updated the code. When you try to reproduce the code, could you please download all the files in to a folder, then I think it will work.

ZhuLIAO001 avatar May 09 '23 08:05 ZhuLIAO001

@ZhuLIAO001 I did not forget, but I'm swamped with NeurIPS; I'll get back to this when that is over. Thanks for your patience.

AndreaBrg avatar May 16 '23 18:05 AndreaBrg

@ZhuLIAO001, we noticed that tests were failing. It seems the issue is now fixed (the tests are all ok). Can you try using this branch? https://github.com/EIDOSLAB/simplify/tree/development

AndreaBrg avatar Jun 06 '23 11:06 AndreaBrg