Skip to content

Commit d49f3a2

Browse files
Conchylicultorcopybara-github
authored andcommitted
Remove 1.1.0 cars196 version
PiperOrigin-RevId: 282393111
1 parent 47b9b81 commit d49f3a2

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tensorflow_datasets/image/cars196.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,14 @@ class Cars196(tfds.core.GeneratorBasedBuilder):
154154

155155
VERSION = tfds.core.Version('2.0.0')
156156

157-
SUPPORTED_VERSIONS = [
158-
tfds.core.Version('1.1.0'), # Version with no test labels.
159-
]
160-
161157
def _info(self):
162158
"""Define the dataset info."""
163-
names = _NAMES + ['test'] if self.version < '2.0.0' else _NAMES
164159
return tfds.core.DatasetInfo(
165160
builder=self,
166161
description=(_DESCRIPTION),
167162
features=tfds.features.FeaturesDict({
168163
'image': tfds.features.Image(),
169-
'label': tfds.features.ClassLabel(names=names),
164+
'label': tfds.features.ClassLabel(names=_NAMES),
170165
'bbox': tfds.features.BBoxFeature(),
171166
}),
172167
supervised_keys=('image', 'label'),
@@ -219,10 +214,7 @@ def _generate_examples(self, split_name, data_dir_path,
219214
mat = tfds.core.lazy_imports.scipy.io.loadmat(f)
220215
for example in mat['annotations'][0]:
221216
image_name = example[-1].item().split('.')[0]
222-
if self.version < '2.0.0' and split_name == 'test':
223-
label = -1
224-
else:
225-
label = _NAMES[example[4].item() - 1]
217+
label = _NAMES[example[4].item() - 1]
226218
image = image_dict[image_name]
227219
bbox = bbox_dict[image_name]
228220
yield image_name, {

0 commit comments

Comments
 (0)