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

vec() method failing. #21

Open
NicolayP opened this issue Sep 13, 2022 · 0 comments
Open

vec() method failing. #21

NicolayP opened this issue Sep 13, 2022 · 0 comments

Comments

@NicolayP
Copy link

Hi, I have this use case where I have an SE3 element of shape [2, 3]. When looking at the vec embedding of a subsection of it, the method fails. Here is a snap of the code to reproduce the error

poses = torch.tensor(np.zeros(shape=(2, 3, 7)), dtype=dtype, device=device)
poses[:, :, -1] = 1.
M = SE3.InitFromVec(poses)

M_init = M[:, :2] 
M_init.vec() # Fails

Upon investigation, it is triggered in the broadcasting method of the library. So I changed from view to reshape. (Can't explain the why of the solution)
Line 13 of broadcasting.py is change from

return (x.view(-1, xd).contiguous(), ), x.shape[:-1]

to

return (x.reshape(-1, xd).contiguous(), ), x.shape[:-1]
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