title: Open and convert to tensor an image from CSV file in TensorFlow
body: <p>I've got the below function, mostly from <a href="https://stackoverflow.com/questions/37091899/how-to-actually-read-csv-data-in-tensorflow">this question</a>.  That person is trying to read five columns that are all ints.  I'm trying to read two columns: one an image file path and one an int. So I need to open the file and convert it into a tensor.</p>
  
  <p><strong>So my question is: how do I read the file and convert it into the necessary tensor?</strong></p>
  
  <p>I've tried quite a few different things like reading the file and converting that string to a tensor using .</p>
  
  <pre><code>def read_from_csv(filename_queue):
      reader = tf.TextLineReader()
      _, csv_row = reader.read(filename_queue)
      record_defaults = [[""],[0]]
      image_path, label = tf.decode_csv(csv_row, field_delim=" ", record_defaults=record_defaults)
  
      # here's where I need to read the file somehow...
      image = tf.read_file(image_path) # I probably need this somewhere
      print(image) # Tensor("DecodeJpeg:0", shape=(?, ?, 3), dtype=uint8)
      image = tf.image.decode_jpeg(image, channels=3)
      return image, label
  </code></pre>
  
  <p>I also tried using numpy (can't recall exactly what) but that didn't work either.</p>