diff --git a/pytorch3d/ops/graph_conv.py b/pytorch3d/ops/graph_conv.py index 2d997b25..0de1adc5 100644 --- a/pytorch3d/ops/graph_conv.py +++ b/pytorch3d/ops/graph_conv.py @@ -39,7 +39,6 @@ class GraphConv(nn.Module): if init == "normal": nn.init.normal_(self.w0.weight, mean=0, std=0.01) nn.init.normal_(self.w1.weight, mean=0, std=0.01) - # pyre-fixme[16]: Optional type has no attribute `data`. self.w0.bias.data.zero_() self.w1.bias.data.zero_() elif init == "zero": diff --git a/pytorch3d/ops/vert_align.py b/pytorch3d/ops/vert_align.py index bfcbb76e..06c2d462 100644 --- a/pytorch3d/ops/vert_align.py +++ b/pytorch3d/ops/vert_align.py @@ -87,6 +87,7 @@ def vert_align( padding_mode=padding_mode, align_corners=align_corners, ) # (N, C, 1, V) + # pyre-fixme[28]: Unexpected keyword argument `dim`. feat_sampled = feat_sampled.squeeze(dim=2).transpose(1, 2) # (N, V, C) feats_sampled.append(feat_sampled) feats_sampled = torch.cat(feats_sampled, dim=2) # (N, V, sum(C)) diff --git a/pytorch3d/renderer/mesh/shader.py b/pytorch3d/renderer/mesh/shader.py index 6977c04b..755b213d 100644 --- a/pytorch3d/renderer/mesh/shader.py +++ b/pytorch3d/renderer/mesh/shader.py @@ -64,6 +64,7 @@ class HardPhongShader(nn.Module): self.cameras = cameras self.blend_params = blend_params if blend_params is not None else BlendParams() + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device): # Manually move to device modules which are not subclasses of nn.Module cameras = self.cameras @@ -126,6 +127,7 @@ class SoftPhongShader(nn.Module): self.cameras = cameras self.blend_params = blend_params if blend_params is not None else BlendParams() + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device): # Manually move to device modules which are not subclasses of nn.Module cameras = self.cameras @@ -193,6 +195,7 @@ class HardGouraudShader(nn.Module): self.cameras = cameras self.blend_params = blend_params if blend_params is not None else BlendParams() + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device): # Manually move to device modules which are not subclasses of nn.Module cameras = self.cameras @@ -259,6 +262,7 @@ class SoftGouraudShader(nn.Module): self.cameras = cameras self.blend_params = blend_params if blend_params is not None else BlendParams() + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device): # Manually move to device modules which are not subclasses of nn.Module cameras = self.cameras @@ -346,6 +350,7 @@ class HardFlatShader(nn.Module): self.cameras = cameras self.blend_params = blend_params if blend_params is not None else BlendParams() + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device): # Manually move to device modules which are not subclasses of nn.Module cameras = self.cameras diff --git a/pytorch3d/renderer/mesh/textures.py b/pytorch3d/renderer/mesh/textures.py index bddf624e..3407d863 100644 --- a/pytorch3d/renderer/mesh/textures.py +++ b/pytorch3d/renderer/mesh/textures.py @@ -131,7 +131,12 @@ def _pad_texture_maps( if image.shape[:2] != max_shape: image_BCHW = image.permute(2, 0, 1)[None] new_image_BCHW = interpolate( - image_BCHW, size=max_shape, mode="bilinear", align_corners=align_corners + image_BCHW, + # pyre-fixme[6]: Expected `Optional[int]` for 2nd param but got + # `Tuple[int, int]`. + size=max_shape, + mode="bilinear", + align_corners=align_corners, ) tex_maps[i] = new_image_BCHW[0].permute(1, 2, 0) tex_maps = torch.stack(tex_maps, dim=0) # (num_tex_maps, max_H, max_W, C) diff --git a/pytorch3d/renderer/utils.py b/pytorch3d/renderer/utils.py index 9cf5330a..fd99e8a4 100644 --- a/pytorch3d/renderer/utils.py +++ b/pytorch3d/renderer/utils.py @@ -163,6 +163,7 @@ class TensorProperties(nn.Module): msg = "Expected index of type int or slice; got %r" raise ValueError(msg % type(index)) + # pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently. def to(self, device: Device = "cpu") -> "TensorProperties": """ In place operation to move class properties which are tensors to a @@ -180,6 +181,7 @@ class TensorProperties(nn.Module): def cpu(self) -> "TensorProperties": return self.to("cpu") + # pyre-fixme[14]: `cuda` overrides method defined in `Module` inconsistently. def cuda(self, device: Optional[int] = None) -> "TensorProperties": return self.to(f"cuda:{device}" if device is not None else "cuda")