首页 > 解决方案 > 如何通过编译获得 Fscore

问题描述

要使用 model.compile 获得 Precision 和 Recall,我们可以这样做:

import tensorflow as tf 

model.compile( ..., metrics=['accuracy', 'Precision', 'Recall'])

那么如何添加 F1score 来获取所有指标(4)?

标签: pythontensorflowkerasmetricstf.keras

解决方案


tfa.metrics.F1Score()tensorflow_addons 中添加。


推荐阅读