We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e61d724 commit 6abac88Copy full SHA for 6abac88
paddle/fluid/operators/concat_op.cc
@@ -50,9 +50,19 @@ class ConcatOp : public framework::OperatorWithKernel {
50
if (j == axis) {
51
out_dims[axis] += ins[i][j];
52
} else {
53
- PADDLE_ENFORCE_EQ(out_dims[j], ins[i][j],
54
- "Input tensors should have the same "
55
- "elements except the specify axis.");
+ if (ctx->IsRuntime()) {
+ // check all shape in run time
+ PADDLE_ENFORCE_EQ(out_dims[j], ins[i][j],
56
+ "Input tensors should have the same "
57
+ "elements except the specify axis.");
58
+ } else {
59
+ // not check -1 with other in compile time
60
+ if (out_dims[j] != -1 && ins[i][j] != -1) {
61
62
63
64
+ }
65
66
}
67
68
0 commit comments