File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,7 @@ def __init__(
61
61
self ._images_base_path = self ._base_folder / "cars_test"
62
62
63
63
if download :
64
- raise ValueError (
65
- "The original URL is broken so the StanfordCars dataset is not available for automatic "
66
- "download anymore. You can try to download it manually following "
67
- "https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, "
68
- "and set download=False to avoid this error."
69
- )
64
+ self .download ()
70
65
71
66
if not self ._check_exists ():
72
67
raise RuntimeError (
@@ -104,3 +99,11 @@ def _check_exists(self) -> bool:
104
99
return False
105
100
106
101
return self ._annotations_mat_path .exists () and self ._images_base_path .is_dir ()
102
+
103
+ def download (self ):
104
+ raise ValueError (
105
+ "The original URL is broken so the StanfordCars dataset is not available for automatic "
106
+ "download anymore. You can try to download it manually following "
107
+ "https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, "
108
+ "and set download=False to avoid this error."
109
+ )
You can’t perform that action at this time.
0 commit comments