richardaecn / class-balanced-loss

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

En computed in batch or whole dataset? #17

Open yang502 opened 3 years ago

yang502 commented 3 years ago

I try to compted En as a weight in batch data, but loss quickly change to NAN. I always try to compute in whole dataset, img_per_class =[900000,700000,60000], because img_num is very large, beta^n is almost equal 0. then, i got En like [1e-4,1e-4,1e-4]. I think the weight can not handle the imbalance dataset. @richardaecn