def f1(average_classes):
# noinspection PyShadowingNames
def f1(y_true, y_pred, theano=False):
if theano:
raise NotImplementedError
else:
return np.mean(precision_recall_fscore_support(y_true, np.argmax(y_pred, axis=-1))[2][average_classes])
return f1
评论列表
文章目录