[moco-tf] Use loco::link helper (#6228)
author박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 6 Aug 2019 00:16:58 +0000 (09:16 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 6 Aug 2019 00:16:58 +0000 (09:16 +0900)
Let's use loco::link helper instead of deprecated node method!

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
compiler/moco-tf/src/Importer.cpp
compiler/moco-tf/src/Optimizer.test.cpp
compiler/moco-tf/src/TestHelper.cpp

index 70087aa..3bcae77 100644 (file)
@@ -140,7 +140,7 @@ void convert_graph(const moco::tf::GraphBuilderSource &source,
     //
     // TODO Support other types
     graph_input->dtype(loco::DataType::FLOAT32);
-    graph_input->node(pull_node);
+    loco::link(graph_input, pull_node);
   }
 
   /**
@@ -160,7 +160,7 @@ void convert_graph(const moco::tf::GraphBuilderSource &source,
     graph_output->name(output.nodeName());
     // TODO Support other types
     graph_output->dtype(loco::DataType::FLOAT32);
-    graph_output->node(push_node);
+    loco::link(graph_output, push_node);
   }
 
   // validate graph
index 1bfa85c..5ffed58 100644 (file)
@@ -78,7 +78,7 @@ TEST(Optimizer, simple_forward_graph_with_one_valid_output)
     auto pull = g.nodes()->create<loco::Push>();
     pull->from(forward);
 
-    output->node(pull);
+    loco::link(output, pull);
   }
 
   o.optimize(&g);
index 9dd77b6..412556a 100644 (file)
@@ -39,7 +39,7 @@ void setup_output_node(loco::Graph *graph, loco::Node *last_node)
   auto graph_output = graph->outputs()->create();
   graph_output->name("output");
   graph_output->dtype(loco::DataType::FLOAT32);
-  graph_output->node(push_node);
+  loco::link(graph_output, push_node);
 }
 
 } // namespace test