diff --git a/pytorch3d/loss/mesh_normal_consistency.py b/pytorch3d/loss/mesh_normal_consistency.py index 59ab9ce8..8e55c01f 100644 --- a/pytorch3d/loss/mesh_normal_consistency.py +++ b/pytorch3d/loss/mesh_normal_consistency.py @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C def mesh_normal_consistency(meshes): diff --git a/pytorch3d/loss/point_mesh_distance.py b/pytorch3d/loss/point_mesh_distance.py index 5b1edc5a..c9f7b3bb 100644 --- a/pytorch3d/loss/point_mesh_distance.py +++ b/pytorch3d/loss/point_mesh_distance.py @@ -4,7 +4,6 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. -# pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. from pytorch3d import _C from pytorch3d.structures import Meshes, Pointclouds from torch.autograd import Function diff --git a/pytorch3d/ops/graph_conv.py b/pytorch3d/ops/graph_conv.py index 893faddf..3dff5e29 100644 --- a/pytorch3d/ops/graph_conv.py +++ b/pytorch3d/ops/graph_conv.py @@ -7,7 +7,7 @@ import torch import torch.nn as nn -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from torch.autograd import Function from torch.autograd.function import once_differentiable diff --git a/pytorch3d/ops/interp_face_attrs.py b/pytorch3d/ops/interp_face_attrs.py index bf083229..52ddcc95 100644 --- a/pytorch3d/ops/interp_face_attrs.py +++ b/pytorch3d/ops/interp_face_attrs.py @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from torch.autograd import Function from torch.autograd.function import once_differentiable diff --git a/pytorch3d/ops/knn.py b/pytorch3d/ops/knn.py index cf3cef24..403ddfbe 100644 --- a/pytorch3d/ops/knn.py +++ b/pytorch3d/ops/knn.py @@ -8,7 +8,7 @@ from collections import namedtuple from typing import Union import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from torch.autograd import Function from torch.autograd.function import once_differentiable @@ -58,7 +58,6 @@ class _knn_points(Function): in p2 has fewer than K points and where a cloud in p1 has fewer than P1 points. """ - # pyre-fixme[16]: Module `pytorch3d` has no attribute `_C`. idx, dists = _C.knn_points_idx(p1, p2, lengths1, lengths2, K, version) # sort KNN in ascending order if K > 1 @@ -74,6 +73,7 @@ class _knn_points(Function): dists[mask] = 0 else: dists, sort_idx = dists.sort(dim=2) + # pyre-fixme[16]: `Tensor` has no attribute `gather`. idx = idx.gather(2, sort_idx) ctx.save_for_backward(p1, p2, lengths1, lengths2, idx) diff --git a/pytorch3d/ops/mesh_face_areas_normals.py b/pytorch3d/ops/mesh_face_areas_normals.py index 79f937d2..11f9c9d8 100644 --- a/pytorch3d/ops/mesh_face_areas_normals.py +++ b/pytorch3d/ops/mesh_face_areas_normals.py @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from torch.autograd import Function from torch.autograd.function import once_differentiable diff --git a/pytorch3d/ops/packed_to_padded.py b/pytorch3d/ops/packed_to_padded.py index e1eec9dd..639b0062 100644 --- a/pytorch3d/ops/packed_to_padded.py +++ b/pytorch3d/ops/packed_to_padded.py @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from torch.autograd import Function from torch.autograd.function import once_differentiable diff --git a/pytorch3d/renderer/blending.py b/pytorch3d/renderer/blending.py index 7c0ba385..e177d793 100644 --- a/pytorch3d/renderer/blending.py +++ b/pytorch3d/renderer/blending.py @@ -8,7 +8,7 @@ from typing import NamedTuple, Sequence, Union import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C # Example functions for blending the top K colors per pixel using the outputs diff --git a/pytorch3d/renderer/compositing.py b/pytorch3d/renderer/compositing.py index f11e80b7..31be1443 100644 --- a/pytorch3d/renderer/compositing.py +++ b/pytorch3d/renderer/compositing.py @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C # Example functions for blending the top K features per pixel using the outputs diff --git a/pytorch3d/renderer/mesh/rasterize_meshes.py b/pytorch3d/renderer/mesh/rasterize_meshes.py index 492b0673..cc65fbe0 100644 --- a/pytorch3d/renderer/mesh/rasterize_meshes.py +++ b/pytorch3d/renderer/mesh/rasterize_meshes.py @@ -9,7 +9,7 @@ from typing import List, Optional, Tuple, Union import numpy as np import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from .clip import ( ClipFrustum, diff --git a/pytorch3d/renderer/points/pulsar/renderer.py b/pytorch3d/renderer/points/pulsar/renderer.py index 1c4acb8f..d3b7414c 100644 --- a/pytorch3d/renderer/points/pulsar/renderer.py +++ b/pytorch3d/renderer/points/pulsar/renderer.py @@ -16,7 +16,7 @@ import warnings from typing import Optional, Tuple, Union import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from pytorch3d.transforms import axis_angle_to_matrix, rotation_6d_to_matrix diff --git a/pytorch3d/renderer/points/rasterize_points.py b/pytorch3d/renderer/points/rasterize_points.py index 801b38f2..443c83cd 100644 --- a/pytorch3d/renderer/points/rasterize_points.py +++ b/pytorch3d/renderer/points/rasterize_points.py @@ -8,7 +8,7 @@ from typing import List, Optional, Tuple, Union import numpy as np import torch -from pytorch3d import _C # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. +from pytorch3d import _C from pytorch3d.renderer.mesh.rasterize_meshes import pix_to_non_square_ndc