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): ...@@ -55,8 +55,7 @@ class STL10(VisionDataset):
if download: if download:
self.download() self.download()
elif not self._check_integrity():
if not self._check_integrity():
raise RuntimeError( raise RuntimeError(
'Dataset not found or corrupted. ' 'Dataset not found or corrupted. '
'You can use download=True to download it') 'You can use download=True to download it')
...@@ -161,6 +160,7 @@ class STL10(VisionDataset): ...@@ -161,6 +160,7 @@ class STL10(VisionDataset):
print('Files already downloaded and verified') print('Files already downloaded and verified')
return return
download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5) download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5)
self._check_integrity()
def extra_repr(self): def extra_repr(self):
return "Split: {split}".format(**self.__dict__) 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