title: The different ways to load data in Tensorflow
body: <p>I study the way to load data in Tensorflow with <strong>tf.contrib.learn.datasets</strong></p>
  
  <p>For example,</p>
  
  <ol>
  <li><p>To load Iris data set, <a href="https://www.tensorflow.org/get_started/tflearn" rel="nofollow noreferrer">Iris flower classifier</a>, they used the following code:</p>
  
  <pre><code>training_set = tf.contrib.learn.datasets.base.load_csv_with_header(
  filename=IRIS_TRAINING,
  target_dtype=np.int,
  features_dtype=np.float32)
  </code></pre></li>
  <li><p>To load mnist <a href="https://gist.github.com/dandelionmane/4f02ab8f1451e276fea1f165a20336f1#file-mnist-py" rel="nofollow noreferrer">MNIST</a>, they used:</p>
  
  <pre><code>mnist = tf.contrib.learn.datasets.mnist.read_data_sets(train_dir=LOGDIR + 'data', one_hot=True)
  </code></pre></li>
  </ol>
  
  <p>Could you help me to figure out the different between two ways. In particular, how can we know which way can be suitable for given type of data?</p>
  
  <p>Thanks in advance,</p>