lint fixes

Summary: Fixing recent lint problems.

Reviewed By: patricklabatut

Differential Revision: D29522647

fbshipit-source-id: 9bd89fbfa512ecd7359ec355cf12b16fb7024b47
This commit is contained in:
Jeremy Reizenstein 2021-07-01 16:07:01 -07:00 committed by Facebook GitHub Bot
parent 5615f072d7
commit 61754b2fac
8 changed files with 12 additions and 19 deletions

View File

@ -4,6 +4,7 @@
# This source code is licensed under the BSD-style license found in the # This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. # LICENSE file in the root directory of this source tree.
from .types import Device, make_device, get_device from .types import Device, get_device, make_device
__all__ = [k for k in globals().keys() if not k.startswith("_")] __all__ = [k for k in globals().keys() if not k.startswith("_")]

View File

@ -10,7 +10,7 @@ import os
import warnings import warnings
from collections import namedtuple from collections import namedtuple
from pathlib import Path from pathlib import Path
from typing import List, Optional, Union from typing import List, Optional
import numpy as np import numpy as np
import torch import torch
@ -18,12 +18,7 @@ from iopath.common.file_io import PathManager
from PIL import Image from PIL import Image
from pytorch3d.common.types import Device from pytorch3d.common.types import Device
from pytorch3d.io.mtl_io import load_mtl, make_mesh_texture_atlas from pytorch3d.io.mtl_io import load_mtl, make_mesh_texture_atlas
from pytorch3d.io.utils import ( from pytorch3d.io.utils import PathOrStr, _check_faces_indices, _make_tensor, _open_file
PathOrStr,
_check_faces_indices,
_make_tensor,
_open_file,
)
from pytorch3d.renderer import TexturesAtlas, TexturesUV from pytorch3d.renderer import TexturesAtlas, TexturesUV
from pytorch3d.structures import Meshes, join_meshes_as_batch from pytorch3d.structures import Meshes, join_meshes_as_batch

View File

@ -6,7 +6,7 @@
import pathlib import pathlib
from typing import Optional, Tuple, Union from typing import Optional, Tuple
from iopath.common.file_io import PathManager from iopath.common.file_io import PathManager
from pytorch3d.common.types import Device from pytorch3d.common.types import Device

View File

@ -15,17 +15,12 @@ import sys
import warnings import warnings
from collections import namedtuple from collections import namedtuple
from io import BytesIO, TextIOBase from io import BytesIO, TextIOBase
from typing import List, Optional, Tuple, Union, cast from typing import List, Optional, Tuple, cast
import numpy as np import numpy as np
import torch import torch
from iopath.common.file_io import PathManager from iopath.common.file_io import PathManager
from pytorch3d.io.utils import ( from pytorch3d.io.utils import PathOrStr, _check_faces_indices, _make_tensor, _open_file
PathOrStr,
_check_faces_indices,
_make_tensor,
_open_file,
)
from pytorch3d.renderer import TexturesVertex from pytorch3d.renderer import TexturesVertex
from pytorch3d.structures import Meshes, Pointclouds from pytorch3d.structures import Meshes, Pointclouds

View File

@ -9,7 +9,7 @@ from .cubify import cubify
from .graph_conv import GraphConv from .graph_conv import GraphConv
from .interp_face_attrs import interpolate_face_attributes from .interp_face_attrs import interpolate_face_attributes
from .knn import knn_gather, knn_points from .knn import knn_gather, knn_points
from .laplacian_matrices import laplacian, cot_laplacian, norm_laplacian from .laplacian_matrices import cot_laplacian, laplacian, norm_laplacian
from .mesh_face_areas_normals import mesh_face_areas_normals from .mesh_face_areas_normals import mesh_face_areas_normals
from .mesh_filtering import taubin_smoothing from .mesh_filtering import taubin_smoothing
from .packed_to_padded import packed_to_padded, padded_to_packed from .packed_to_padded import packed_to_padded, padded_to_packed

View File

@ -8,6 +8,7 @@ from typing import Tuple
import torch import torch
# ------------------------ Laplacian Matrices ------------------------ # # ------------------------ Laplacian Matrices ------------------------ #
# This file contains implementations of differentiable laplacian matrices. # This file contains implementations of differentiable laplacian matrices.
# These include # These include

View File

@ -18,6 +18,7 @@ from pytorch3d.utils import (
opencv_from_cameras_projection, opencv_from_cameras_projection,
) )
DATA_DIR = get_tests_dir() / "data" DATA_DIR = get_tests_dir() / "data"

View File

@ -8,7 +8,7 @@ import unittest
import torch import torch
from common_testing import TestCaseMixin, get_random_cuda_device from common_testing import TestCaseMixin, get_random_cuda_device
from pytorch3d.ops import laplacian, norm_laplacian, cot_laplacian from pytorch3d.ops import cot_laplacian, laplacian, norm_laplacian
from pytorch3d.structures.meshes import Meshes from pytorch3d.structures.meshes import Meshes
@ -54,7 +54,7 @@ class TestLaplacianMatrices(TestCaseMixin, unittest.TestCase):
mesh = self.init_mesh() mesh = self.init_mesh()
verts = mesh.verts_packed() verts = mesh.verts_packed()
faces = mesh.faces_packed() faces = mesh.faces_packed()
V, F = verts.shape[0], faces.shape[0] V = verts.shape[0]
eps = 1e-12 eps = 1e-12