From 174c142effc2cd73bc182f0847a688bce46accde Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Fri, 27 Sep 2019 10:17:46 -0700 Subject: [PATCH] Clean up code (#1939) --- onnxruntime/core/providers/cpu/ml/ml_common.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/onnxruntime/core/providers/cpu/ml/ml_common.h b/onnxruntime/core/providers/cpu/ml/ml_common.h index 773fd2b662..140147f926 100644 --- a/onnxruntime/core/providers/cpu/ml/ml_common.h +++ b/onnxruntime/core/providers/cpu/ml/ml_common.h @@ -322,13 +322,10 @@ void write_scores(std::vector& scores, POST_EVAL_TRANSFORM post_transform, in scores[0] = ComputeProbit(scores[0]); } else { switch (add_second_class) { - case 0: //0=all positive weights, winning class is positive + case 0: + case 1: scores.push_back(scores[0]); - scores[0] = 1.f - scores[0]; //put opposite score in positive slot - break; - case 1: //1 = all positive weights, winning class is negative - scores.push_back(scores[0]); - scores[0] = 1.f - scores[0]; //put opposite score in positive slot + scores[0] = 1.f - scores[0]; break; case 2: //2 = mixed weights, winning class is positive if (post_transform == POST_EVAL_TRANSFORM::LOGISTIC) {