HRank icon indicating copy to clipboard operation
HRank copied to clipboard

Download ResNet-50 on ImageNet

Open seulkiyeom opened this issue 4 years ago • 2 comments

I'd like to use your code (rank_generation.py and main.py) for pruning with ResNet-50 on ImageNet.

However, it doesn't work and I've got an error

File "", line 1, in File "/ssd7/skyeom/anaconda3/envs/py38/lib/python3.8/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/ssd7/skyeom/anaconda3/envs/py38/lib/python3.8/site-packages/torch/serialization.py", line 740, in _legacy_load return legacy_load(f) File "/ssd7/skyeom/anaconda3/envs/py38/lib/python3.8/site-packages/torch/serialization.py", line 669, in legacy_load args = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '\x00'.

Is the pth file (resnet50-19c8e357.pth) that we can download in the link correct one?

Many thanks.

Best regards, Seul-Ki

seulkiyeom avatar Nov 06 '20 17:11 seulkiyeom

Thanks for your interest.

I have just checked it on my server and everything goes smooth.

So, please check the environment of your workstation, or have your correctly downloaded the entire .pth file?

Maybe you can also try to rename the .pth to see if it works.

If it remains problematic, you can try the code using this link: https://github.com/lmbxmu/HRankPlus

Good luck!

lmbxmu avatar Nov 06 '20 18:11 lmbxmu

Thank you, Imbxmu.

Let me try it out again.

Many thanks.

seulkiyeom avatar Nov 08 '20 14:11 seulkiyeom