Skip to content

Commit

Permalink
[fbsync] fix VOC datasets for 2007 (#3572)
Browse files Browse the repository at this point in the history
Summary: Co-authored-by: Francisco Massa <fvsmassa@gmail.com>

Reviewed By: fmassa

Differential Revision: D27128000

fbshipit-source-id: b918dd8eff9beb621551a077b64b0d7f4deb3bbf
  • Loading branch information
vincentqb authored and facebook-github-bot committed Mar 19, 2021
1 parent 4cf3b06 commit 2849ae3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torchvision/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ def __init__(
valid_image_sets = ["train", "trainval", "val"]
if year == "2007":
valid_image_sets.append("test")
key = "2007-test"
else:
key = year
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
dataset_year_dict = DATASET_YEAR_DICT[key]

self.url = dataset_year_dict["url"]
Expand Down

0 comments on commit 2849ae3

Please sign in to comment.