From 8349c49227e666e3588607037ceb6930eba57a73 Mon Sep 17 00:00:00 2001 From: Jackson Cannon <8286907+cannon@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:04:35 -0800 Subject: [PATCH] Axis angle norm fix --- manopth/rodrigues_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manopth/rodrigues_layer.py b/manopth/rodrigues_layer.py index bb5ac1e..0ea2e7d 100644 --- a/manopth/rodrigues_layer.py +++ b/manopth/rodrigues_layer.py @@ -42,7 +42,7 @@ def quat2mat(quat): def batch_rodrigues(axisang): #axisang N x 3 - axisang_norm = torch.norm(axisang + 1e-8, p=2, dim=1) + axisang_norm = torch.norm(axisang, p=2, dim=1) + 1e-8 angle = torch.unsqueeze(axisang_norm, -1) axisang_normalized = torch.div(axisang, angle) angle = angle * 0.5