Merge pull request !39051 from zhujingxuan/squeeze
This commit is contained in:
i-robot 2022-07-28 13:35:31 +00:00 committed by Gitee
commit ac4ee91c19
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ abstract::ShapePtr SqueezeInferShape(const PrimitivePtr &primitive, const std::v
}
} else {
for (auto &item : axis) {
CheckAndConvertUtils::CheckInRange<int64_t>("axis_or_elememt", item, kIncludeLeft, {-rank, rank}, op_name);
CheckAndConvertUtils::CheckInRange<int64_t>("element or value of axis", item, kIncludeLeft, {-rank, rank},
op_name);
auto idx = item >= 0 ? item : rank + item;
// If shape dims contain unknown dim, ignore it.
if (in_shape[LongToSize(idx)] != UNKNOWN_DIM) {