Skip to content

Commit cabb473

Browse files
YosuaMichaelfacebook-github-bot
authored andcommitted
[fbsync] fix Flowers102 dataset labels (#5775)
Summary: (Note: this ignores all push blocking failures!) Reviewed By: jdsgomes, NicolasHug Differential Revision: D36095700 fbshipit-source-id: 9007ca80152889932f529b850c164ad28c5eccf6
1 parent a02d310 commit cabb473

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/datasets/flowers102.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(
6565
image_ids = set_ids[self._splits_map[self._split]].tolist()
6666

6767
labels = loadmat(self._base_folder / self._file_dict["label"][0], squeeze_me=True)
68-
image_id_to_label = dict(enumerate(labels["labels"].tolist(), 1))
68+
image_id_to_label = dict(enumerate((labels["labels"] - 1).tolist(), 1))
6969

7070
self._labels = []
7171
self._image_files = []

0 commit comments

Comments
 (0)