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

Performance on Resnet101 network #32

Open
twtygqyy opened this issue Apr 6, 2018 · 7 comments
Open

Performance on Resnet101 network #32

twtygqyy opened this issue Apr 6, 2018 · 7 comments

Comments

@twtygqyy
Copy link

twtygqyy commented Apr 6, 2018

Hi, I've implemented the resnet101 structure on the top of vgg16 network, while the mAP on VOC datasets could only reach 0.62 after 20 epochs.
Do you have any idea what the problem would be? You can find the code here. Thank you.

@chenyuntc
Copy link
Owner

chenyuntc commented Apr 6, 2018

I think maybe resnet101 is difficult to train.

This maybe helpful.

For Resnets, we fix the first block (total 4) when fine-tuning the network, and only use crop_and_resize to resize the RoIs (7x7) without max-pool (which Xinlei finds useless especially for COCO). The final feature maps are average-pooled for classification and regression. All batch normalization parameters are fixed. Learning rate for biases is not doubled.

@twtygqyy
Copy link
Author

twtygqyy commented Apr 6, 2018

@chenyuntc Thanks, I also fixed the weights for top layers, but the result didn't improve. As you mentioned, it might be the reason of BN and biases. I'll have another try.

@twtygqyy
Copy link
Author

twtygqyy commented Apr 9, 2018

Hi @chenyuntc, I've trained the model with:

  1. Fix the first block.
  2. Learning rate for biases is not doubled.
  3. All batch normalization parameters are fixed.
  4. Use 1e-4 as weight decay.

And I restrictedly followed the way of training as I did in caffe, while it seems the performance cannot be improved.
Have you tried to train the model on networks other than VGG16?

@chenyuntc
Copy link
Owner

Actually, I only tried VGG16.

@blateyang
Copy link

I recently also want to implement resnet structure based on this project. And I found your @twtygqyy codes are very helpful to me. But I have a question about batch normalization. Why we need to fix batch normalization parameters here?

@stickOverCarrot
Copy link

@blateyang BN only work when batch_size>1 and only work well when batch_size>=16.You can see this paper https://arxiv.org/abs/2002.05712.However,@chenyuntc code only surport batch_size==1

@blateyang
Copy link

blateyang commented Oct 19, 2020 via email

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