5 #include <boost/test/unit_test.hpp> 13 explicit MaxPool2DFixture(std::string inputdim, std::string outputdim, std::string dataType)
18 "operator_codes": [ { "builtin_code": "MAX_POOL_2D" } ], 30 "name": "OutputTensor", 46 "name": "InputTensor", 61 "builtin_options_type": "Pool2DOptions", 69 "fused_activation_function": "NONE" 71 "custom_options_format": "FLEXBUFFERS" 75 "description": "MaxPool2D test.", 76 "buffers" : [ {}, {} ] 84 struct MaxPoolLiteFixtureUint1DOutput : MaxPool2DFixture
86 MaxPoolLiteFixtureUint1DOutput() : MaxPool2DFixture(
"[ 1, 2, 2, 1 ]",
"[ 1, 1, 1, 1 ]",
"UINT8") {}
89 struct MaxPoolLiteFixtureFloat1DOutput : MaxPool2DFixture
91 MaxPoolLiteFixtureFloat1DOutput() : MaxPool2DFixture(
"[ 1, 2, 2, 1 ]",
"[ 1, 1, 1, 1 ]",
"FLOAT32") {}
94 struct MaxPoolLiteFixtureUint2DOutput : MaxPool2DFixture
96 MaxPoolLiteFixtureUint2DOutput() : MaxPool2DFixture(
"[ 1, 4, 4, 1 ]",
"[ 1, 2, 2, 1 ]",
"UINT8") {}
101 RunTest<4, armnn::DataType::QAsymmU8>(0, { 2, 3, 5, 2 }, { 5 });
106 RunTest<4, armnn::DataType::Float32>(0, { 2.0f, 3.0f, 5.0f, 2.0f }, { 5.0f });
111 RunTest<4, armnn::DataType::QAsymmU8>(
112 0, { 1, 2, 2, 3, 5, 6, 7, 8, 3, 2, 1, 0, 1, 2, 3, 4 }, { 6, 8, 3, 4 });
117 BOOST_CHECK_THROW((RunTest<4, armnn::DataType::QAsymmU8>(0, { 2, 3, 5, 2 }, { 5 })),
armnn::Exception);
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(MaxPoolLiteUint1DOutput, MaxPoolLiteFixtureUint1DOutput)
BOOST_AUTO_TEST_SUITE_END()
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
Base class for all ArmNN exceptions so that users can filter to just those.