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
Is this implementation correct? #4
Comments
@HHHHHHHHHHao I have the same question. Can you help me? |
@HHHHHHHHHHao I have the same question too. Why? |
sorry I didn't figure out yet... |
I know this is an old issue but I just want to give my understanding to any one who has the same question (as I did too) Yes, the columns should have different values. But since Cross Entropy and Focal Loss take the one-hot labels of the target and multiply it by this weight matrix, essentially the final result is that you are only taking the weight for a particular class. That particular class' weight is actually the one you see above, repeated along the entire column. Hope I helped! |
Hi, I wonder if this implementation is correct?
When I run the code with softmax, I get weights like this:
where each sample enjoin the same weights.
This is weird, right? According to the original paper, we should have different weight for each class (column), right?
The text was updated successfully, but these errors were encountered: