FishYuLi / BalancedGroupSoftmax

CVPR 2020 oral paper: Overcoming Classifier Imbalance for Long-tail Object Detection with Balanced Group Softmax.
Apache License 2.0
351 stars 64 forks source link

The problem of batch size #4

Closed AmingWu closed 4 years ago

AmingWu commented 4 years ago

Thanks for sharing your code. When I run your code with one GPU, I set the batch size to 1. However, I find the performance decreases. Could you give me some advice? Thank you very much.

FishYuLi commented 4 years ago

@AmingWu Hi, I haven't tried to train the model with total batch_size = 1. But did you set the learning rate following this rule:

Important: The default learning rate in config files is for 8 GPUs and 2 img/gpu (batch size = 82 = 16). According to the Linear Scaling Rule, you need to set the learning rate proportional to the batch size if you use different GPUs or images per GPU, e.g., lr=0.01 for 4 GPUs 2 img/gpu and lr=0.08 for 16 GPUs * 4 img/gpu. (Cited from mmdetection.)

If lr is still 0.02, this could be a problem. And what performance did you get?

AmingWu commented 4 years ago

OK,I have use a Single GPU to train the model. python tools/train.py configs/bags/gs_faster_rcnn_r50_fpn_1x_lvis_with0_bg8.py. This is the result. QQ截图20200719223614

The result is lower than your reported result.