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

Fix Jacobian #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lietorch/extras/se3_builder.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -431,4 +431,4 @@ std::vector<torch::Tensor> se3_build_backward_cuda(
radius);

return {attention_grad, targets_grad, weights_grad};
}
}
6 changes: 3 additions & 3 deletions lietorch/extras/se3_inplace_builder.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -678,4 +678,4 @@ std::vector<torch::Tensor> dense_se3_backward_cuda(
radius);

return {embedding_grad, targets_grad, weights_grad};
}
}