【发布时间】:2020-05-12 00:46:32
【问题描述】:
我正在使用 Tensorflow 1.15.0 和 keras 2.3.1。我正在尝试在训练期间为我的训练数据和验证数据计算每个时期的六类分类问题的精度和召回率。 我可以使用分类报告,但只有在训练完成后才能使用。
from sklearn.metrics import classification_report
y_pred = final.predict(X_test)
y_indx = np.argmax(y_test_new, axis = 1)
pred_indx = np.argmax(y_pred, axis = 1)
print(classification_report(y_indx, pred_indx))
网络 ResNet154 的结果如下所示,我的数据集是平衡的。
precision recall f1-score support
0 0.00 0.00 0.00 172482
1 0.00 0.00 0.00 172482
2 0.00 0.00 0.00 172482
3 0.00 0.00 0.00 172482
4 0.00 0.00 0.00 172482
5 0.17 1.00 0.29 172482
accuracy 0.17 1034892
macro avg 0.03 0.17 0.05 1034892
weighted avg 0.03 0.17 0.05 1034892
我只想通过使用回调来检查我的训练数据的准确率、召回率和 f1 分数,以确保它是否过度拟合网络。
【问题讨论】:
标签: keras deep-learning multiclass-classification resnet precision-recall