def __init__(self, flatten=False, fine_label=True, **kwargs):

        im_dir = os.environ['MOZI_DATA_PATH'] + '/cifar100/'
        path = 'http://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz'
        im_dir = get_file(fpath="{}/cifar-100-python.tar.gz".format(im_dir), origin=path, untar=True)

        self.img_shape = (3,32,32)
        self.img_size = np.prod(self.img_shape)

        fnames = ['train', 'test']

        X = []
        y = []
        for fname in fnames:
            data_path = "{}/{}".format(im_dir, fname)
            with open(data_path) as fin:
                data_batch = cPickle.load(fin)
                if flatten:
                    X.extend(data_batch['data'].reshape((len(data_batch['data']), self.img_size)))
                else:
                    X.extend(data_batch['data'].reshape((len(data_batch['data']),)+self.img_shape))
                if fine_label:
                    y.extend(data_batch['fine_labels'])
                    self.n_classes = 100
                else:
                    y.extend(data_batch['coarse_labels'])
                    self.n_classes = 20

        X_npy = np.array(X, dtype=floatX)
        X_npy /= 255.0
        y_npy = make_one_hot(y, onehot_size=self.n_classes)

        super(Cifar100, self).__init__(X=X_npy, y=y_npy, **kwargs)
Returns an XML Schema element with the given attributes appended to the
dataset/ETHPy150Open hycis/Mozi/mozi/datasets/cifar100.py/Cifar100.__init__--crossover with--dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/xsd_append_element