!32920 fix stack op infer shape

Merge pull request !32920 from fangzehua/master
This commit is contained in:
i-robot 2022-04-13 09:36:18 +00:00 committed by Gitee
commit bce742fd64
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ AbstractBasePtr InferImplStack(const AnalysisEnginePtr &, const PrimitivePtr &pr
ValuePtr axis = primitive->GetAttr("axis");
// Axis value should be in [-(rank_base + 1), rank_base).
int64_t axis_value = CheckAxis(op_name, "axis", axis, -(rank_base + 1), rank_base, "input_x");
int64_t axis_value = CheckAxis(op_name, "axis", axis, -(rank_base + 1), rank_base + 1, "input_x");
for (size_t i = 1; i < tuple_len; ++i) {
AbstractTensorPtr tensor = nullptr;