提交 21d6e8e8 编写于 作者: M minqiyang

Polish code

test=develop
上级 50b6e4c6
...@@ -116,6 +116,10 @@ class ExpandGradOp : public framework::OperatorWithKernel { ...@@ -116,6 +116,10 @@ class ExpandGradOp : public framework::OperatorWithKernel {
size_t start_pos = 0u; size_t start_pos = 0u;
if (!ctx->IsRuntime()) { if (!ctx->IsRuntime()) {
PADDLE_ENFORCE_EQ(
x_dims[i], out_dims[i],
"The first dimension size of Input(Out@GRAD) should be "
"equal to the crroresponding dimension size of Input(X)");
start_pos = 1u; start_pos = 1u;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册