未验证 提交 42d67dac 编写于 作者: Z zhaoyuchen2018 提交者: GitHub

OP(minus) error message enhancement. test=develop (#23621)

C++ error message enhancement.
上级 a82ce2b1
......@@ -47,7 +47,10 @@ class MinusOp : public framework::OperatorWithKernel {
(framework::product(x_dims) > 0 && framework::product(y_dims) > 0)) {
PADDLE_ENFORCE_EQ(
x_dims, y_dims,
"Minus operator must take two tensor with same num of elements");
platform::errors::InvalidArgument(
"Minus operator must take two tensor with same dim, but received "
"input X dim is:[%s], Y dim is:[%s]",
x_dims, y_dims));
}
ctx->SetOutputDim("Out", x_dims);
ctx->ShareLoD("X", /*->*/ "Out");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册