Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
ed4710b1
Unverified
Commit
ed4710b1
authored
Mar 17, 2024
by
Nicolas Hug
Committed by
GitHub
Mar 17, 2024
Browse files
Put back StanfordCars.download (the function, NOT the feature) (#8324)
parent
4028d9f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
torchvision/datasets/stanford_cars.py
torchvision/datasets/stanford_cars.py
+9
-6
No files found.
torchvision/datasets/stanford_cars.py
View file @
ed4710b1
...
...
@@ -61,12 +61,7 @@ class StanfordCars(VisionDataset):
self
.
_images_base_path
=
self
.
_base_folder
/
"cars_test"
if
download
:
raise
ValueError
(
"The original URL is broken so the StanfordCars dataset is not available for automatic "
"download anymore. You can try to download it manually following "
"https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, "
"and set download=False to avoid this error."
)
self
.
download
()
if
not
self
.
_check_exists
():
raise
RuntimeError
(
...
...
@@ -104,3 +99,11 @@ class StanfordCars(VisionDataset):
return
False
return
self
.
_annotations_mat_path
.
exists
()
and
self
.
_images_base_path
.
is_dir
()
def
download
(
self
):
raise
ValueError
(
"The original URL is broken so the StanfordCars dataset is not available for automatic "
"download anymore. You can try to download it manually following "
"https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, "
"and set download=False to avoid this error."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment