title: How can I access the filenames gathered by tf.data.Dataset.list_files()?
body: <p>I am using</p>
  
  <pre><code>file_data = tf.data.Dataset.list_files("../*.png")
  </code></pre>
  
  <p>to collect image files for training in TensorFlow, but would like to access the list of gathered filenames so I can perform a label lookup. </p>
  
  <p>Calling sess.run([file_data]) has been unsuccessful:</p>
  
  <pre><code>TypeError: Fetch argument &lt;TensorSliceDataset shapes: (), types: tf.string&gt; has invalid type &lt;class 'tensorflow.python.data.ops.dataset_ops.TensorSliceDataset'&gt;, must be a string or Tensor. (Can not convert a TensorSliceDataset into a Tensor or Operation.)
  </code></pre>
  
  <p>Are there any other methods I can use?</p>