[moco-tf] Add TFFormattedGraph for TFSoftmax (#6647)
author남궁석/On-Device Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Mon, 19 Aug 2019 01:42:04 +0000 (10:42 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 19 Aug 2019 01:42:04 +0000 (10:42 +0900)
* [moco-tf] Add TFFormattedGraph for TFSoftmax

This commit will add `TFSoftmax` summary function in `TFFormattedGraph.cpp`

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
* fix name

compiler/moco-tf/src/TFFormattedGraph.cpp

index 9595270..fb64544 100644 (file)
@@ -87,6 +87,7 @@ private:
   IMPLEMENT(TFReshape);
   IMPLEMENT(TFRsqrt);
   IMPLEMENT(TFShape);
+  IMPLEMENT(TFSoftmax);
   IMPLEMENT(TFSqueeze);
 #undef IMPLEMENT
 };
@@ -249,6 +250,14 @@ bool TFNodeSummaryBuilder::summary(const TFShape *node, locop::NodeSummary &s) c
   return true;
 }
 
+bool TFNodeSummaryBuilder::summary(const TFSoftmax *node, locop::NodeSummary &s) const
+{
+  s.opname("TF.Softmax");
+  s.args().append("logits", tbl()->lookup(node->logits()));
+  s.state(locop::NodeSummary::State::Complete);
+  return true;
+}
+
 bool TFNodeSummaryBuilder::summary(const TFSqueeze *node, locop::NodeSummary &s) const
 {
   s.opname("TF.Squeeze");