forked from mindspore-Ecosystem/mindspore
fix_issue
This commit is contained in:
parent
66ea5f4ea1
commit
fd59c2e772
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue