metrics.py 218 B

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