| Total Complexity | 1 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| 1 | from fuel.datasets import H5PYDataset |
||
| 6 | class DogsVsCats(H5PYDataset): |
||
| 7 | """The Kaggle Dogs vs. Cats dataset of cats and dogs images. |
||
| 8 | |||
| 9 | Parameters |
||
| 10 | ---------- |
||
| 11 | which_sets : tuple of str |
||
| 12 | Which split to load. Valid values are 'train', 'valid' and 'test'. |
||
| 13 | The 'train' set corresponds to a shuffled subset of 20,000 images |
||
| 14 | of the original training set, while 'valid' contains 5,000 images |
||
| 15 | of the same set. The test set is the one released on Kaggle. |
||
| 16 | |||
| 17 | """ |
||
| 18 | filename = 'dogs_vs_cats.hdf5' |
||
| 19 | |||
| 20 | default_transformers = ((ScaleAndShift, [1 / 255.0, 0], |
||
| 21 | {'which_sources': 'image_features'}),) |
||
| 22 | |||
| 23 | def __init__(self, which_sets, **kwargs): |
||
| 24 | super(DogsVsCats, self).__init__( |
||
| 25 | file_or_path=find_in_data_path(self.filename), |
||
| 26 | which_sets=which_sets, **kwargs) |
||
| 27 |