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 can I get same performance as in paper when applying GhostModule on ResNet-50? #39

Open
twinklecc opened this issue Oct 7, 2020 · 11 comments

Comments

@twinklecc
Copy link

Hi, very thanks for your working, @iamhankai

I'm interested in this GhostModule design, so I substitude the GhostModule in ghostnet for vanilla convolution in ResNet-50. With s=2, paper shows distinguished performance as 75.0% Top1-Acc and 2.2G FLOPs. But I trained this model only to gain a 73.7% Top1-Acc and 2.4G FLOPs. Could you give me relevant training setting file or remind me of some special training details? Thanks again!

@iamhankai
Copy link
Member

Please provide your training settings. Let me see what's wrong.

@twinklecc
Copy link
Author

twinklecc commented Oct 8, 2020 via email

@iamhankai
Copy link
Member

It seems no attached file here.

The issue may help: #34

Replacing ConvBNReLU with Ghost Module.

@twinklecc
Copy link
Author

Sorry, I checked my reply yesterday, there was an attached file named training setting.py. Maybe something wrong with mailing.
Thanks for this referenced issue, I did the same replacing work to get a GhostModule-ResNet50. My model structure ought to be right.
Here I zip and attach config file again, hoping for right delivery. Very thanks!
training setting.zip

@iamhankai
Copy link
Member

Your learning rate should be 0.1*{total batch size}/256

@twinklecc
Copy link
Author

In my config, samples_per_gpu=64, gpus=8, so the total batch size is computed as 64*8.
MMclassification provides autoscale learning rate function, so initial learning rate is indeed 0.2 (0.1{total_bs}/256).
That's consistent with your instruction. Very thanks!

@iamhankai
Copy link
Member

iamhankai commented Oct 9, 2020

What's the accuracy of the original ResNet-50 with your config file?

In addition, could you show your implemented Ghost-ResNet50?

@twinklecc
Copy link
Author

I got about 77.5% Top1-Accuracy of ResNet-50 with my config file. Very thanks!

@huangpan2507
Copy link

huangpan2507 commented Oct 29, 2020

You mean, use Ghost_module instead of all the conv in the bottleneck ,include conv in downsample and except the first conv in Resnet? So I replace all of the conv except the first conv in Resnet, but The GPU cost increasely almost 10897M( My decive: 1 piece 1080ti GPU, before modify, GPU cost is 7645M ,batchsize= 8 * 4 ),it remind me that GPU is run out of memory, until I modify the batchsize = 1*4, the program can run! when I doesn't replace conv in downsample , it remind me the size are not match.

@iamhankai
Copy link
Member

@huangpan2507 If you don't replace conv in downsample , it should NOT remind you the size are not match. You need to check the correctness of your code.

@huangpan2507
Copy link

@huangpan2507 If you don't replace conv in downsample , it should NOT remind you the size are not match. You need to check the correctness of your code.

Thanks. Another question is that the cost of GPU memory will become greater if i instead the conv with Ghost_module?

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

3 participants