title: Can't seem to get Tensorflow's tf.metrics.auc working
body: <p>Tensorflow has a function to calculate AUC: tf.metrics.auc(). Here is my a section of my code trying to compute auc:</p>
  
  <pre><code>init = tf.global_variables_initializer()
  
  with tf.Session() as sess:
      sess.run(init)
  
      for epoch in range(training_epochs):
          sess.run(optimizer, feed_dict = {x : x_train, y : y_train, p_keep_input: 0.8, p_keep_hidden: 0.5})
          avg_cost = sess.run(cost, feed_dict = {x : x_train, y : y_train, p_keep_input: 0.8, p_keep_hidden: 0.5})
  
          if epoch % display_step == 0:
              training_acc = accuracy.eval({x : x_train, y : y_train, p_keep_input: 1.0, p_keep_hidden: 1.0})
              print("Epoch:", '%03d' % (epoch), "Training Accuracy:", '%.5f' % (training_acc), "cost=", "{:.5f}".format(avg_cost))
  
      print("Optimization Done!")
  
  
      roc_score = tf.metrics.auc(y, pred)
      roc_score = tf.convert_to_tensor(roc_score)
      print(roc_score.eval({x : x_test, y : y_test, p_keep_input: 1.0, p_keep_hidden: 1.0}))
  </code></pre>
  
  <p>Any section of the error I get is below. The entire error is quite lengthy.</p>
  
  <pre><code>FailedPreconditionError (see above for traceback): Attempting to use uninitialized value auc_4/false_positives
       [[Node: auc_4/false_positives/read = Identity[T=DT_FLOAT, _class=["loc:@auc_4/false_positives"], _device="/job:localhost/replica:0/task:0/cpu:0"](auc_4/false_positives)]]
  </code></pre>
  
  <p>I'd appreciate any pointers on how to resolve this. Thanks</p>