metrics.py 202 B

12345678
  1. from keras import backend as K
  2. import tensorflow as tf
  3. def auc(y_true, y_pred):
  4. auc = tf.metrics.auc(y_true, y_pred)[1]
  5. K.get_session().run(tf.local_variables_initializer())
  6. return auc