Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的多类分类问题上添加 F1 分数。我没有在内置指标列表中找到 F1。F1 是在 tensor2tensor 中的某个地方,还是我必须覆盖 eval_metrics() 并使用我的代码或从 TensorFlow 获取它?
您必须从 scikit learn 导入它:
from sklearn.metrics import f1_score
然后你可以做
f1 = f1_score(y_test, y_classes) print(f1)