Skip to content

Commit d9839a9

Browse files
generatedunixname1417043136753450meta-codesync[bot]
authored andcommitted
fbcode/vision/fair/pytorch3d/pytorch3d/ops/cameras_alignment.py
Reviewed By: sgrigory Differential Revision: D93710806 fbshipit-source-id: da6c1e1e5b7a1c5cdfbf5026993c42c7ec387415
1 parent 7b5c784 commit d9839a9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pytorch3d/ops/cameras_alignment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ def _align_camera_extrinsics(
223223
# of centered A and centered B
224224
Ac = A - Amu
225225
Bc = B - Bmu
226-
# pyre-fixme[58]: `**` is not supported for operand types `Tensor` and `int`.
227-
align_t_s = (Ac * Bc).mean() / (Ac**2).mean().clamp(eps)
226+
align_t_s = (Ac * Bc).mean() / torch.square(Ac).mean().clamp(eps)
228227
else:
229228
# set the scale to identity
230229
align_t_s = 1.0

0 commit comments

Comments
 (0)