未验证 提交 0fd09fdf 编写于 作者: W wawltor 提交者: GitHub

fix the memory leak for the static.auc

fix the memory leak for the static.auc 
上级 94d2cf82
...@@ -27,6 +27,13 @@ class AucOp : public framework::OperatorWithKernel { ...@@ -27,6 +27,13 @@ class AucOp : public framework::OperatorWithKernel {
OP_INOUT_CHECK(ctx->HasInput("Label"), "Input", "Label", "Auc"); OP_INOUT_CHECK(ctx->HasInput("Label"), "Input", "Label", "Auc");
auto predict_dims = ctx->GetInputDim("Predict"); auto predict_dims = ctx->GetInputDim("Predict");
auto label_dims = ctx->GetInputDim("Label"); auto label_dims = ctx->GetInputDim("Label");
PADDLE_ENFORCE_GE(
predict_dims.size(), 2,
platform::errors::InvalidArgument(
"The Input(Predict) has not been initialized properly. The "
"shape of Input(Predict) = [%s], the shape size must be "
"greater_equal 2.",
predict_dims));
auto predict_width = predict_dims[1]; auto predict_width = predict_dims[1];
PADDLE_ENFORCE_NE( PADDLE_ENFORCE_NE(
framework::product(predict_dims), 0, framework::product(predict_dims), 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册