diff --git a/paddle/fluid/operators/concat_op.h b/paddle/fluid/operators/concat_op.h index c9dcda1adb3f7bd481df3aa483b9bd3338e9e211..bb72174be5ed571dcc8d1467c71ef5980f2fb965 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],