order of declaring methods consistent with DatasetMixIn
@@ -39,9 +39,9 @@ class TransformDataset(dataset_mixin.DatasetMixin):
self._dataset = dataset
self._transform = transform
+ def __len__(self):
+ return len(self._dataset)
+
def get_example(self, i):
in_data = self._dataset[i]
return self._transform(in_data)
-
- def __len__(self):
- return len(self._dataset)
