metrics.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:tefla 作者: openAGI 项目源码 文件源码
def _f1_score(self, y_pred, y_true):
        y_pred_2 = np.argmax(y_pred, axis=1)
        p, r, f1, s = precision_recall_fscore_support(y_true, y_pred_2)
        return accuracy_score(y_true, y_pred_2) if 0 in f1 else np.mean(f1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号