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

Update mask inversion inside torch/so3.py #6

Closed
Ronnypetson opened this issue Dec 1, 2019 · 1 comment
Closed

Update mask inversion inside torch/so3.py #6

Ronnypetson opened this issue Dec 1, 2019 · 1 comment

Comments

@Ronnypetson
Copy link

Ronnypetson commented Dec 1, 2019

I recently found two occurrences of this error, both in torch/so3.py:

Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/.local/lib/python3.6/site-packages/liegroups/torch/se3.py", line 80, in exp
rot_jac = cls.RotationType.left_jacobian(phi)
File "/home/ubuntu/.local/lib/python3.6/site-packages/liegroups/torch/so3.py", line 187, in left_jacobian
#large_angle_mask = 1 - small_angle_mask # element-wise not
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/tensor.py", line 362, in rsub
return _C._VariableFunctions.rsub(self, other)
RuntimeError: Subtraction, the - operator, with a bool tensor is not supported. If you are trying to invert a mask, use the ~ or logical_not() operator instead.

I could verify locally that it is just a matter of doing what is suggested and it works fine.
P.S.: My pytorch version is 1.3

@leeclemnet
Copy link
Member

This should be fixed in master as of 79ec37c.

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

2 participants