Skip to content

Specifying the class frequencies #16

@dtafler

Description

@dtafler

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:

def __init__(self, freq_path):
super(BalancedSoftmax, self).__init__()
with open(freq_path, 'r') as fd:
freq = json.load(fd)

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions