about data long-tailed/data imbalance
reference:https://github.com/richardaecn/class-balanced-loss
paper:Class-Balanced Loss Based on Effective Number of Samples
pytorch==1.9.0
you can only run this code without any other prepare,some important part have test code to compare with offical tf version
Most parameters are the same with tf's version, but this version's acc is slightly higher than tf, may beceuse of some random.
If there is any problem, i will try to modify in time
dataset: cifar10 with imbalanced distribution