code: def __init__(self, images, labels, fake_data=False):
      if fake_data:
          self._num_examples = 10000
      else:
          assert (
              images.shape[0] == labels.shape[0]
          ), "images.shape: %s labels.shape: %s" % (
              images.shape,
              labels.shape,
          )
          self._num_examples = images.shape[0]
          # Convert shape from [num examples, rows, columns, depth]
          # to [num examples, rows*columns] (assuming depth == 1)
          assert images.shape[3] == 1
          images = images.reshape(
              images.shape[0], images.shape[1] * images.shape[2]
          )
          # Convert from [0, 255] -> [0.0, 1.0].
          images = images.astype(numpy.float32)
          images = numpy.multiply(images, 1.0 / 255.0)
      self._images = images
      self._labels = labels
      self._epochs_completed = 0
      self._index_in_epoch = 0
  
file_path: tflearn/tflearn/datasets/mnist.py
imports: from __future__ import print_function
  import gzip
  import os
  from six.moves import urllib
  import numpy
label_desc: Use image node_id 1 to create a new DataSet object from inherited base classes: object with example: obj = DataSet(images, labels, fake_data)