Skip to content

Commit 50d29fc

Browse files
committed
clean useless check code in auc_op (#13023)
1 parent 7ce3882 commit 50d29fc

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

paddle/fluid/operators/auc_op.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ class AucKernel : public framework::OpKernel<T> {
6060
const T* inference_data = predict->data<T>();
6161
const auto* label_data = label->data<int64_t>();
6262

63-
// check if states are inited.
64-
auto* tp_in = ctx.Input<Tensor>("TP");
65-
auto* fp_in = ctx.Input<Tensor>("FP");
66-
auto* tn_in = ctx.Input<Tensor>("TN");
67-
auto* fn_in = ctx.Input<Tensor>("FN");
68-
PADDLE_ENFORCE(tp_in->IsInitialized(), "true_positive is not inited!");
69-
PADDLE_ENFORCE(fp_in->IsInitialized(), "false_negative is not inited!");
70-
PADDLE_ENFORCE(tn_in->IsInitialized(), "true_negative is not inited!");
71-
PADDLE_ENFORCE(fn_in->IsInitialized(), "false_positive is not inited!");
72-
PADDLE_ENFORCE_EQ(tp_in->numel(), num_thresholds, "");
73-
PADDLE_ENFORCE_EQ(fp_in->numel(), num_thresholds, "");
74-
PADDLE_ENFORCE_EQ(tn_in->numel(), num_thresholds, "");
75-
PADDLE_ENFORCE_EQ(fn_in->numel(), num_thresholds, "");
76-
7763
auto* tp_data = true_positive->mutable_data<int64_t>(ctx.GetPlace());
7864
auto* fn_data = false_negative->mutable_data<int64_t>(ctx.GetPlace());
7965
auto* tn_data = true_negative->mutable_data<int64_t>(ctx.GetPlace());

0 commit comments

Comments
 (0)