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

[Issue #578] Remove dependency of imagenet_dataset.py on torch._six #579

Merged
merged 2 commits into from
Mar 6, 2021
Merged
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
4 changes: 3 additions & 1 deletion pl_bolts/datasets/imagenet_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gzip
import hashlib
import os
import sys
import shutil
import tarfile
import tempfile
Expand All @@ -9,11 +10,12 @@

import numpy as np
import torch
from torch._six import PY3

from pl_bolts.utils import _TORCHVISION_AVAILABLE
from pl_bolts.utils.warnings import warn_missing_pkg

PY3 = sys.version_info[0] == 3

if _TORCHVISION_AVAILABLE:
from torchvision.datasets import ImageNet
from torchvision.datasets.imagenet import load_meta_file
Expand Down