且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何在keras模型中使用tensorflow度量函数?

更新时间:2023-12-02 18:46:04

好-我想我发现了一个错误.此功能返回带有(auc, other stuff)tuple.您需要通过以下方式克服自己的auc来克服这一点:

Ok - I think I found an error. This funtion returns a tuple with (auc, other stuff). You need to overcome this by defying your own auc by:

def auc_tf_metric(y_true, y_pred):
    return tensorflow.metrics.auc(y_true, y_pred)[0]