From 9a03f9058c15bd3cfe96af696d1d301ffc15567c Mon Sep 17 00:00:00 2001 From: Daniil Date: Tue, 30 Jan 2024 17:49:20 -0500 Subject: [PATCH] Small bug in sqrt weight computation --- dICP/ICP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dICP/ICP.py b/dICP/ICP.py index 8354dff..b591649 100644 --- a/dICP/ICP.py +++ b/dICP/ICP.py @@ -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