Skip to content

Commit a485b8c

Browse files
authored
simplify QMNIST download logic (#4562)
1 parent 05dcf50 commit a485b8c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

torchvision/datasets/mnist.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,7 @@ def download(self) -> None:
466466
split = self.resources[self.subsets[self.what]]
467467

468468
for url, md5 in split:
469-
filename = url.rpartition("/")[2]
470-
file_path = os.path.join(self.raw_folder, filename)
471-
if not os.path.isfile(file_path):
472-
download_and_extract_archive(url, self.raw_folder, filename=filename, md5=md5)
469+
download_and_extract_archive(url, self.raw_folder, md5=md5)
473470

474471
def __getitem__(self, index: int) -> Tuple[Any, Any]:
475472
# redefined to handle the compat flag

0 commit comments

Comments
 (0)