mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 07:10:34 +08:00
suppress errors in vision - batch 1
Summary: This diff is auto-generated to upgrade the Pyre version and suppress errors in vision. The upgrade will affect Pyre local configurations in the following directories: ``` vision/ale/search vision/fair/fvcore vision/fair/pytorch3d vision/ocr/rosetta_hash vision/vogue/personalization ``` Differential Revision: D21688454 fbshipit-source-id: 1f3c3fee42b6da2e162fd0932742ab8c5c96aa45
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d689baac5e
commit
ae68a54f67
@@ -77,6 +77,7 @@ def so3_rotation_angle(R, eps: float = 1e-4, cos_angle: bool = False):
|
||||
if cos_angle:
|
||||
return phi
|
||||
else:
|
||||
# pyre-fixme[16]: `float` has no attribute `acos`.
|
||||
return phi.acos()
|
||||
|
||||
|
||||
@@ -118,6 +119,7 @@ def so3_exponential_map(log_rot, eps: float = 0.0001):
|
||||
skews = hat(log_rot)
|
||||
|
||||
R = (
|
||||
# pyre-fixme[16]: `float` has no attribute `__getitem__`.
|
||||
fac1[:, None, None] * skews
|
||||
+ fac2[:, None, None] * torch.bmm(skews, skews)
|
||||
+ torch.eye(3, dtype=log_rot.dtype, device=log_rot.device)[None]
|
||||
|
||||
@@ -155,6 +155,7 @@ class Transform3d:
|
||||
if matrix is None:
|
||||
self._matrix = torch.eye(4, dtype=dtype, device=device).view(1, 4, 4)
|
||||
else:
|
||||
# pyre-fixme[16]: `Tensor` has no attribute `ndim`.
|
||||
if matrix.ndim not in (2, 3):
|
||||
raise ValueError('"matrix" has to be a 2- or a 3-dimensional tensor.')
|
||||
if matrix.shape[-2] != 4 or matrix.shape[-1] != 4:
|
||||
|
||||
Reference in New Issue
Block a user