Update imagenette.py
Browse files- imagenette.py +4 -3
imagenette.py
CHANGED
|
@@ -139,17 +139,18 @@ class Imagenette(datasets.GeneratorBasedBuilder):
|
|
| 139 |
"""Returns SplitGenerators."""
|
| 140 |
print(self.__dict__.keys())
|
| 141 |
print(self.config)
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
# Download the ref:label map for imagenet
|
| 144 |
-
path = dl_manager.download_and_extract(url)
|
| 145 |
refs_path = dl_manager.download(_URL_IMAGENET_REFS)
|
| 146 |
with open(refs_path) as f:
|
| 147 |
self.ref_to_label = json.load(f)
|
| 148 |
|
| 149 |
|
| 150 |
-
name = self.config.name
|
| 151 |
-
dirname = _NAME_TO_DIR[name]
|
| 152 |
url = _URL_PREFIX + "{}.tgz".format(dirname)
|
|
|
|
| 153 |
train_path = os.path.join(path, dirname, "train")
|
| 154 |
val_path = os.path.join(path, dirname, "val")
|
| 155 |
assert os.path.exists(train_path)
|
|
|
|
| 139 |
"""Returns SplitGenerators."""
|
| 140 |
print(self.__dict__.keys())
|
| 141 |
print(self.config)
|
| 142 |
+
name = self.config.name
|
| 143 |
+
dirname = _NAME_TO_DIR[name]
|
| 144 |
+
|
| 145 |
|
| 146 |
# Download the ref:label map for imagenet
|
|
|
|
| 147 |
refs_path = dl_manager.download(_URL_IMAGENET_REFS)
|
| 148 |
with open(refs_path) as f:
|
| 149 |
self.ref_to_label = json.load(f)
|
| 150 |
|
| 151 |
|
|
|
|
|
|
|
| 152 |
url = _URL_PREFIX + "{}.tgz".format(dirname)
|
| 153 |
+
path = dl_manager.download_and_extract(url)
|
| 154 |
train_path = os.path.join(path, dirname, "train")
|
| 155 |
val_path = os.path.join(path, dirname, "val")
|
| 156 |
assert os.path.exists(train_path)
|