Browse Source

Description:aclgrphParse IR interface

Team:HISI_SW
Feature or Bugfix:Feature
pull/63/head
l00444296 5 years ago
parent
commit
feb46f13e1
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      parser/caffe/caffe_parser.cc
  2. +2
    -2
      parser/tensorflow/tensorflow_parser.cc

+ 2
- 2
parser/caffe/caffe_parser.cc View File

@@ -108,7 +108,7 @@ graphStatus aclgrphParseCaffe(const char *model_file, const char *weights_file,
return ret;
}
GELOGI("Weights parse success. graph: %s", graph.GetName().c_str());
std::map<string, string> &parser_params;
std::map<string, string> parser_params;
if (acl_graph_parse_util.SetOutputNodeInfo(graph, parser_params) != ge::SUCCESS) {
GELOGE(ret, "Set graph %s default output node failed.", graph.GetName().c_str());
return ge::FAILED;
@@ -134,7 +134,7 @@ graphStatus aclgrphParseCaffe(const char *model_file, const char *weights_file,
return ge::FAILED;
}
// Create an empty computegraph
string graph_name = output_name.empty() ? "tmpGraph", output_name;
string graph_name = output_name.empty() ? "tmpGraph" : output_name;
ge::ComputeGraphPtr compute_graph = ge::parser::MakeShared<ge::ComputeGraph>(graph_name);
GE_CHECK_NOTNULL(compute_graph);



+ 2
- 2
parser/tensorflow/tensorflow_parser.cc View File

@@ -113,7 +113,7 @@ graphStatus aclgrphParseTensorFlow(const char *model_file, ge::Graph &graph) {
return ge::FAILED;
}

std::map<string, string> &parser_params;
std::map<string, string> parser_params;
if (acl_graph_parse_util.SetOutputNodeInfo(graph, parser_params) != ge::SUCCESS) {
GELOGE(ret, "Set graph %s default output node failed.", graph.GetName().c_str());
return ge::FAILED;
@@ -140,7 +140,7 @@ graphStatus aclgrphParseTensorFlow(const char *model_file,
return ge::FAILED;
}
// Create an empty computegraph
string graph_name = output_name.empty() ? "tmpGraph", output_name;
string graph_name = output_name.empty() ? "tmpGraph" : output_name;
ge::ComputeGraphPtr compute_graph = ge::parser::MakeShared<ge::ComputeGraph>(graph_name);
GE_CHECK_NOTNULL(compute_graph);



Loading…
Cancel
Save