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

ConfusionMatrix:add(pred, target) has logical error when target is a dim1 tensor of length 1 #83

Open
pengsun opened this issue Oct 16, 2015 · 0 comments

Comments

@pengsun
Copy link

pengsun commented Oct 16, 2015

because these two lines of code don't check the length of target and the self.mat will be wrongly updated if target:numel()==1.

Note that feeding ConfusionMatrix with target being a dim 1 tensor of length 1 is possible because of this modification to nn.ClassNLLCriterion. I didn't submit a patch because I'm not sure whether we should support or disallow this kind of size.

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