From 05603c9aa1b999fe588d8d8850306124910a3ad2 Mon Sep 17 00:00:00 2001 From: GaoWei8 <53294385+GaoWei8@users.noreply.github.com> Date: Tue, 4 Aug 2020 10:09:49 +0800 Subject: [PATCH] fix concat dimension (#25927) Fix the condition of concat dimension judgment. --- paddle/fluid/operators/concat_op.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/concat_op.h b/paddle/fluid/operators/concat_op.h index c9dcda1adb3..bb72174be5e 100644 --- a/paddle/fluid/operators/concat_op.h +++ b/paddle/fluid/operators/concat_op.h @@ -51,7 +51,7 @@ static inline framework::DDim ComputeAndCheckShape( } } else { bool check_shape = - is_runtime || (out_dims[j] > 0 && inputs_dims[i][j] > 0); + is_runtime || (inputs_dims[0][j] > 0 && inputs_dims[i][j] > 0); if (check_shape) { // check all shape in run time PADDLE_ENFORCE_EQ(inputs_dims[0][j], inputs_dims[i][j], -- GitLab