diff --git a/paddle/fluid/operators/auc_op.h b/paddle/fluid/operators/auc_op.h index 0651203286c0fa17866d333edffaea1b56f23005..0a18585edb54a76aff5ae72ecc71e0eebb9f9361 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());