Skip to content

Commit 733e736

Browse files
Conchylicultorcopybara-github
authored andcommitted
Remove test label for cars196
PiperOrigin-RevId: 282018279
1 parent 3b51724 commit 733e736

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorflow_datasets/image/cars196.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
'Volkswagen Golf Hatchback 2012', 'Volkswagen Golf Hatchback 1991',
134134
'Volkswagen Beetle Hatchback 2012', 'Volvo C30 Hatchback 2012',
135135
'Volvo 240 Sedan 1993', 'Volvo XC90 SUV 2007',
136-
'smart fortwo Convertible 2012', 'test'
136+
'smart fortwo Convertible 2012'
137137
]
138138

139139
_CITATION = """\
@@ -152,7 +152,7 @@
152152
class Cars196(tfds.core.GeneratorBasedBuilder):
153153
"""Car Images dataset."""
154154

155-
VERSION = tfds.core.Version('1.0.0')
155+
VERSION = tfds.core.Version('1.1.0')
156156

157157
def _info(self):
158158
"""Define the dataset info."""
@@ -217,7 +217,7 @@ def _generate_examples(self, split_name, data_dir_path,
217217
image_name = example[-1].item().split('.')[0]
218218
# -1 because class labels are index-1 based.
219219
# There are no labels in the "test" split.
220-
label = 'test' if split_name == 'test' else _NAMES[example[4].item() - 1]
220+
label = -1 if split_name == 'test' else _NAMES[example[4].item() - 1]
221221
image = image_dict[image_name]
222222
bbox = bbox_dict[image_name]
223223
yield image_name, {

0 commit comments

Comments
 (0)