From a22309afe8e0a520ec16fb4ada3dbc2f12e7ce57 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Tue, 28 Aug 2018 17:39:37 +0800 Subject: [PATCH] clean useless check code in auc_op (#13023) --- paddle/fluid/operators/auc_op.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/paddle/fluid/operators/auc_op.h b/paddle/fluid/operators/auc_op.h index 065120328..0a18585ed 100644 --- a/paddle/fluid/operators/auc_op.h +++ b/paddle/fluid/operators/auc_op.h @@ -60,20 +60,6 @@ class AucKernel : public framework::OpKernel { const T* inference_data = predict->data(); const auto* label_data = label->data(); - // check if states are inited. - auto* tp_in = ctx.Input("TP"); - auto* fp_in = ctx.Input("FP"); - auto* tn_in = ctx.Input("TN"); - auto* fn_in = ctx.Input("FN"); - PADDLE_ENFORCE(tp_in->IsInitialized(), "true_positive is not inited!"); - PADDLE_ENFORCE(fp_in->IsInitialized(), "false_negative is not inited!"); - PADDLE_ENFORCE(tn_in->IsInitialized(), "true_negative is not inited!"); - PADDLE_ENFORCE(fn_in->IsInitialized(), "false_positive is not inited!"); - PADDLE_ENFORCE_EQ(tp_in->numel(), num_thresholds, ""); - PADDLE_ENFORCE_EQ(fp_in->numel(), num_thresholds, ""); - PADDLE_ENFORCE_EQ(tn_in->numel(), num_thresholds, ""); - PADDLE_ENFORCE_EQ(fn_in->numel(), num_thresholds, ""); - auto* tp_data = true_positive->mutable_data(ctx.GetPlace()); auto* fn_data = false_negative->mutable_data(ctx.GetPlace()); auto* tn_data = true_negative->mutable_data(ctx.GetPlace()); -- GitLab