From 9a35d47d306f4d5220f5df7c0d75472b2c516f7a Mon Sep 17 00:00:00 2001 From: liuxiao93 Date: Tue, 25 Jan 2022 09:07:23 +0800 Subject: [PATCH] fix wrong error info raised --- mindspore/python/mindspore/ops/_utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/python/mindspore/ops/_utils/utils.py b/mindspore/python/mindspore/ops/_utils/utils.py index cd2b3603007..140abd817c4 100644 --- a/mindspore/python/mindspore/ops/_utils/utils.py +++ b/mindspore/python/mindspore/ops/_utils/utils.py @@ -100,7 +100,7 @@ def get_concat_offset(x_shp, x_type, axis, prim_name): for j in range(rank_base): if j != axis and v[j] != x_shp[0][j]: raise ValueError(f"The shape of the two input elements of the Concat operator do not match:" - f"shape[0] = {x_shp[0]} and shape[1] = {x_shp[1]}.") + f"shape[0] = {x_shp[0]} and shape[{i}] = {x_shp[i]}.") offset.append(all_shp) if all_shp == -1 or v[axis] == -1: all_shp = -1