!21252 fix bug of unique

Merge pull request !21252 from lianliguang/fix-bug-of-unique
This commit is contained in:
i-robot 2021-08-03 07:49:17 +00:00 committed by Gitee
commit bb0728d25b
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ AbstractBasePtr InferImplUnique(const AnalysisEnginePtr &, const PrimitivePtr &p
auto shape = input->shape();
MS_EXCEPTION_IF_NULL(shape);
if (shape->shape().empty()) {
if (shape->shape().size() != 1) {
MS_LOG(EXCEPTION) << "Rank of " << op_name << "'s input must be 1.";
}
ShapeVector ids_shape = {Shape::SHP_ANY};