From 916930a8ae8ba6580358bb2e8e9a1af35bd8406a Mon Sep 17 00:00:00 2001 From: Yan Chunwei Date: Tue, 16 Apr 2019 15:57:37 +0800 Subject: [PATCH] Update logical_op.cc test=develop --- paddle/fluid/operators/controlflow/logical_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/controlflow/logical_op.cc b/paddle/fluid/operators/controlflow/logical_op.cc index 6d8a20e385..cc28ffd635 100644 --- a/paddle/fluid/operators/controlflow/logical_op.cc +++ b/paddle/fluid/operators/controlflow/logical_op.cc @@ -74,7 +74,7 @@ class BinaryLogicalOpInferShape : public framework::InferShapeBase { int product_x = framework::product(dim_x); 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) { PADDLE_ENFORCE_EQ( product_x, product_y, -- GitLab