We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19a75b5 commit 91b3ef2Copy full SHA for 91b3ef2
torchvision/datasets/voc.py
@@ -87,10 +87,9 @@ def __init__(
87
valid_image_sets = ["train", "trainval", "val"]
88
if year == "2007":
89
valid_image_sets.append("test")
90
- key = "2007-test"
91
- else:
92
- key = year
93
self.image_set = verify_str_arg(image_set, "image_set", valid_image_sets)
+
+ key = "2007-test" if year == "2007" and image_set == "test" else year
94
dataset_year_dict = DATASET_YEAR_DICT[key]
95
96
self.url = dataset_year_dict["url"]
0 commit comments