5 #include <boost/test/unit_test.hpp> 13 explicit AvgPool2DFixture(std::string inputdim, std::string outputdim, std::string dataType)
18 "operator_codes": [ { "builtin_code": "AVERAGE_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": "AvgPool2D test.", 76 "buffers" : [ {}, {} ] 84 struct AvgPoolLiteFixtureUint1DOutput : AvgPool2DFixture
86 AvgPoolLiteFixtureUint1DOutput() : AvgPool2DFixture(
"[ 1, 2, 2, 1 ]",
"[ 1, 1, 1, 1 ]",
"UINT8") {}
89 struct AvgPoolLiteFixtureFloat1DOutput : AvgPool2DFixture
91 AvgPoolLiteFixtureFloat1DOutput() : AvgPool2DFixture(
"[ 1, 2, 2, 1 ]",
"[ 1, 1, 1, 1 ]",
"FLOAT32") {}
94 struct AvgPoolLiteFixture2DOutput : AvgPool2DFixture
96 AvgPoolLiteFixture2DOutput() : AvgPool2DFixture(
"[ 1, 4, 4, 1 ]",
"[ 1, 2, 2, 1 ]",
"UINT8") {}
101 RunTest<4, armnn::DataType::QAsymmU8>(0, {2, 3, 5, 2 }, { 3 });
106 RunTest<4, armnn::DataType::Float32>(0, { 2.0f, 3.0f, 5.0f, 2.0f }, { 3.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 }, { 4, 5, 2, 2 });
117 BOOST_CHECK_THROW((RunTest<4, armnn::DataType::QAsymmU8>(0, {2, 3, 5, 2 }, { 3 })),
armnn::Exception);
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(AvgPoolLite1DOutput, AvgPoolLiteFixtureUint1DOutput)
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.