15 explicit Pooling2dFixture(
const std::string &inputShape,
16 const std::string &outputShape,
17 const std::string &dataType,
18 const std::string &dataLayout,
19 const std::string &poolingAlgorithm)
27 layer_type: "InputLayer", 33 layerName: "InputLayer", 37 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 42 dimensions: )" + inputShape + R"(, 43 dataType: )" + dataType + R"( 48 layer_type: "Pooling2dLayer", 52 layerName: "Pooling2dLayer", 53 layerType: "Pooling2d", 56 connection: {sourceLayerIndex:0, outputSlotIndex:0 }, 61 dimensions: )" + outputShape + R"(, 62 dataType: )" + dataType + R"( 66 poolType: )" + poolingAlgorithm + R"(, 67 outputShapeRounding: "Floor", 68 paddingMethod: Exclude, 69 dataLayout: )" + dataLayout + R"(, 81 layer_type: "OutputLayer", 87 layerName: "OutputLayer", 91 connection: {sourceLayerIndex:1, outputSlotIndex:0 }, 96 dimensions: )" + outputShape + R"(, 97 dataType: )" + dataType + R"( 108 struct SimpleAvgPooling2dFixture : Pooling2dFixture
110 SimpleAvgPooling2dFixture() : Pooling2dFixture(
"[ 1, 2, 2, 1 ]",
112 "Float32",
"NHWC",
"Average") {}
115 struct SimpleAvgPooling2dFixture2 : Pooling2dFixture
117 SimpleAvgPooling2dFixture2() : Pooling2dFixture(
"[ 1, 2, 2, 1 ]",
119 "QuantisedAsymm8",
"NHWC",
"Average") {}
122 struct SimpleMaxPooling2dFixture : Pooling2dFixture
124 SimpleMaxPooling2dFixture() : Pooling2dFixture(
"[ 1, 1, 2, 2 ]",
126 "Float32",
"NCHW",
"Max") {}
129 struct SimpleMaxPooling2dFixture2 : Pooling2dFixture
131 SimpleMaxPooling2dFixture2() : Pooling2dFixture(
"[ 1, 1, 2, 2 ]",
133 "QuantisedAsymm8",
"NCHW",
"Max") {}
136 struct SimpleL2Pooling2dFixture : Pooling2dFixture
138 SimpleL2Pooling2dFixture() : Pooling2dFixture(
"[ 1, 2, 2, 1 ]",
140 "Float32",
"NHWC",
"L2") {}
145 RunTest<4, armnn::DataType::Float32>(0, { 2, 3, 5, 2 }, { 3 });
150 RunTest<4, armnn::DataType::QAsymmU8>(0,{ 20, 40, 60, 80 },{ 50 });
155 RunTest<4, armnn::DataType::Float32>(0, { 2, 5, 5, 2 }, { 5 });
160 RunTest<4, armnn::DataType::QAsymmU8>(0,{ 20, 40, 60, 80 },{ 80 });
165 RunTest<4, armnn::DataType::Float32>(0, { 2, 3, 5, 2 }, { 3.2403703f });
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
TEST_SUITE("Deserializer_Pooling2d")
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")