fix unique shape infer bug

This commit is contained in:
lianliguang 2021-08-02 17:05:06 +08:00
parent 581b4b65e4
commit b7bcb2ee29
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};