Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reproduce the result of densenet161 #10

Open
ParsonsZeng opened this issue Jan 5, 2019 · 6 comments
Open

How to reproduce the result of densenet161 #10

ParsonsZeng opened this issue Jan 5, 2019 · 6 comments

Comments

@ParsonsZeng
Copy link

Hi, I think I have some problem with my code, so I can not reproduce the result of densenet161 with pytorch.
I use the pretrained Densenet161 to train on CUB200, with standard SGD, linear-decay of learning rate, initial learning rate 0.1, 40k iterate, 32 batch size. My result is 83.38%, and your paper is 84.21%.

And then, I add the pairwiseconfusion to the loss like : loss = criterion(y_, y) + 10* PairwiseConfusion(y_). And the result is 83.58%, and your paper is 86.87%.

Can you help me to reproduce the result? Thank you.

@abhimanyudubey
Copy link
Owner

Hi, how many stages are you doing the training for?

@ParsonsZeng
Copy link
Author

Referring to your paper, I think it is just one stage to train the CNN, so it is one stage to train the densenet, without freezing the conv parameters. At this moment, the performances of densenet can be 84.3% without PC, and 85.4% with PC. The input of PC is the output of softmax. But it also cannot achieve the result in your paper. So I think some tricks are missing?

@goldentimecoolk
Copy link

Hi, I think I have some problem with my code, so I can not reproduce the result of densenet161 with pytorch.
I use the pretrained Densenet161 to train on CUB200, with standard SGD, linear-decay of learning rate, initial learning rate 0.1, 40k iterate, 32 batch size. My result is 83.38%, and your paper is 84.21%.

And then, I add the pairwiseconfusion to the loss like : loss = criterion(y_, y) + 10* PairwiseConfusion(y_). And the result is 83.58%, and your paper is 86.87%.

Can you help me to reproduce the result? Thank you.

Hello, I fine tune densenet161 on the bird dataset in two stages, i.e., freezing conv layers&fine tune classifier, fine tune all layers. But the highest top1 is just 78%. When I fine tune all layers directly in one stage, it could even be worse, only 50%+ accuracy. My hyper parameters are the same as yours in above. Is there anything need to be take care? Thank you!

@ParsonsZeng
Copy link
Author

Hi, I think I have some problem with my code, so I can not reproduce the result of densenet161 with pytorch.
I use the pretrained Densenet161 to train on CUB200, with standard SGD, linear-decay of learning rate, initial learning rate 0.1, 40k iterate, 32 batch size. My result is 83.38%, and your paper is 84.21%.
And then, I add the pairwiseconfusion to the loss like : loss = criterion(y_, y) + 10* PairwiseConfusion(y_). And the result is 83.58%, and your paper is 86.87%.
Can you help me to reproduce the result? Thank you.

Hello, I fine tune densenet161 on the bird dataset in two stages, i.e., freezing conv layers&fine tune classifier, fine tune all layers. But the highest top1 is just 78%. When I fine tune all layers directly in one stage, it could even be worse, only 50%+ accuracy. My hyper parameters are the same as yours in above. Is there anything need to be take care? Thank you!

I think you should calculate the confusion loss after softmax. And I just train the network in one stage without any tricks. However, I can not get the accuracy of the paper and I think I also lose some tricks>

@goldentimecoolk
Copy link

Hi, I think I have some problem with my code, so I can not reproduce the result of densenet161 with pytorch.
I use the pretrained Densenet161 to train on CUB200, with standard SGD, linear-decay of learning rate, initial learning rate 0.1, 40k iterate, 32 batch size. My result is 83.38%, and your paper is 84.21%.
And then, I add the pairwiseconfusion to the loss like : loss = criterion(y_, y) + 10* PairwiseConfusion(y_). And the result is 83.58%, and your paper is 86.87%.
Can you help me to reproduce the result? Thank you.

Hello, I fine tune densenet161 on the bird dataset in two stages, i.e., freezing conv layers&fine tune classifier, fine tune all layers. But the highest top1 is just 78%. When I fine tune all layers directly in one stage, it could even be worse, only 50%+ accuracy. My hyper parameters are the same as yours in above. Is there anything need to be take care? Thank you!

I think you should calculate the confusion loss after softmax. And I just train the network in one stage without any tricks. However, I can not get the accuracy of the paper and I think I also lose some tricks>

Thanks for your reply. I fine tune the densenet161 in one stage with different lr in backbone and classifier and get your result, 83.38%. However, the new problem is when I add confusion loss which is calculated after softmax, no matter fine tune the network from Imagenet params or 83.38% params, it could not get improved at all. Can you share your pytorch code with me in email or whatever way? My email is jsktt01@gmail.com . Thank you very much!

@yomna-safaa
Copy link

@goldentimecoolk
did you manage to get the pytorch code working as the paper?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants