We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In MulticlassExactMatch, ignore_index kwarg doesn't do anything.
ignore_index
Steps to reproduce the behavior...
>>> preds = torch.tensor([[1,1,1,2,2,2,2], [2,2,2,2,2,2,2]]) >>> target = torch.tensor([[1,1,1,2,-100,-100,-100], [1,1,2,2,-100,-100,-100]]) >>> preds tensor([[1, 1, 1, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2]]) >>> target tensor([[ 1, 1, 1, 2, -100, -100, -100], [ 1, 1, 2, 2, -100, -100, -100]]) >>> exact_match = MulticlassExactMatch(task='multiclass', num_classes=2, ignore_index=-100) >>> exact_match.update(preds, target) >>> exact_match.compute()
this should be 0.5 but it is 0
I expected it to ignore the locations where my target == -100
Python 3.8.15 torchmetrics via pip '0.11.0' torch '1.11.0+cu113' Linux
The text was updated successfully, but these errors were encountered:
Hi! thanks for your contribution!, great first issue!
Sorry, something went wrong.
Hey @ItamarChinn, thank you for your issue. This indeed doesn't look correct. would you be interested in submitting a fix?
Sure
exact_match
SkafteNicki
Successfully merging a pull request may close this issue.
🐛 Bug
In MulticlassExactMatch,
ignore_index
kwarg doesn't do anything.To Reproduce
Steps to reproduce the behavior...
this should be 0.5 but it is 0
Expected behavior
I expected it to ignore the locations where my target == -100
Environment
Python 3.8.15
torchmetrics via pip '0.11.0'
torch '1.11.0+cu113'
Linux
The text was updated successfully, but these errors were encountered: