[moco-tf] TFShape summary (#6372)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Thu, 8 Aug 2019 04:00:26 +0000 (13:00 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 8 Aug 2019 04:00:26 +0000 (13:00 +0900)
This commit adds TFShape node summary.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
compiler/moco-tf/src/TFFormattedGraph.cpp

index d7a0590..9595270 100644 (file)
@@ -86,6 +86,7 @@ private:
   IMPLEMENT(TFMul);
   IMPLEMENT(TFReshape);
   IMPLEMENT(TFRsqrt);
+  IMPLEMENT(TFShape);
   IMPLEMENT(TFSqueeze);
 #undef IMPLEMENT
 };
@@ -240,6 +241,14 @@ bool TFNodeSummaryBuilder::summary(const TFRsqrt *node, locop::NodeSummary &s) c
   return true;
 }
 
+bool TFNodeSummaryBuilder::summary(const TFShape *node, locop::NodeSummary &s) const
+{
+  s.opname("TF.Shape");
+  s.args().append("input", tbl()->lookup(node->input()));
+  s.state(locop::NodeSummary::State::PartiallyKnown);
+  return true;
+}
+
 bool TFNodeSummaryBuilder::summary(const TFSqueeze *node, locop::NodeSummary &s) const
 {
   s.opname("TF.Squeeze");