We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb2802e commit 6add179Copy full SHA for 6add179
torchvision/datasets/imagenet.py
@@ -1,7 +1,6 @@
1
import os
2
import sys
3
import shutil
4
-import scipy.io as sio
5
import torch
6
from .folder import ImageFolder
7
from .utils import check_integrity, download_url
@@ -210,6 +209,8 @@ def parse_devkit(root):
210
209
211
def parse_meta(devkit_root, path='data', filename='meta.mat'):
212
# FIXME: generalize this for all years
+ import scipy.io as sio
213
+
214
metafile = os.path.join(devkit_root, path, filename)
215
meta = sio.loadmat(metafile, squeeze_me=True)['synsets']
216
idcs, wnids, classes = list(zip(*meta))[:3]
0 commit comments