Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Many Unused Imports #3740

Merged
merged 2 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion torchvision/datasets/hmdb51.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import glob
import os

from .utils import list_dir
from .folder import find_classes, make_dataset
from .video_utils import VideoClips
from .vision import VisionDataset
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/ucf101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os

from .utils import list_dir
from .folder import find_classes, make_dataset
from .video_utils import VideoClips
from .vision import VisionDataset
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/voc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import tarfile
import collections
from .vision import VisionDataset
from xml.etree.ElementTree import Element as ET_Element
Expand Down
1 change: 0 additions & 1 deletion torchvision/io/_video_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
if os.name == 'nt':
# Load the video_reader extension using LoadLibraryExW
import ctypes
import sys

kernel32 = ctypes.WinDLL('kernel32.dll', use_last_error=True)
with_load_library_flags = hasattr(kernel32, 'AddDllDirectory')
Expand Down
1 change: 0 additions & 1 deletion torchvision/io/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
if os.name == 'nt':
# Load the image extension using LoadLibraryExW
import ctypes
import sys

kernel32 = ctypes.WinDLL('kernel32.dll', use_last_error=True)
with_load_library_flags = hasattr(kernel32, 'AddDllDirectory')
Expand Down
1 change: 0 additions & 1 deletion torchvision/io/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import torch

from . import _video_opt
from ._video_opt import VideoMetaData


try:
Expand Down
1 change: 0 additions & 1 deletion torchvision/models/detection/faster_rcnn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import torch
from torch import nn
import torch.nn.functional as F

Expand Down
1 change: 0 additions & 1 deletion torchvision/models/quantization/inception.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import warnings
from collections import namedtuple

import torch
import torch.nn as nn
Expand Down
3 changes: 1 addition & 2 deletions torchvision/models/quantization/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from torchvision.models.resnet import Bottleneck, BasicBlock, ResNet, model_urls
import torch.nn as nn
from torchvision.models.utils import load_state_dict_from_url
from torch.quantization import QuantStub, DeQuantStub, fuse_modules
from torch._jit_internal import Optional
from torch.quantization import fuse_modules
from .utils import _replace_relu, quantize_model

__all__ = ['QuantizableResNet', 'resnet18', 'resnet50',
Expand Down