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