Skip to content

Commit

Permalink
Remove unused imports after manual review (#3229)
Browse files Browse the repository at this point in the history
* remove unused imports after manual review

* Update torchvision/datasets/voc.py

Co-authored-by: Vasilis Vryniotis <[email protected]>

* remove two more instances

Co-authored-by: Ben Weinstein <[email protected]>
Co-authored-by: Vasilis Vryniotis <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2021
1 parent 7325e1d commit 7536e29
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion references/classification/train_quantization.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import datetime
import os
import time
import sys
import copy

import torch
Expand Down
1 change: 0 additions & 1 deletion references/detection/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import torch
import torch.utils.data
from torch import nn
import torchvision
import torchvision.models.detection
import torchvision.models.detection.mask_rcnn
Expand Down
1 change: 0 additions & 1 deletion references/detection/transforms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import random
import torch

from torchvision.transforms import functional as F

Expand Down
1 change: 0 additions & 1 deletion references/similarity/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import torch
import torch.nn as nn
import torchvision.models as models

Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/cityscapes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import os
from collections import namedtuple
import zipfile
from typing import Any, Callable, Dict, List, Optional, Union, Tuple

from .utils import extract_archive, verify_str_arg, iterable_to_str
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/omniglot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from PIL import Image
from os.path import join
import os
from typing import Any, Callable, List, Optional, Tuple
from .vision import VisionDataset
from .utils import download_and_extract_archive, check_integrity, list_dir, list_files
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/ucf101.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import glob
import os

from .utils import list_dir
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os.path
import hashlib
import gzip
import errno
import tarfile
from typing import Any, Callable, List, Iterable, Optional, TypeVar
import zipfile
Expand Down
1 change: 0 additions & 1 deletion torchvision/datasets/video_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from torchvision.io import (
_probe_video_from_file,
_read_video_from_file,
_read_video_timestamps_from_file,
read_video,
read_video_timestamps,
)
Expand Down
4 changes: 2 additions & 2 deletions torchvision/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from .vision import VisionDataset
import xml.etree.ElementTree as ET
from PIL import Image
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from .utils import download_url, check_integrity, verify_str_arg
from typing import Any, Callable, Dict, Optional, Tuple
from .utils import download_url, verify_str_arg

DATASET_YEAR_DICT = {
'2012': {
Expand Down
3 changes: 0 additions & 3 deletions torchvision/models/detection/mask_rcnn.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from collections import OrderedDict

import torch
from torch import nn
import torch.nn.functional as F

from torchvision.ops import misc as misc_nn_ops
from torchvision.ops import MultiScaleRoIAlign

from ._utils import overwrite_eps
Expand Down
1 change: 0 additions & 1 deletion torchvision/models/detection/transform.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import random
import math
import torch
from torch import nn, Tensor
Expand Down
1 change: 0 additions & 1 deletion torchvision/models/video/resnet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import torch
import torch.nn as nn

from ..utils import load_state_dict_from_url
Expand Down

0 comments on commit 7536e29

Please sign in to comment.