'Construct a DataSet. one_hot arg is used only if fake_data is true.'

def __init__(self, images, labels, fake_data=False, one_hot=False, load=False):

    if fake_data:
        self._num_examples = 10000
        self.one_hot = one_hot
    else:
        num = len(images)
        assert (num == len(labels)), ('images.shape:    %s    labels.shape:    %s' % (images.shape, labels.shape))
        print ('len(images)    %d' % num)
        self._num_examples = num
    self.cache = {}
    self._image_names = numpy.array(images)
    self._labels = labels
    self._epochs_completed = 0
    self._index_in_epoch = 0
    self._images = []
    if load:
        self._images = self.load(self._image_names)
