mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 11:52:50 +08:00
suppress errors in vision/fair/pytorch3d
Differential Revision: D31042748 fbshipit-source-id: fffb983bd6765d306a407587ddf64e68e57e9ecc
This commit is contained in:
parent
bd04ffaf77
commit
526df446c6
@ -146,7 +146,6 @@ def compute_extrinsic_matrix(azimuth, elevation, distance): # pragma: no cover
|
||||
def read_binvox_coords(
|
||||
f,
|
||||
integer_division: bool = True,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
): # pragma: no cover
|
||||
"""
|
||||
|
@ -576,19 +576,16 @@ def _load_obj(
|
||||
mtl_path,
|
||||
) = _parse_obj(f_obj, data_dir)
|
||||
|
||||
# pyre-fixme[6]: Expected `dtype` for 3rd param but got `Type[torch.float32]`.
|
||||
verts = _make_tensor(verts, cols=3, dtype=torch.float32, device=device) # (V, 3)
|
||||
normals = _make_tensor(
|
||||
normals,
|
||||
cols=3,
|
||||
# pyre-fixme[6]: Expected `dtype` for 3rd param but got `Type[torch.float32]`.
|
||||
dtype=torch.float32,
|
||||
device=device,
|
||||
) # (N, 3)
|
||||
verts_uvs = _make_tensor(
|
||||
verts_uvs,
|
||||
cols=2,
|
||||
# pyre-fixme[6]: Expected `dtype` for 3rd param but got `Type[torch.float32]`.
|
||||
dtype=torch.float32,
|
||||
device=device,
|
||||
) # (T, 2)
|
||||
|
@ -884,7 +884,6 @@ def _get_verts(
|
||||
and vertex[0].ndim == 2
|
||||
and vertex[0].shape[1] == 3
|
||||
):
|
||||
# pyre-fixme[6]: Expected `dtype` for 3rd param but got `Type[torch.float32]`.
|
||||
return _make_tensor(vertex[0], cols=3, dtype=torch.float32), None, None
|
||||
|
||||
vertex_colors = None
|
||||
|
@ -106,7 +106,6 @@ def eyes(
|
||||
dim: int,
|
||||
N: int,
|
||||
device: Optional[torch.device] = None,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
) -> torch.Tensor:
|
||||
"""
|
||||
|
@ -253,8 +253,6 @@ class CamerasBase(TensorProperties):
|
||||
input points to the renderer to be in NDC space.
|
||||
"""
|
||||
if self.in_ndc():
|
||||
# pyre-fixme[6]: Expected `dtype` for 2nd param but got
|
||||
# `Type[torch.float32]`.
|
||||
return Transform3d(device=self.device, dtype=torch.float32)
|
||||
else:
|
||||
# For custom cameras which can be defined in screen space,
|
||||
@ -1033,8 +1031,6 @@ class PerspectiveCameras(CamerasBase):
|
||||
i.e. +X left, +Y up.
|
||||
"""
|
||||
if self.in_ndc():
|
||||
# pyre-fixme[6]: Expected `dtype` for 2nd param but got
|
||||
# `Type[torch.float32]`.
|
||||
ndc_transform = Transform3d(device=self.device, dtype=torch.float32)
|
||||
else:
|
||||
# when cameras are defined in screen/image space, the principal point is
|
||||
@ -1233,8 +1229,6 @@ class OrthographicCameras(CamerasBase):
|
||||
i.e. +X left, +Y up.
|
||||
"""
|
||||
if self.in_ndc():
|
||||
# pyre-fixme[6]: Expected `dtype` for 2nd param but got
|
||||
# `Type[torch.float32]`.
|
||||
ndc_transform = Transform3d(device=self.device, dtype=torch.float32)
|
||||
else:
|
||||
# when cameras are defined in screen/image space, the principal point is
|
||||
|
@ -96,7 +96,6 @@ class TensorProperties(nn.Module):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Device = "cpu",
|
||||
**kwargs,
|
||||
@ -278,7 +277,6 @@ class TensorProperties(nn.Module):
|
||||
|
||||
def format_tensor(
|
||||
input,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Device = "cpu",
|
||||
) -> torch.Tensor:
|
||||
@ -309,7 +307,6 @@ def format_tensor(
|
||||
|
||||
def convert_to_tensors_and_broadcast(
|
||||
*args,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Device = "cpu",
|
||||
):
|
||||
|
@ -142,7 +142,6 @@ class Transform3d:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Device = "cpu",
|
||||
matrix: Optional[torch.Tensor] = None,
|
||||
@ -462,7 +461,6 @@ class Translate(Transform3d):
|
||||
x,
|
||||
y=None,
|
||||
z=None,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Optional[Device] = None,
|
||||
) -> None:
|
||||
@ -504,7 +502,6 @@ class Scale(Transform3d):
|
||||
x,
|
||||
y=None,
|
||||
z=None,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Optional[Device] = None,
|
||||
) -> None:
|
||||
@ -550,7 +547,6 @@ class Rotate(Transform3d):
|
||||
def __init__(
|
||||
self,
|
||||
R: torch.Tensor,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float32]`.
|
||||
dtype: torch.dtype = torch.float32,
|
||||
device: Optional[Device] = None,
|
||||
orthogonal_tol: float = 1e-5,
|
||||
@ -592,7 +588,6 @@ class RotateAxisAngle(Rotate):
|
||||
angle,
|
||||
axis: str = "X",
|
||||
degrees: bool = True,
|
||||
# pyre-fixme[9]: dtype has type `dtype`; used as `Type[torch.float64]`.
|
||||
dtype: torch.dtype = torch.float64,
|
||||
device: Optional[Device] = None,
|
||||
) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user