From e4084054fe8f0de1711d7577a2716807139d8002 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=82=A8=EA=B6=81=EC=84=9D/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 19 Aug 2019 10:42:04 +0900 Subject: [PATCH] [moco-tf] Add TFFormattedGraph for TFSoftmax (#6647) * [moco-tf] Add TFFormattedGraph for TFSoftmax This commit will add `TFSoftmax` summary function in `TFFormattedGraph.cpp` Signed-off-by: Seok NamKoong * fix name --- compiler/moco-tf/src/TFFormattedGraph.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/compiler/moco-tf/src/TFFormattedGraph.cpp b/compiler/moco-tf/src/TFFormattedGraph.cpp index 9595270..fb64544 100644 --- a/compiler/moco-tf/src/TFFormattedGraph.cpp +++ b/compiler/moco-tf/src/TFFormattedGraph.cpp @@ -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"); -- 2.7.4