From 50d29fc341cc12841e56e76a23591b43bb5a182c 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 0651203286c..0a18585edb5 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