From d9839a95f23db082667625a784e5ead6ed9e8e03 Mon Sep 17 00:00:00 2001 From: generatedunixname1417043136753450 Date: Mon, 23 Feb 2026 15:52:03 -0800 Subject: [PATCH] fbcode/vision/fair/pytorch3d/pytorch3d/ops/cameras_alignment.py Reviewed By: sgrigory Differential Revision: D93710806 fbshipit-source-id: da6c1e1e5b7a1c5cdfbf5026993c42c7ec387415 --- pytorch3d/ops/cameras_alignment.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytorch3d/ops/cameras_alignment.py b/pytorch3d/ops/cameras_alignment.py index 3b2becb8..b6575902 100644 --- a/pytorch3d/ops/cameras_alignment.py +++ b/pytorch3d/ops/cameras_alignment.py @@ -223,8 +223,7 @@ def _align_camera_extrinsics( # of centered A and centered B Ac = A - Amu Bc = B - Bmu - # pyre-fixme[58]: `**` is not supported for operand types `Tensor` and `int`. - align_t_s = (Ac * Bc).mean() / (Ac**2).mean().clamp(eps) + align_t_s = (Ac * Bc).mean() / torch.square(Ac).mean().clamp(eps) else: # set the scale to identity align_t_s = 1.0