'Args:
filename (str): h5 data file.
data_paths (list): list of h5 paths to zipped.
For example `[\'images\', \'labels\']`.
shuffle (bool): shuffle all data.'

def __init__(self, filename, data_paths, shuffle=True):

    self.f = h5py.File(filename, 'r')
    logger.info('Loading    {}    to    memory...'.format(filename))
    self.dps = [self.f[k].value for k in data_paths]
    lens = [len(k) for k in self.dps]
    assert all([(k == lens[0]) for k in lens])
    self._size = lens[0]
    self.shuffle = shuffle
