pclint clean

This commit is contained in:
王南 2021-09-18 17:05:32 +08:00
parent f07afa38fb
commit 22caaf73af
2 changed files with 5 additions and 5 deletions

View File

@ -114,12 +114,12 @@ AbstractBasePtr BatchNormInfer(const abstract::AnalysisEnginePtr &, const Primit
auto input_x_type =
CheckAndConvertUtils::CheckTensorTypeValid("x", input_args[kInputIndex0]->BuildType(), valid_types, prim_name);
std::map<std::string, TypePtr> args;
args.emplace("scale", input_args[kInputIndex1]->BuildType());
args.emplace("bias", input_args[kInputIndex2]->BuildType());
(void)args.emplace("scale", input_args[kInputIndex1]->BuildType());
(void)args.emplace("bias", input_args[kInputIndex2]->BuildType());
(void)CheckAndConvertUtils::CheckTensorTypeSame(args, valid_types, prim_name);
std::map<std::string, TypePtr> args_moving;
args_moving.emplace("scale", input_args[kInputIndex2]->BuildType());
args_moving.emplace("bias", input_args[kInputIndex3]->BuildType());
(void)args_moving.emplace("scale", input_args[kInputIndex2]->BuildType());
(void)args_moving.emplace("bias", input_args[kInputIndex3]->BuildType());
(void)CheckAndConvertUtils::CheckTensorTypeSame(args_moving, valid_types, prim_name);
auto output0 = std::make_shared<abstract::AbstractTensor>(input_x_type, input_x);

View File

@ -57,7 +57,7 @@ abstract::ShapePtr IndexAddInferShape(const PrimitivePtr &primitive, const std::
TypePtr IndexAddInferType(const PrimitivePtr &prim, const std::vector<AbstractBasePtr> &input_args) {
auto op_name = prim->name();
const int64_t input_num = 3;
CheckAndConvertUtils::CheckInteger("IndexAdd infer", input_args.size(), kEqual, input_num, op_name);
(void)CheckAndConvertUtils::CheckInteger("input number", SizeToLong(input_args.size()), kEqual, input_num, op_name);
for (const auto &item : input_args) {
MS_EXCEPTION_IF_NULL(item);
}