Open ososkp opened 4 years ago
https://www.tensorflow.org/api_docs/python/tf/keras/metrics/AUC
https://www.kaggle.com/c/invasive-species-monitoring/discussion/32762
For TF1 but may come in handy:
import tensorflow as tf
from keras import backend as K
def auc(y_true, y_pred):
auc = tf.metrics.auc(y_true, y_pred)[1]
K.get_session().run(tf.local_variables_initializer())
return auc
model.compile(loss="binary_crossentropy", optimizer='adam', metrics=[auc])
Rather than accuracy