StijnVerdenius/SNIP-it

How to get the pruned model without pickle and module dependencies ?

planemanner opened this issue · 0 comments

First of all, thank for your sharing.

Your experiment codes are perpectly working to reproduce your experiments.

But when I want to get the pruned model which is not trained for my custom experiment,

I get in trouble.

Referring your main script and other codes I found that if I want to load a pruned model in other code base,

I need to call all dependent modules for the neural network with unpickling the pruned weights.

Is there any detour to get a pruned model for using easily as like following ?

import torch
model_path = "Pruned_model.pth"
model = torch.load(model_path)