From d902a96ca23b277b41727ea8dbb1ba04417095b6 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Mon, 28 Sep 2020 13:32:08 -0700 Subject: [PATCH] suppress errors in `vision` - batch 1 Differential Revision: D23970214 fbshipit-source-id: b6a328f53178304b36556b5cf96584467a7d2ce4 --- pytorch3d/io/mtl_io.py | 2 +- pytorch3d/renderer/mesh/textures.py | 1 - pytorch3d/renderer/points/rasterize_points.py | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch3d/io/mtl_io.py b/pytorch3d/io/mtl_io.py index 5b5ec940..59a27dc1 100644 --- a/pytorch3d/io/mtl_io.py +++ b/pytorch3d/io/mtl_io.py @@ -70,7 +70,7 @@ def make_mesh_texture_atlas( The integer part will be ignored to form a repeating pattern." warnings.warn(msg) # pyre-fixme[9]: faces_verts_uvs has type `Tensor`; used as `int`. - # pyre-fixme[6]: Expected `int` for 1st param but got `Tensor`. + # pyre-fixme[58]: `%` is not supported for operand types `Tensor` and `int`. faces_verts_uvs = faces_verts_uvs % 1 elif texture_wrap == "clamp": # Clamp uv coordinates to the [0, 1] range. diff --git a/pytorch3d/renderer/mesh/textures.py b/pytorch3d/renderer/mesh/textures.py index 05074702..60d6224a 100644 --- a/pytorch3d/renderer/mesh/textures.py +++ b/pytorch3d/renderer/mesh/textures.py @@ -211,7 +211,6 @@ class TexturesBase: index = torch.tensor(index) if isinstance(index, torch.Tensor): if index.dtype == torch.bool: - # pyre-fixme[16]: `Tensor` has no attribute `nonzero`. index = index.nonzero() index = index.squeeze(1) if index.numel() > 0 else index index = index.tolist() diff --git a/pytorch3d/renderer/points/rasterize_points.py b/pytorch3d/renderer/points/rasterize_points.py index fc3cff19..f8dadd05 100644 --- a/pytorch3d/renderer/points/rasterize_points.py +++ b/pytorch3d/renderer/points/rasterize_points.py @@ -95,7 +95,8 @@ def rasterize_points( if bin_size != 0: # There is a limit on the number of points per bin in the cuda kernel. - # pyre-fixme[6]: Expected `int` for 1st param but got `Union[int, None, int]`. + # pyre-fixme[58]: `//` is not supported for operand types `int` and + # `Union[int, None, int]`. points_per_bin = 1 + (image_size - 1) // bin_size if points_per_bin >= kMaxPointsPerBin: raise ValueError(