-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
torch.all only returns true if all numbers in the tensor are odd #517
Comments
ivpopov
added a commit
to ivpopov/torch7
that referenced
this issue
Feb 4, 2016
torch.all only returns true if all numbers in the tensor are odd torch#517
ivpopov
added a commit
to ivpopov/torch7
that referenced
this issue
Feb 8, 2016
torch.all only returns true if all numbers in the tensor are odd torch#517 Update THTensorMath.c Respective test
@dominikgrewe Seems to be fixed, can we close it? |
colesbury
pushed a commit
to colesbury/torch7
that referenced
this issue
Nov 3, 2016
torch.all only returns true if all numbers in the tensor are odd torch#517 Update THTensorMath.c Respective test
colesbury
pushed a commit
to colesbury/torch7
that referenced
this issue
Nov 3, 2016
Fix for issue torch#517: torch.all
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It uses a bit-wise reduction with
&=
and initialization 1, i.e. it only looks at the lowest bit of all numbers. It should use a logical and instead.For example
return torch.ByteTensor(3):fill(2):all()
returnsfalse
.The text was updated successfully, but these errors were encountered: