code_10.py 183 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4
y_pred = np.where(y_prob > 0.2, 1, 0) # 进行阈值调整
cm = confusion_matrix(y_pred, y_test)
print('Confusion matrix:\n', cm, '\n')
print(classification_report(y_pred, y_test))