[moco-tf] Summary for TFReshape node (#5979)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Mon, 29 Jul 2019 11:16:12 +0000 (20:16 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 29 Jul 2019 11:16:12 +0000 (20:16 +0900)
This commit adds summary for TFReshape node

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

index bb7ff5f..2220498 100644 (file)
@@ -71,6 +71,7 @@ private:
   IMPLEMENT(TFConv2D);
   IMPLEMENT(TFFusedBatchNorm);
   IMPLEMENT(TFMul);
+  IMPLEMENT(TFReshape);
   IMPLEMENT(TFRsqrt);
 #undef IMPLEMENT
 };
@@ -187,6 +188,15 @@ bool TFNodeSummaryBuilder::summary(const TFMul *node, locop::NodeSummary &s) con
   return true;
 }
 
+bool TFNodeSummaryBuilder::summary(const TFReshape *node, locop::NodeSummary &s) const
+{
+  s.opname("TF.Reshape");
+  s.args().append("tensor", _tbl->lookup(node->tensor()));
+  s.args().append("shape", _tbl->lookup(node->shape()));
+  s.state(locop::NodeSummary::State::Complete);
+  return true;
+}
+
 bool TFNodeSummaryBuilder::summary(const TFRsqrt *node, locop::NodeSummary &s) const
 {
   s.opname("TF.Rsqrt");