Giter Club home page Giter Club logo

dcp's People

Contributors

liujingcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcp's Issues

About "replace the baseline model"

Here is going to copy modules of pruned_modules, why don't you just do

self.ori_model = copy.deepcopy(self.pruned_model)

,but copy modules by modules?
Is there any concern?

channel pruning on detection task ?

I think the additional discrimination-aware loss in this project is suitable for classification task but not detection task ,the classification task focus on the whole feature map , therefore averagepooling+softmax works , but the detection task focus on feature in receptive field , if I want to use this method on yolo-v3 , how can I modify the discrimination-aware loss ?

Inplace operation

RuntimeError: one of the variables needed for gradient conputation has been modified by an inplace operation.
When I use torch.autograd.set_detect_anomaly(True) to find the operation that failed to compute its gradient, it shows "x = self.conv(2) " in dcp/models/preresnet.py. I can't find the solution, Could anyone help me?

Algorithm 1 fine-tuning

In Algorithm 1, "Learn theta and Fine-tune M with (L^S)_p and L_f." which means that the weights of the first layer to layer L_p will be updated w.r.t to (L^S)_p and whole model weight will be updated w.r.t L_f (the final loss), is that right?

In this line, I can understand that i != index is going to update weights of the first layer to layer L_p by self.seg_optimizer[i].step() but the i != len(self.pruned_segments) - 1 is going to update weights of the first layer to the end of the second-last segment.

According to Algorithm 1, it should be the last segment, that is, the whole model, but why the second-last segment?

Training time too long

I'm trying to reproduce your experimental results on ImageNet, however I find that training resnet networks really takes super long time !!! So I want to know how much time did you use to train resnet on ImageNet dataset??? Thanks !!!

Some confusions about code

Thanks for your paper and sharing code. I have some confusions about code, can you explain it for me.

  1. In function channel_selection(), why the original model is replaced by pruned model? Is it since the loaded pre-trained model without fine-tuning.
  2. In function update_model, why the network is splited repeatly(the network will be split a time if the update_model() be called)?But the segment seems same after each split,
  3. Is it original net just be a baselone. Why origin net is continualy updated(line 503 in channel_pruning.py) if it is just be a baseline ?
    Thank you very much.
    Expect for yor reply.

the details of ResNet56

Hi,

Great work! You released the structures of ResNet nets in models.py except ResNet56, could you please make the definition of ResNet56 available as well? I'm aware of many online versions available, but I just would like to figure out some details, like whether bias=True or not in conv layers etc.. Thanks.

resnet50 top1-error is high

when i donwload your pruned model(imagenet-resnet50-0.5), then test it with test.py.
the result is as below:
|===>Validation Error: 28.2700 Loss: 1.1303, Top5 Error: 9.4360
but in your paper the result is lower:
top1 error:25.05 top5 error:7.68

why? is there some difference?

How to show the feature maps

I like your feature maps shown in the paper very much. The color matching is so good. Do you draw the feature maps with imshow function in matplotlib? Which colormap do you choose? Or other methods to show the beautiful feature maps? I try to show feature maps but they look ugly. Are there any advice? Thanks you very much!

Code

Hi:
release the code?

The self.pruned_weight in /dcp/mask_conv.py is not loaded from the original module.

Hello, what a good work you did!
I have the problem that when I reproduce the work, I find that the self.pruned_weight (in line 25 of /dcp/mask_conv.py) is not loaded from the original module (It may be generated from lib of nn.Conv2d? because the MaskConv2d derives from nn.Conv2d).
The weight of original layer:
image
The weight of self.pruned_weight:
image

Why the weight is not loaded from the original module?
Thanks a lot.

Whetherc the algorithm of the modle pruning is applicable to other dataset and the model that we trained ourselves?

Firstly, congratulations on the excellent performance of your proposed model on specific data sets and some pre-training models.
As the title shows, I need to tailor my own pre-trained model which datasets are related to audio rather than images.And the pre-trained model includes not only CNN but also RNN.
Therefore, I would like to ask you if I can use your given model in my case.If not, do you have other ideas for model pruning?
Thanks a lot
Best wishes
GUOhm230

About manipulation of gradients

From Clipping gradient by 10 and nan correction, you made some manipulation of gradients.

Why is the gradients clipped by 10, what's the effect do you find if the gradients is too large?
Why will the gradients be nan in segment wise training process, you encounter the nan first or you know the nan is inevitable then you correct it, which one?

channel prunning on regression task

Hi, if I want to prune channels on regression task. What are the discrimination-aware loss labels? Assume that an image has 100*100 pixels, every pixel has a depth as its label like depth estimation. So in channel prunning, what labels should I define?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.