[moco/tf] Add fix for shape and padding (#4188)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 11 Jul 2019 01:37:44 +0000 (10:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 11 Jul 2019 01:37:44 +0000 (10:37 +0900)
This will add fix for shape and padding after TF transformations that can add new nodes with empty shape and padding

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
contrib/moco-tf/src/TFOptimizer.cpp

index 5071e8d..9001948 100644 (file)
@@ -40,6 +40,10 @@ void TFOptimizer::optimize(loco::Graph *g) const
   {
     phase.emplace_back(stdex::make_unique<moco::tf::FuseBinaryIntoPreceding>());
   }
+  // Fix shape and pad for added nodes doing above transformations
+  // TODO need to merge or remove the ones in importer
+  phase.emplace_back(stdex::make_unique<moco::tf::FixShapeTransform>());
+  phase.emplace_back(stdex::make_unique<moco::tf::FixPaddingTransform>());
   /* TRANSFORM DECLARATION END */
 
   moco::tf::PhaseRunner<moco::tf::PhaseStrategy::Saturate> phase_runner{g};