richardaecn / class-balanced-loss

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

My implementation in Pytorch doesn't work #2

Open hbsz123 opened 5 years ago

hbsz123 commented 5 years ago

Dear authors, thanks for your greate effort to make your code open-source. I re-implement you CB-focal Loss in Pytorch(Both in your tf-version and my own version), but can't reach the performance reported in your paper.

This is my code. Could you please have a check whether there is something wrong with my code? output: [batch_size, num_classes] label: [batch_size] catList: [num_classes] a list of sampler numbers for each class

image

GuoleiSun commented 4 years ago

Hi,

I think your code is fine. I looked it carefully, and I didn't find any problem. Did you reach the performance reported in the paper? Thanks a lot

hbsz123 commented 4 years ago

Hi,

I think your code is fine. I looked it carefully, and I didn't find any problem. Did you reach the performance reported in the paper? Thanks a lot

I finished my experiments on long-tail CIFAR10 which author released in TF-Record mode but didn't achieved the acc reported in the paper.

feidfoe commented 4 years ago

Same issue here as well. (I also used Pytorch for re-implementation) I hope the authors provide more details and trained parameters for long-tailed CIFAR.

@hbsz123 Please let us know if you have any progress.

malarsaravanan1991 commented 4 years ago

Quick question : catList: [num_classes] a list of sampler numbers for each class

sampler number for each class here is calculated for each batch or entire dataset?