Open K-prog opened 3 years ago
After pruning you need to save the model with torch.save(model, path)
and load it likewise with torch.load(path)
If you use the .yaml file or .cfg file to define the model and then load the state dict there will be a mismatch between dimensions.
Hi, I modified the test.py file to prune the model and then save it![image](https://user-images.githubusercontent.com/52241581/128999443-60f9cc0d-817a-4aaf-84b9-1cebfbaab514.png)
I got the pruned model in the /yolor directory and when I'm using that model for finding precision and recall again using test.py file, I'm getting this error![image](https://user-images.githubusercontent.com/52241581/129002614-caf6f8f3-230a-4035-a3a2-d9ab43cddf48.png)
I think the model's architecture has changed, how to resolve this?