From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Thu, 25 Jul 2019 04:26:56 +0000 (+0900) Subject: [moco-tf] Run for active nodes for FixPad and FixShape (#5862) X-Git-Tag: submit/tizen/20190809.050447~413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a720264cb67260e6a50fb0f293d819ba4c2a9688;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] Run for active nodes for FixPad and FixShape (#5862) This will fix to run for active nodes from outputs for FixPadding and FixShape transformations Signed-off-by: SaeHie Park --- diff --git a/compiler/moco-tf/src/Transforms/FixPaddingTransform.cpp b/compiler/moco-tf/src/Transforms/FixPaddingTransform.cpp index e7d520b..6af16e9 100644 --- a/compiler/moco-tf/src/Transforms/FixPaddingTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixPaddingTransform.cpp @@ -485,7 +485,7 @@ namespace tf bool FixPaddingTransform::run(loco::Graph *graph) { bool changed = false; - for (auto node : loco::all_nodes(graph)) + for (auto node : loco::active_nodes(loco::output_nodes(graph))) { // clang-format off #define CANONICAL_NODE(TYPE_NAME) \ diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp index 415ef62..69003af 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -765,7 +765,7 @@ namespace tf bool FixShapeTransform::run(loco::Graph *graph) { bool changed = false; - for (auto node : loco::all_nodes(graph)) + for (auto node : loco::active_nodes(loco::output_nodes(graph))) { // clang-format off #define CANONICAL_NODE(TYPE_NAME) \