Comments (9)
Did you find a solution to this?
from pytorch-pruning.
@aprams Yes I did, had to do multiple changes to make that work. I basically flattened the mobilenetv2 model into a flat model before feeding into this code (dealing with the residual links is the trickiest part in the flattening process). Secondly, I changed prune.py
significantly to address batchnorm layers, and depthwise convs. I hope that helps.
from pytorch-pruning.
@nekulkarni Can you share me your code,please? I need to prune the mobilenetv2 for the school project but I am the beginner for python.
from pytorch-pruning.
@aprams Yes I did, had to do multiple changes to make that work. I basically flattened the mobilenetv2 model into a flat model before feeding into this code (dealing with the residual links is the trickiest part in the flattening process). Secondly, I changed
prune.py
significantly to address batchnorm layers, and depthwise convs. I hope that helps.
Thanks for sharing, could you please share more about how to deal with batchnorm layers? Thanks so much.
from pytorch-pruning.
@nekulkarni , I have pruned mobilenetv2 correctly, but the pruned model is difficult to train on imagenet, the accuracy is very low( I train with a 1080Ti, batchsize=96, lr=0.045, weight decay=0.00004, and decrease the lr 0.98 for each epoch, and i also try lr =0.1, lr = lr * (0.1 ** (epoch // 30)) ). can you tell me your data set and accuracy.
thank you very much!
from pytorch-pruning.
It seems that mobilenetv2 convergence slowly !
from pytorch-pruning.
@nekulkarni Can you share me your code about mobilenetv2 pruned ,please? I am a beginner. Thank you very much!
from pytorch-pruning.
@viviov Can you share me your code about mobilenetv2 pruned ,please? I am a beginner. Thank you very much!
from pytorch-pruning.
@nekulkarni Can you share the code with me also? I want to know how to deal with batch norm layers. Thank you very much.!!
from pytorch-pruning.
Related Issues (20)
- Python 3.6, pytorch 0.4.1, getting RuntimeError: Dimension out of range (expected to be in range of [-2, 1], but got 3) HOT 4
- torch.load(pruned_model) HOT 7
- vgg16 has 13 conv layers, how can you prune neurons on layer 28? HOT 2
- [CUDA Runtime Error] Assertion `t >= 0 && t < n_classes` failed. HOT 5
- Accuracy drops from 96.46% to 58.67% HOT 1
- train_path
- Time of 1 pruning iteration
- in finetune.py 117 Why "-i"?? HOT 2
- Getting Error in pruning HOT 1
- pruning conv layers with 'groups' > 1
- Batch Nomalization
- I wonder if this pruning approach can be adapted to net like resnet
- layer_index
- how Pruning the last conv layer affects the first linear layer of the classifier
- can u plz tell me how to resolve this issue of not getting training data path
- where is prune_conv_layer?
- Will the pruned weight reactivated after finetuning?
- Running project in google colab
- running project on Anaconda Jupyter Notebook
- Pruning model YOLOX using 'import torch.nn.utils.prune as prune'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-pruning.