@@ -60,20 +60,6 @@ class AucKernel : public framework::OpKernel<T> {
60
60
const T* inference_data = predict->data <T>();
61
61
const auto * label_data = label->data <int64_t >();
62
62
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
-
77
63
auto * tp_data = true_positive->mutable_data <int64_t >(ctx.GetPlace ());
78
64
auto * fn_data = false_negative->mutable_data <int64_t >(ctx.GetPlace ());
79
65
auto * tn_data = true_negative->mutable_data <int64_t >(ctx.GetPlace ());
0 commit comments