for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from fuel.datasets import H5PYDataset
from fuel.transformers import ScaleAndShift
from fuel.utils import find_in_data_path
class DogsVsCats(H5PYDataset):
"""The Kaggle Dogs vs. Cats dataset of cats and dogs images.
Parameters
----------
which_sets : tuple of str
Which split to load. Valid values are 'train', 'valid' and 'test'.
The 'train' set corresponds to a shuffled subset of 20,000 images
of the original training set, while 'valid' contains 5,000 images
of the same set. The test set is the one released on Kaggle.
"""
filename = 'dogs_vs_cats.hdf5'
default_transformers = ((ScaleAndShift, [1 / 255.0, 0],
{'which_sources': 'image_features'}),)
def __init__(self, which_sets, **kwargs):
super(DogsVsCats, self).__init__(
file_or_path=find_in_data_path(self.filename),
which_sets=which_sets, **kwargs)