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

why is no_of_classes needed for weights normialisation #16

Closed
m-zheng opened this issue Jun 2, 2021 · 3 comments
Closed

why is no_of_classes needed for weights normialisation #16

m-zheng opened this issue Jun 2, 2021 · 3 comments

Comments

@m-zheng
Copy link

m-zheng commented Jun 2, 2021

Hi @vandit15,

Thanks for sharing your code.

In line 73, weights = weights / np.sum(weights) * no_of_classes, why is no_of_classes included here to normalise the weights? Any help would be thankful.

Thanks

@Wangbenzhi
Copy link

I have the same question. Do you have resolved it?

@fcakyon
Copy link

fcakyon commented Jul 22, 2022

It is not needed, @m-zheng @Wangbenzhi refer to https://github.com/fcakyon/balanced-loss for improved and maintained version

@zhandand
Copy link

zhandand commented Sep 7, 2022

The article in Section 4 has mentioned that. They normalize the sum of \alpha to C, whicH C is the total number of classes

@m-zheng m-zheng closed this as completed Sep 17, 2022
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

4 participants