def _accuracy_at_threshold(threshold):
def _accuracy_metric(predictions, targets, weights=None):
threshold_predictions = math_ops.to_float(
math_ops.greater_equal(predictions, threshold))
return metrics_lib.streaming_accuracy(predictions=threshold_predictions,
labels=targets,
weights=weights)
return _accuracy_metric
评论列表
文章目录