diff --git a/mindspore/ops/_utils/utils.py b/mindspore/ops/_utils/utils.py index 14c719396d0..b13f1644520 100644 --- a/mindspore/ops/_utils/utils.py +++ b/mindspore/ops/_utils/utils.py @@ -84,7 +84,8 @@ def get_concat_offset(x_shp, x_type, axis, prim_name): validator.check('x_type[%d]' % i, x_type[i], 'x_type[0]', x_type[0], Rel.EQ, prim_name) for j in range(rank_base): if j != axis and v[j] != x_shp[0][j]: - raise ValueError(f"For \'{prim_name}\' element {i} shape in input can not concat with first element") + raise ValueError(f"The shape of the two input elements of the Concat operator do not match:" + f"shape[0] = {v} and shape[1] = {x_shp[0]}.") offset.append(all_shp) if all_shp == -1 or v[axis] == -1: all_shp = -1