未验证 提交 f504d6f1 编写于 作者: C Chen Weihang 提交者: GitHub

Add parameter init check add run_startup_progrom error message for fc(mul) (#20906) (#20920)

test=release/1.6
上级 53f1e024
...@@ -47,6 +47,12 @@ class MulOp : public framework::OperatorWithKernel { ...@@ -47,6 +47,12 @@ class MulOp : public framework::OperatorWithKernel {
<< " x_num_col_dims=" << x_num_col_dims << " x_num_col_dims=" << x_num_col_dims
<< " y_num_col_dims=" << y_num_col_dims; << " y_num_col_dims=" << y_num_col_dims;
PADDLE_ENFORCE_NE(framework::product(y_dims), 0,
"Maybe the Input variable Y(%s) has not "
"been initialized. You may need to confirm "
"if you put exe.run(startup_program) "
"after optimizer.minimize function.",
ctx->Inputs("Y").front());
PADDLE_ENFORCE_GT(x_dims.size(), x_num_col_dims, PADDLE_ENFORCE_GT(x_dims.size(), x_num_col_dims,
"ShapeError: The input tensor X's dimensions of MulOp " "ShapeError: The input tensor X's dimensions of MulOp "
"should be larger than x_num_col_dims. But received X's " "should be larger than x_num_col_dims. But received X's "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册