From: 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 20 Aug 2019 07:02:38 +0000 (+0900) Subject: [moco-tf] Do NOT invoke GraphInput/Output node (#6716) X-Git-Tag: accepted/tizen/unified/20190903.052428~303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d493fa984b0d54a0cb13cc8ef7ace97a966c643c;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] Do NOT invoke GraphInput/Output node (#6716) As a step to loco redesign, this commit removes all GraphInput::node and GraphOutput::node method calls in moco-tf. Signed-off-by: Jonghyun Park --- diff --git a/compiler/moco-tf/src/Frontend.cpp b/compiler/moco-tf/src/Frontend.cpp index d62b9c9..a0bf1b6 100644 --- a/compiler/moco-tf/src/Frontend.cpp +++ b/compiler/moco-tf/src/Frontend.cpp @@ -257,13 +257,15 @@ std::unique_ptr Frontend::import(const ModelSignature &signature, for (uint32_t n = 0; n < graph->inputs()->size(); ++n) { auto input = graph->inputs()->at(n); - input->shape(stdex::make_unique(tensor_shape(input->node()))); + auto input_node = loco::pull_node(graph.get(), n); + input->shape(stdex::make_unique(tensor_shape(input_node))); } for (uint32_t n = 0; n < graph->outputs()->size(); ++n) { auto output = graph->outputs()->at(n); - output->shape(stdex::make_unique(tensor_shape(output->node()))); + auto output_node = loco::push_node(graph.get(), n); + output->shape(stdex::make_unique(tensor_shape(output_node))); } // Convert graph to hold only Canonical dialect diff --git a/compiler/moco-tf/src/Importer.cpp b/compiler/moco-tf/src/Importer.cpp index 85f4073..e1418fb 100644 --- a/compiler/moco-tf/src/Importer.cpp +++ b/compiler/moco-tf/src/Importer.cpp @@ -240,7 +240,7 @@ void transform_graph(loco::Graph *graph) { for (uint32_t i = 0; i < graph->outputs()->size(); ++i) { - loco::Node *node = graph->outputs()->at(i)->node(); + loco::Node *node = loco::push_node(graph, i); std::string name = "Output(" + std::to_string(i) + ")"; dump_shapeinferencedata(node, name); }