From 249546bf45d9e71651efb4ab3ab452adc2b4c05c Mon Sep 17 00:00:00 2001 From: phlrain Date: Thu, 21 Mar 2019 09:36:05 +0000 Subject: [PATCH] fix concat shape check; test=develop --- paddle/fluid/operators/concat_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/concat_op.cc b/paddle/fluid/operators/concat_op.cc index 5d5ad9e711..71985ea9d4 100644 --- a/paddle/fluid/operators/concat_op.cc +++ b/paddle/fluid/operators/concat_op.cc @@ -57,7 +57,7 @@ class ConcatOp : public framework::OperatorWithKernel { "elements except the specify axis."); } else { // not check -1 with other in compile time - if (out_dims[j] != -1 && ins[i][j] != -1) { + if (out_dims[j] != > 0 && ins[i][j] > 0) { PADDLE_ENFORCE_EQ(out_dims[j], ins[i][j], "Input tensors should have the same " "elements except the specify axis."); -- GitLab