Commit 40c99eae authored by Tongzhou Wang's avatar Tongzhou Wang Committed by Francisco Massa
Browse files

STL10: don't check integrity twice when download=True (#1787)

parent 536290df
......@@ -55,8 +55,7 @@ class STL10(VisionDataset):
if download:
self.download()
if not self._check_integrity():
elif not self._check_integrity():
raise RuntimeError(
'Dataset not found or corrupted. '
'You can use download=True to download it')
......@@ -161,6 +160,7 @@ class STL10(VisionDataset):
print('Files already downloaded and verified')
return
download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5)
self._check_integrity()
def extra_repr(self):
return "Split: {split}".format(**self.__dict__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment