2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
6 #include <boost/test/unit_test.hpp>
7 #include "armnnTfParser/ITfParser.hpp"
8 #include "ParserPrototxtFixture.hpp"
10 BOOST_AUTO_TEST_SUITE(TensorflowParser)
12 struct MultiOutMatchFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser>
14 MultiOutMatchFixture()
46 SetupSingleInputSingleOutput({ 1, 7 }, "input", "softmax1");
50 BOOST_FIXTURE_TEST_CASE(MultiOutMatch, MultiOutMatchFixture)
52 // Note that the point of this test is to verify the parsing went well.
53 // Here we make sure the softmax has really connected to the input layer.
54 RunTest<2>({ 0, 0, 10000, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0, 0, 0 });
57 struct MultiOutFailFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser>
91 BOOST_CHECK_THROW(SetupSingleInputSingleOutput({ 1, 7 }, "input", "softmax1"), armnn::ParseException);
95 BOOST_FIXTURE_TEST_CASE(MultiOutFail, MultiOutFailFixture)
97 // Not running the graph because this is expected to throw an exception during parsing.
100 struct MultiOutInvalidFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser>
102 MultiOutInvalidFixture()
134 BOOST_CHECK_THROW(SetupSingleInputSingleOutput({ 1, 7 }, "input", "softmax1"), armnn::ParseException);
138 BOOST_FIXTURE_TEST_CASE(MultiOutInvalid, MultiOutInvalidFixture)
140 // Not running the graph because this is expected to throw an exception during parsing.
144 BOOST_AUTO_TEST_SUITE_END()