Skip to content

Commit

Permalink
Small bug in sqrt weight computation
Browse files Browse the repository at this point in the history
  • Loading branch information
lisusdaniil committed Jan 30, 2024
1 parent b7aa735 commit 9a03f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dICP/ICP.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def dICP(self, source, target, T_init, weight=None, trim_dist=None, loss_fn=None
# Compute weighted Jacobian and error, this avoids having to form a weight matrix
# which can be memory expensive
# We add and subtract 1e-5 to avoid sqrt(0) nan gradients
w_sqrt = torch.sqrt(w)
w_sqrt = torch.sqrt(w + 1.0e-10) - 1.0e-5
err_w = w_sqrt.unsqueeze(-1) * err
J_w = w_sqrt.unsqueeze(-1) * J

Expand Down

0 comments on commit 9a03f90

Please sign in to comment.