diff --git a/lietorch/extras/se3_builder.cu b/lietorch/extras/se3_builder.cu index 38401fe..edf92d8 100644 --- a/lietorch/extras/se3_builder.cu +++ b/lietorch/extras/se3_builder.cu @@ -158,8 +158,8 @@ __global__ void se3_build_forward_kernel( Jz[0] = 0.0; Jz[1] = 0.0; Jz[2] = -d2; - Jz[3] = d * Y1; - Jz[4] = -d * X1; + Jz[3] = -d2 * Y1; + Jz[4] = d2 * X1; Jz[5] = 0.0; for (int ii=0; ii<6; ii++) { @@ -318,8 +318,8 @@ __global__ void se3_build_backward_kernel( Jz[0] = 0.0; Jz[1] = 0.0; Jz[2] = -d2; - Jz[3] = d * Y1; - Jz[4] = -d * X1; + Jz[3] = -d2 * Y1; + Jz[4] = d2 * X1; Jz[5] = 0.0; for (int ii=0; ii<6; ii++) { @@ -431,4 +431,4 @@ std::vector se3_build_backward_cuda( radius); return {attention_grad, targets_grad, weights_grad}; -} \ No newline at end of file +} diff --git a/lietorch/extras/se3_inplace_builder.cu b/lietorch/extras/se3_inplace_builder.cu index e96547d..5168e03 100644 --- a/lietorch/extras/se3_inplace_builder.cu +++ b/lietorch/extras/se3_inplace_builder.cu @@ -52,8 +52,8 @@ pinhole_jacobians(const float p[3], const float fx, const float fy, float Ju[6], Jz[0] = 0.0; Jz[1] = 0.0; Jz[2] = -d2; - Jz[3] = d * Y1; - Jz[4] = -d * X1; + Jz[3] = -d2 * Y1; + Jz[4] = d2 * X1; Jz[5] = 0.0; } @@ -678,4 +678,4 @@ std::vector dense_se3_backward_cuda( radius); return {embedding_grad, targets_grad, weights_grad}; -} \ No newline at end of file +}