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:
generatedunixname89002005307016
2020-05-21 19:40:56 -07:00
committed by Facebook GitHub Bot
parent d689baac5e
commit ae68a54f67
22 changed files with 103 additions and 5 deletions

View File

@@ -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]

View File

@@ -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: