Eric-mingjie / rethinking-network-pruning

Rethinking the Value of Network Pruning (Pytorch) (ICLR 2019)
MIT License
1.51k stars 293 forks source link

IndexError: index 0 is out of bounds for dimension 0 with size 0 #44

Closed JuanDavidG1997 closed 1 year ago

JuanDavidG1997 commented 4 years ago

Dear author,

I am trying to prune a resnet-56 on cifar10 using network slimming. python resprune.py --dataset cifar10 --depth 56 --percent 0.8 --model

~/results_def/resnet56/baseline/model_best.pth.tar --save ~/results_def/resnet56/pruned80/

Does this mean there is no path between input and output? Shouldn't it still work given every layer would be an identity mapping?

What should I do in case I want to reprooduce the results for aggresive pruning?

Eric-mingjie commented 4 years ago

Are you using the right pytorch version? We use pytorch 0.3.1 in our code.

What do you mean by aggressive pruning?

JuanDavidG1997 commented 4 years ago

Sorry. My bad with the PyTorch version. By aggresive pruning I meant the section in the paper where you prune about 80%-90% of a network.

Another question. In the weight level paper, the authors say something about the learning which connections are imporntant instead of using the final value of the weight. Could you please explain how this is impemented in your repo?

Thank you!

Eric-mingjie commented 4 years ago

For aggressive pruning, we use the mask implementation.

For weight level pruning, here we prune the connections.