title: TensorFlow: print output value from each iteration
body: <p>I'm experimenting with TensorFlow to get the hang of it. Trying to create a version of basic MNIST example by reading lines from a CSV file instead of images. I'm piecing the code together based on the MNIST example and the CSV feeder example. </p>
  
  <p>The first 100 cells in each line of my CSV represent an "image" of a number, and next 10 cells in the same row represent a "label" that identifies that image, similarly to the label in the MNIST example.</p>
  
  <p>I'm trying to print what TensorFlow actually estimates the number to be during each iteration over the CSV lines by printing the actual label and the "guessed" output side-by-side for each iteration. But it looks like what I'm actually printing is the true label both times, since the <code>y</code> variable requires me to feed the current <code>x</code> values to replace the x placeholder.</p>
  
  <p>How can I print out the guess, rather than the actual label for each iteration?</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>fileName = 'TEST_data/TFTest.csv'
  
  filename_queue = tf.train.string_input_producer([fileName])
  
  reader = tf.TextLineReader()
  key, value = reader.read(filename_queue)
  
  rDefaults = []
  for i in range(0,110):
    rDefaults.append((list([0])))
  
  data = tf.decode_csv(value, record_defaults=rDefaults)
  fPack = tf.slice(data, [0], [100])
  lPack = tf.slice(data, [100], [10])
  
  features =  tf.pack(fPack)
  label = tf.pack(lPack)
  
  x = tf.placeholder(tf.float32, [None, 100])
  W = tf.Variable(tf.zeros([100, 10]))
  b = tf.Variable(tf.zeros([10]))
  y = tf.matmul(x, W) + b
  
  y_ = tf.placeholder(tf.float32, [None, 10])
  
  cross_entropy = tf.reduce_mean(
        tf.nn.softmax_cross_entropy_with_logits(labels=y_, logits=y))
  train_step = tf.train.GradientDescentOptimizer(.5).minimize(cross_entropy)
  
  with tf.Session() as sess:
      init = tf.initialize_all_variables()
      sess.run(init)
      coord = tf.train.Coordinator()
      threads = tf.train.start_queue_runners(coord=coord)
      i = 0
      for i in range(10):
          f, l = sess.run([features, label])
          f1 = np.reshape(f, (-1, 100))
          l1 = np.reshape(l, (-1, 10))
          sess.run(train_step, feed_dict={x: f1, y_: l1})
          if i%1==0:
              print(sess.run(tf.argmax(l1, 1)))
              print(sess.run(tf.argmax(y, 1), feed_dict={x: f1}))
              print('********')
          i = i + 1
  
      coord.request_stop()
      coord.join(threads)
  </code></pre>