fix_issue

This commit is contained in:
yefeng 2021-05-18 11:05:26 +08:00
parent 66ea5f4ea1
commit fd59c2e772
1 changed files with 5 additions and 1 deletions

View File

@ -48,7 +48,11 @@ STATUS OnnxInputAdjustOpPass::AddAttrToInput(const FuncGraphPtr &func_graph, con
auto value_data = GetValue<std::vector<int32_t>>(value_ptr);
auto param_node = BuildIntVecParameterNode(func_graph, value_data, cnode->fullname_with_scope() + "_" + attr_name);
inputs.push_back(param_node);
cnode->set_inputs(inputs);
auto manager = func_graph->manager();
MS_ASSERT(manager != nullptr);
auto tr = manager->Transact();
tr.AddEdge(cnode, param_node);
tr.Commit();
primitive_c->EraseAttr(attr_name);
} else {
MS_LOG(ERROR) << "there is no attr :" << attr_name;