richardaecn / class-balanced-loss

Class-Balanced Loss Based on Effective Number of Samples. CVPR 2019
MIT License
597 stars 68 forks source link

CB-Loss makes no sense when n_y is large #3

Closed eugenelawrence closed 5 years ago

eugenelawrence commented 5 years ago

When n_y is large, it seems that the loss weights α are always equal to 1. If so, CB Loss makes no sense. @richardaecn For example, 10,000 images belong to class A, and only 1,000 images belong to class B. Then the CB weights are [1,1], no matter how much β is. Please correct me if I have any misunderstanding. Thanks.

eugenelawrence commented 5 years ago

I make a mistake that I only try [0.1, 0.2, ..., 0.9]. When β is extremely large like 0.9999, it is different.

GuoleiSun commented 4 years ago

Agreed