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

mask_arg = (maxpred != self.ignore_index) #18

Open
HaoL20 opened this issue Nov 1, 2021 · 0 comments
Open

mask_arg = (maxpred != self.ignore_index) #18

HaoL20 opened this issue Nov 1, 2021 · 0 comments

Comments

@HaoL20
Copy link

HaoL20 commented Nov 1, 2021

In the the forward() of classIW_MaxSquareloss, the code maxpred, argpred = torch.max(prob, 1) will return the values and indices, which means the maxpred is the max values and the argpred is the index.
The next line mask_arg = (maxpred != self.ignore_index), it`s going to select the unignore_index with the mask. Should it be changed like this:mask_arg = (argpred != self.ignore_index)

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

1 participant