title: Loading images and labels from csv file using Tensorflow
body: <p>I've been trying to get the TensorFlow io api to work this morning.</p>
  
  <p>After some research, I managed to read in the data, but I can not bind image and label correctly when dequeuing.</p>
  
  <p>Here is the code I wrote:</p>
  
  <pre><code># load csv content
  csv_path = tf.train.string_input_producer(['list1.csv', 'list2.csv'])
  textReader = tf.TextLineReader()
  _, csv_content = textReader.read(csv_path)
  im_name, label = tf.decode_csv(csv_content, record_defaults=[[""], [1]])
  
  # load images
  im_content = tf.read_file(im_dir+im_name)
  image = tf.image.decode_png(im_content, channels=3)
  image = tf.cast(image, tf.float32) / 255.
  image = tf.image.resize_images(image, 640, 640)
  
  # make batches
  im_batch, lb_batch = tf.train.batch([image, label], batch_size=batch)
  </code></pre>
  
  <p>The order of <code>im_batch</code> and <code>lb_batch</code> is messed up (the images are bound to random labels).</p>
  
  <p>Any idea what's happening? Thanks.</p>