Commit 25c9152f authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

use friendly name for serialization and DOT files (#2493)

parent e8538ba0
......@@ -108,7 +108,7 @@ std::string pass::VisualizeTree::get_attributes(shared_ptr<Node> node)
// Construct the label attribute
{
stringstream label;
label << "label=\"" << node->get_name();
label << "label=\"" << node->get_friendly_name();
static const char* nvtos = std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES");
if (nvtos != nullptr)
......
......@@ -1176,6 +1176,7 @@ static shared_ptr<ngraph::Function>
node->add_control_dependency(node_map.at(name));
}
node->set_name(node_name);
node_map[node_name] = node;
// Typically, it could be unsafe to change the name of a node since it may break nameing
......@@ -1238,7 +1239,7 @@ static shared_ptr<ngraph::Function>
static json write(const Node& n, bool binary_constant_data)
{
json node;
node["name"] = n.get_name();
node["name"] = n.get_friendly_name();
node["op"] = n.description();
// TODO Multiple outputs
json inputs = json::array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment