aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfParser/test/Softmax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnTfParser/test/Softmax.cpp')
-rw-r--r--src/armnnTfParser/test/Softmax.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/armnnTfParser/test/Softmax.cpp b/src/armnnTfParser/test/Softmax.cpp
new file mode 100644
index 0000000000..1ab28ea3aa
--- /dev/null
+++ b/src/armnnTfParser/test/Softmax.cpp
@@ -0,0 +1,55 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// See LICENSE file in the project root for full license information.
+//
+
+#include <boost/test/unit_test.hpp>
+#include "armnnTfParser/ITfParser.hpp"
+#include "ParserPrototxtFixture.hpp"
+
+BOOST_AUTO_TEST_SUITE(TensorflowParser)
+
+struct SoftmaxFixture : public ParserPrototxtFixture<armnnTfParser::ITfParser>
+{
+ SoftmaxFixture()
+ {
+ m_Prototext = "node {\n"
+ " name: \"blah\"\n"
+ " op: \"Placeholder\"\n"
+ " attr {\n"
+ " key: \"dtype\"\n"
+ " value {\n"
+ " type: DT_FLOAT\n"
+ " }\n"
+ " }\n"
+ " attr {\n"
+ " key: \"shape\"\n"
+ " value {\n"
+ " shape {\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ "}\n"
+ "node {\n"
+ " name: \"blah2\"\n"
+ " op: \"Softmax\"\n"
+ " input: \"blah\"\n"
+ " attr {\n"
+ " key: \"T\"\n"
+ " value {\n"
+ " type: DT_FLOAT\n"
+ " }\n"
+ " }\n"
+ "}\n";
+
+ SetupSingleInputSingleOutput({ 1, 7 }, "blah", "blah2");
+ }
+};
+
+BOOST_FIXTURE_TEST_CASE(ParseSoftmax, SoftmaxFixture)
+{
+ RunTest<2>({ 0, 0, 10000, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0, 0, 0 });
+}
+
+
+BOOST_AUTO_TEST_SUITE_END()