提交 0c233e88 编写于 作者: S superjomn

up

test=develop
上级 f0985cec
...@@ -76,8 +76,10 @@ class BinaryLogicalOpInferShape : public framework::InferShapeBase { ...@@ -76,8 +76,10 @@ class BinaryLogicalOpInferShape : public framework::InferShapeBase {
int product_y = framework::product(dim_y); int product_y = framework::product(dim_y);
bool check = ctx->IsRuntime() && product_x >= 0 && product_y >= 0; bool check = ctx->IsRuntime() && product_x >= 0 && product_y >= 0;
if (check) { if (check) {
PADDLE_ENFORCE_EQ(framework::product(dim_x), framework::product(dim_y), PADDLE_ENFORCE_EQ(
"The number of elements in X and Y should be same"); product_x, product_y,
"The number of elements in X and Y should be same, %d != %d",
product_x, product_y);
} }
context->SetOutputDim("Out", context->GetInputDim("X")); context->SetOutputDim("Out", context->GetInputDim("X"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册