!28564 [bug]fix oneslike infer shape bug

Merge pull request !28564 from chenzhuo/jvp
This commit is contained in:
i-robot 2022-01-05 07:29:03 +00:00 committed by Gitee
commit 016913e8c4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ TypePtr InferType(const PrimitivePtr &primitive, const std::vector<AbstractBaseP
auto infer_type = input_args[0]->BuildType();
auto valid_type = common_valid_types;
(void)valid_type.insert(kBool);
return CheckAndConvertUtils::CheckTensorTypeValid("infer_type", infer_type, valid_type, op_name);
(void)CheckAndConvertUtils::CheckTensorTypeValid("infer_type", infer_type, valid_type, op_name);
return infer_type;
}
} // namespace