Skip to content

Commit b66b925

Browse files
committed
fix concat shape check; test=develop
1 parent 6abac88 commit b66b925

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/concat_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ConcatOp : public framework::OperatorWithKernel {
5757
"elements except the specify axis.");
5858
} else {
5959
// not check -1 with other in compile time
60-
if (out_dims[j] != -1 && ins[i][j] != -1) {
60+
if (out_dims[j] > 0 && ins[i][j] > 0) {
6161
PADDLE_ENFORCE_EQ(out_dims[j], ins[i][j],
6262
"Input tensors should have the same "
6363
"elements except the specify axis.");

0 commit comments

Comments
 (0)