Commit
·
a80cf63
1
Parent(s):
5b3e9cb
Update LoadingScript
Browse files- GraySpectrogram.py +8 -7
GraySpectrogram.py
CHANGED
@@ -195,22 +195,23 @@ class GraySpectrogram(datasets.GeneratorBasedBuilder):
|
|
195 |
|
196 |
def _split_generators(self, dl_manager: DownloadManager):
|
197 |
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
201 |
return [
|
202 |
datasets.SplitGenerator(
|
203 |
name=datasets.Split.TRAIN,
|
204 |
gen_kwargs={
|
205 |
-
"images": dl_manager.iter_archive(
|
206 |
-
"metadata_path":
|
207 |
}
|
208 |
),
|
209 |
datasets.SplitGenerator(
|
210 |
name=datasets.Split.TEST,
|
211 |
gen_kwargs={
|
212 |
-
"images": dl_manager.iter_archive(
|
213 |
-
"metadata_path":
|
214 |
}
|
215 |
),
|
216 |
]
|
|
|
195 |
|
196 |
def _split_generators(self, dl_manager: DownloadManager):
|
197 |
|
198 |
+
train_metadata_path = dl_manager.download_and_extract(self.config.metadata_url["train"])
|
199 |
+
test_metadata_path = dl_manager.download_and_extract(self.config.metadata_url["test"])
|
200 |
+
train_data_path = dl_manager.download(self.config.data_url["train"])
|
201 |
+
test_data_path = dl_manager.download(self.config.data_url["test"])
|
202 |
return [
|
203 |
datasets.SplitGenerator(
|
204 |
name=datasets.Split.TRAIN,
|
205 |
gen_kwargs={
|
206 |
+
"images": dl_manager.iter_archive(train_data_path),
|
207 |
+
"metadata_path": train_metadata_path,
|
208 |
}
|
209 |
),
|
210 |
datasets.SplitGenerator(
|
211 |
name=datasets.Split.TEST,
|
212 |
gen_kwargs={
|
213 |
+
"images": dl_manager.iter_archive(test_data_path),
|
214 |
+
"metadata_path": test_metadata_path,
|
215 |
}
|
216 |
),
|
217 |
]
|