zhmiao / OpenLongTailRecognition-OLTR

Pytorch implementation for "Large-Scale Long-Tailed Recognition in an Open World" (CVPR 2019 ORAL)
BSD 3-Clause "New" or "Revised" License
839 stars 128 forks source link

About Class aware sampler #73

Closed zhandand closed 1 year ago

zhandand commented 1 year ago

https://github.com/zhmiao/OpenLongTailRecognition-OLTR/blob/f50e375f123fd12dd0ae39e07aa226fadec32f33/data/ClassAwareSampler.py#L37 I wonder why this lined was commented and introduce the variance "num_samples_cls". In my opion, this line can accomplish the same function as the lines below, is that right? Or could you please tell why use variance "num_samples_cls", was that for code efficiency? Thanks a lot!