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

Change ConfusionMatrix accumulator from Float to Long. #63

Merged
merged 1 commit into from
Aug 3, 2015

Conversation

jonathantompson
Copy link
Contributor

This might be the worlds smallest PR :-)

self.mat is only ever used as an integer accumulator, and so we're wasting a lot of bits... The max number of samples per matrix element is 2^24 = 16777216, which is actually pretty small (I hit the limit in my particular application). In retrospect, self.mat should have always been a LongTensor.

I don't think there are any unintended consequences. But if someone could do a quick scan of the code to double check, that would be awesome.

Cheers,
Jonathan

soumith added a commit that referenced this pull request Aug 3, 2015
Change ConfusionMatrix accumulator from Float to Long.
@soumith soumith merged commit e345281 into torch:master Aug 3, 2015
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

Successfully merging this pull request may close these issues.

2 participants