title: Tensorflow Precision / Recall / F1 score and Confusion matrix
body: <p>I would like to know if there is a way to implement the different score function from the scikit learn package like this one :</p>
  
  <pre><code>from sklearn.metrics import confusion_matrix
  confusion_matrix(y_true, y_pred)
  </code></pre>
  
  <p>into a tensorflow model to get the different score.</p>
  
  <pre><code>with tf.Session(config=tf.ConfigProto(log_device_placement=True)) as sess:
  init = tf.initialize_all_variables()
  sess.run(init)
  for epoch in xrange(1):
          avg_cost = 0.
          total_batch = len(train_arrays) / batch_size
          for batch in range(total_batch):
                  train_step.run(feed_dict = {x: train_arrays, y: train_labels})
                  avg_cost += sess.run(cost, feed_dict={x: train_arrays, y: train_labels})/total_batch
          if epoch % display_step == 0:
                  print "Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost)
  
  print "Optimization Finished!"
  correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
  # Calculate accuracy
  accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
  print "Accuracy:", batch, accuracy.eval({x: test_arrays, y: test_labels})
  </code></pre>
  
  <p>Will i have to run the session again to get the prediction ?</p>