实验基于论文: Class-Balanced Loss Based on Effective Number of Samples
Class-balanced-loss代码地址:https://github.com/vandit15/Class-balanced-loss-pytorch
resnet18代码参考链接:https://blog.csdn.net/sunqiande88/article/details/80100891
制作数据集
论文中通过公式n=niuin = n_iu^in=