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