surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #include <boost/test/unit_test.hpp> |
| 7 | #include "armnnTfParser/ITfParser.hpp" |
| 8 | #include "ParserPrototxtFixture.hpp" |
| 9 | |
| 10 | BOOST_AUTO_TEST_SUITE(TensorflowParser) |
| 11 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 12 | struct SoftmaxFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser> |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 13 | { |
| 14 | SoftmaxFixture() |
| 15 | { |
| 16 | m_Prototext = "node {\n" |
| 17 | " name: \"blah\"\n" |
| 18 | " op: \"Placeholder\"\n" |
| 19 | " attr {\n" |
| 20 | " key: \"dtype\"\n" |
| 21 | " value {\n" |
| 22 | " type: DT_FLOAT\n" |
| 23 | " }\n" |
| 24 | " }\n" |
| 25 | " attr {\n" |
| 26 | " key: \"shape\"\n" |
| 27 | " value {\n" |
| 28 | " shape {\n" |
| 29 | " }\n" |
| 30 | " }\n" |
| 31 | " }\n" |
| 32 | "}\n" |
| 33 | "node {\n" |
| 34 | " name: \"blah2\"\n" |
| 35 | " op: \"Softmax\"\n" |
| 36 | " input: \"blah\"\n" |
| 37 | " attr {\n" |
| 38 | " key: \"T\"\n" |
| 39 | " value {\n" |
| 40 | " type: DT_FLOAT\n" |
| 41 | " }\n" |
| 42 | " }\n" |
| 43 | "}\n"; |
| 44 | |
| 45 | SetupSingleInputSingleOutput({ 1, 7 }, "blah", "blah2"); |
| 46 | } |
| 47 | }; |
| 48 | |
| 49 | BOOST_FIXTURE_TEST_CASE(ParseSoftmax, SoftmaxFixture) |
| 50 | { |
| 51 | RunTest<2>({ 0, 0, 10000, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0, 0, 0 }); |
| 52 | } |
| 53 | |
| 54 | |
| 55 | BOOST_AUTO_TEST_SUITE_END() |