trilinear interp gradients by coords computation error (shape mismatch)
Salarios77 opened this issue · 1 comments
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.
Hi @Salarios77 , I've just merged a fix on #684 hopefully that fully resolve your issue.