Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weights = weights / np.sum(weights) * int(hparams['data_version']) #7

Open
nikenj opened this issue Sep 26, 2019 · 1 comment
Open

Comments

@nikenj
Copy link

nikenj commented Sep 26, 2019

the weights normalize function is not in the paper, why in the code need normalized ? and why to
multiply the number of classes? ths .

@richardaecn
Copy link
Owner

The weight normalization is mentioned in the 3rd paragraph of "4. Class-Balanced Loss".

The vanilla loss could be viewed as having weight of 1 for all classes. This simple normalization strategy ensures the loss value is in the similar scale as the vanilla loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants