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

trilinear interp gradients by coords computation error (shape mismatch) #662

Closed
Salarios77 opened this issue Nov 24, 2022 · 1 comment
Closed
Assignees

Comments

@Salarios77
Copy link

Hi! I recently tried out the changes from a commit on kaolin that added the jacobian for trilinear interpolation w.r.t. coords (17491c8) for a kaolin-wisp nglod model and ran into a shape mismatch error when computing grad_coords = grad_output @ grad_fout_by_xyz. The error was "The size of tensor a (133232) must match the size of tensor b (15148) at non-singleton dimension 0". It seems to be due to grad_output having dim 0 as the number of coords, while grad_fout_by_xyz has dim 0 as the number of intersected cells. The test function from the same commit (test_interpolate_trilinear_by_coords_backward(self, points)) does not crash since all cells are intersected.

@Caenorst
Copy link
Collaborator

Hi @Salarios77 , I've just merged a fix on #684 hopefully that fully resolve your issue.

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

3 participants