parameters: (self, batch_size, fake_data=False)
return_statement: return self._images[start:end], self._labels[start:end]
docstring: Return the next `batch_size` examples from this data set.
docstring_summary: Return the next `batch_size` examples from this data set.
docstring_tokens: Return the next batch_size examples from this data set .
function: def next_batch(self, batch_size, fake_data=False):
      """Return the next `batch_size` examples from this data set."""
      if fake_data:
        fake_image = [1.0 for _ in xrange(784)]
        fake_label = 0
        return [fake_image for _ in xrange(batch_size)], [
            fake_label for _ in xrange(batch_size)]
      start = self._index_in_epoch
      self._index_in_epoch += batch_size
      if self._index_in_epoch > self._num_examples:
        # Finished epoch
        self._epochs_completed += 1
        # Shuffle the data
        perm = numpy.arange(self._num_examples)
        numpy.random.shuffle(perm)
        self._images = self._images[perm]
        self._labels = self._labels[perm]
        # Start next epoch
        start = 0
        self._index_in_epoch = batch_size
        assert batch_size <= self._num_examples
      end = self._index_in_epoch
      return self._images[start:end], self._labels[start:end]
function_tokens: def next_batch ( self , batch_size , fake_data = False ) : if fake_data : fake_image = [ 1.0 for _ in xrange ( 784 ) ] fake_label = 0 return [ fake_image for _ in xrange ( batch_size ) ] , [ fake_label for _ in xrange ( batch_size ) ] start = self . _index_in_epoch self . _index_in_epoch += batch_size if self . _index_in_epoch > self . _num_examples : # Finished epoch self . _epochs_completed += 1 # Shuffle the data perm = numpy . arange ( self . _num_examples ) numpy . random . shuffle ( perm ) self . _images = self . _images [ perm ] self . _labels = self . _labels [ perm ] # Start next epoch start = 0 self . _index_in_epoch = batch_size assert batch_size <= self . _num_examples end = self . _index_in_epoch return self . _images [ start : end ] , self . _labels [ start : end ]