未验证 提交 d1c5da26 编写于 作者: H Hongyu Liu 提交者: GitHub

Merge pull request #16889 from phlrain/pick_concat_new

Merge pull request #16787 from phlrain/fix_concat_shape_2
...@@ -49,7 +49,15 @@ class ConcatOp : public framework::OperatorWithKernel { ...@@ -49,7 +49,15 @@ class ConcatOp : public framework::OperatorWithKernel {
for (size_t i = 1; i < n; i++) { for (size_t i = 1; i < n; i++) {
for (size_t j = 0; j < in_zero_dims_size; j++) { for (size_t j = 0; j < in_zero_dims_size; j++) {
if (j == axis) { if (j == axis) {
out_dims[axis] += ins[i][j]; if (ctx->IsRuntime()) {
out_dims[axis] += ins[i][j];
} else {
if (ins[i][j] == -1) {
out_dims[axis] = -1;
} else {
out_dims[axis] += ins[i][j];
}
}
} else { } else {
if (ctx->IsRuntime()) { if (ctx->IsRuntime()) {
// check all shape in run time // check all shape in run time
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册