Deep-Compression.Pytorch
Deep-Compression.Pytorch copied to clipboard
How can prune before training?
How to prune the existing model before training? That means I don't need to training to keep weight zero. I can get good accuracy on testloader after pruning. Now, I am confused no matter which percentage, test on testloader only 10% accuracy. Where is the wrong?
Can you elaborate on the issue?
I solve this problem. In this code, that weights=abs(torchweights) and return after abs weight. If not prune the existing model before training, use weights=torchweights.cpu().numpy() weights_abs=np.abs(torchweights.cpu().numpy()) instead of the first two code.