Browse Source

fix bug

pull/189/head
baker 5 years ago
parent
commit
0b196449ef
2 changed files with 11 additions and 5 deletions
  1. +4
    -2
      inc/external/parser/onnx_parser.h
  2. +7
    -3
      parser/onnx/onnx_parser.cc

+ 4
- 2
inc/external/parser/onnx_parser.h View File

@@ -27,11 +27,13 @@

namespace ge {
graphStatus aclgrphParseONNX(const char *model_file,
std::map<ge::AscendString, ge::AscendString> &parser_params,
const std::map<ge::AscendString,
ge::AscendString> &parser_params,
ge::Graph &graph);

graphStatus aclgrphParseONNXFromMem(const char *buffer, size_t buffer_size,
std::map<ge::AscendString, ge::AscendString> &parser_params,
const std::map<ge::AscendString,
ge::AscendString> &parser_params,
ge::Graph &graph);
} // namespace ge



+ 7
- 3
parser/onnx/onnx_parser.cc View File

@@ -40,7 +40,9 @@

namespace ge {
graphStatus aclgrphParseONNX(const char *model_file,
std::map<AscendString, AscendString> &parser_params, ge::Graph &graph) {
const std::map<AscendString,
AscendString> &parser_params,
ge::Graph &graph) {
GE_CHECK_NOTNULL(model_file);
GetParserContext().type = domi::ONNX;
std::map<string, string> options;
@@ -86,7 +88,9 @@ graphStatus aclgrphParseONNX(const char *model_file,
}

graphStatus aclgrphParseONNXFromMem(const char *buffer, size_t buffer_size,
std::map<AscendString, AscendString> &parser_params, ge::Graph &graph) {
const std::map<AscendString,
AscendString> &parser_params,
ge::Graph &graph) {
GE_CHECK_NOTNULL(buffer);
GetParserContext().type = domi::ONNX;
std::map<string, string> options;
@@ -672,4 +676,4 @@ ge::DataType OnnxModelParser::ConvertToGeDataType(const uint32_t type) {
namespace domi {
REGISTER_MODEL_PARSER_CREATOR(ONNX, ge::OnnxModelParser);
REGISTER_WEIGHTS_PARSER_CREATOR(ONNX, ge::OnnxWeightsParser);
}
}

Loading…
Cancel
Save