Browse Source

!2343 add scope info in binary format

Merge pull request !2343 from leopz/master
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
2d50a43be9
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/ccsrc/onnx/ir_exporter.cc

+ 2
- 1
mindspore/ccsrc/onnx/ir_exporter.cc View File

@@ -365,7 +365,7 @@ void IrExportBuilder::SetShapeToNodeProto(const CNodePtr &node, onnx::NodeProto
// 1. prim ArgMaxWithValue need to get shape from tuple element
// 2. some cnode doesn't has shape, such as LayerNorm
// 3. other cnodes have shape
if (node->IsApply(prim::kPrimArgMaxWithValue)) {
if (node->IsApply(prim::kPrimArgMaxWithValue) || node->IsApply(prim::kPrimLayerNorm)) {
auto type = node->Type();
auto shape = node->Shape();
if (!type->isa<Tuple>()) {
@@ -407,6 +407,7 @@ void IrExportBuilder::BuildCNode(const CNodePtr &node, onnx::GraphProto *const g
std::string output_name = GetUniqueNodeName(node);
node_proto->add_output(output_name);
node_proto->set_name(output_name);
node_proto->set_domain(node->fullname_with_scope());
AnfNodePtr op = node->input(0);
std::string type_name = GetOpTypeName(op);
node_proto->set_op_type(type_name);


Loading…
Cancel
Save