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)
13 struct Pooling2dFixture : public ParserPrototxtFixture<armnnTfParser::ITfParser>
15 explicit Pooling2dFixture(const char* poolingtype)
17 m_Prototext = "node {\n"
18 " name: \"Placeholder\"\n"
19 " op: \"Placeholder\"\n"
39 m_Prototext.append(poolingtype);
40 m_Prototext.append("\"\n"
42 m_Prototext.append(poolingtype);
43 m_Prototext.append("\"\n"
44 " input: \"Placeholder\"\n"
52 " key: \"data_format\"\n"
87 SetupSingleInputSingleOutput({ 1, 2, 2, 1 }, "Placeholder", poolingtype);
92 struct MaxPoolFixture : Pooling2dFixture
94 MaxPoolFixture() : Pooling2dFixture("MaxPool") {}
96 BOOST_FIXTURE_TEST_CASE(ParseMaxPool, MaxPoolFixture)
98 RunTest<4>({1.0f, 2.0f, 3.0f, -4.0f}, {3.0f});
102 struct AvgPoolFixture : Pooling2dFixture
104 AvgPoolFixture() : Pooling2dFixture("AvgPool") {}
106 BOOST_FIXTURE_TEST_CASE(ParseAvgPool, AvgPoolFixture)
108 RunTest<4>({1.0f, 2.0f, 3.0f, 4.0f}, {2.5f});
112 BOOST_AUTO_TEST_SUITE_END()