BalancedMetaSoftmax-Classification icon indicating copy to clipboard operation
BalancedMetaSoftmax-Classification copied to clipboard

Specifying the class frequencies

Open dtafler opened this issue 1 year ago • 1 comments

Hi,

thank you for the inspired paper and for uploading your code.

Maybe I am overlooking it, but I cannot find the files specifying the class frequencies for the balanced softmax loss. The path to the file is specified in the config:

https://github.com/jiawei-ren/BalancedMetaSoftmax-Classification/blob/34a61e432881816c2da14d577d6ed63501288f5f/config/CIFAR100_LT/balanced_softmax_imba200.yaml#L6C32-L6C32

and used in the balanced softmax loss function to get the class frequencies:

https://github.com/jiawei-ren/BalancedMetaSoftmax-Classification/blob/34a61e432881816c2da14d577d6ed63501288f5f/loss/BalancedSoftmaxLoss.py#L26-L29

Am I correct in assuming that the file simply contains the class frequencies and, once converted to a torch tensor, that the indices of that tensor correspond to the class labels?

dtafler avatar Jan 13 '24 17:01 dtafler

Yes, that's right.

jiawei-ren avatar Jan 16 '24 09:01 jiawei-ren