30 #include "tests/datasets/PoolingLayerDataset.h" 31 #include "tests/datasets/PoolingTypesDataset.h" 32 #include "tests/datasets/ShapeDatasets.h" 37 #include "tests/validation/fixtures/PoolingLayerFixture.h" 48 const auto PoolingLayerDatasetFP =
combine(
combine(
combine(datasets::PoolingTypes(),
framework::dataset::make(
"PoolingSize", { Size2D(2, 2), Size2D(3, 3), Size2D(7, 7), Size2D(9, 9), Size2D(5, 7), Size2D(7, 9) })),
49 framework::dataset::make(
"PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })),
54 framework::dataset::make(
"PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })),
58 const auto PoolingLayerDatasetQASYMM8 =
combine(
combine(
combine(
framework::dataset::make(
"PoolingType", {
PoolingType::MAX,
PoolingType::AVG }),
framework::dataset::make(
"PoolingSize", { Size2D(2, 2), Size2D(3, 3), Size2D(5, 7), Size2D(8, 9) })),
59 framework::dataset::make(
"PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })),
62 constexpr AbsoluteTolerance<float> tolerance_f32(0.001f);
63 constexpr AbsoluteTolerance<float> tolerance_f16(0.01f);
64 constexpr AbsoluteTolerance<float> tolerance_qs16(6);
65 constexpr AbsoluteTolerance<float> tolerance_qs8(3);
66 constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1);
108 framework::dataset::make(
"Expected", {
false,
false,
false,
true,
false,
false,
false,
true,
false,
true })),
116 template <
typename T>
119 template <
typename T>
164 template <
typename T>
165 using CLPoolingLayerFixedPointFixture = PoolingLayerValidationFixedPointFixture<CLTensor, CLAccessor, CLPoolingLayer, T>;
171 framework::dataset::
make("FractionalBits", 1, 4)))
188 framework::dataset::
make("FractionalBits", 1, 12)))
205 template <
typename T>
206 using CLPoolingLayerQuantizedFixture = PoolingLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLPoolingLayer, T>;
210 framework::dataset::
make("
DataType", DataType::QASYMM8))),
212 QuantizationInfo(7.f / 255, 123)
quantized, symmetric fixed-point 16-bit number
quantized, symmetric fixed-point 8-bit number
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info)
Static function to check if given info will lead to a valid configuration of CLPoolingLayer.
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#define TEST_SUITE(SUITE_NAME)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
DatasetMode
Possible dataset modes.
SpecialPoolingLayerValidationFixture< CLTensor, CLAccessor, CLPoolingLayer, T > CLSpecialPoolingLayerFixture
quantized, asymmetric fixed-point 8-bit number
Accessor implementation for CLTensor objects.
CLPoolingLayerFixedPointFixture< int16_t >
Padding and stride information class.
Num samples, channels, height, width.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
TEST_SUITE_END() DATA_TEST_CASE(Configuration
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
Num samples, height, width, channels.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
Store the tensor's metadata.
Quantization settings (used for QASYMM8 data type)
DataType
Available data types.
Pooling Layer Information class.
DataLayout
Supported tensor data layouts.
PoolingLayerValidationFixture< CLTensor, CLAccessor, CLPoolingLayer, T > CLPoolingLayerFixture
zip(zip(zip(framework::dataset::make("InputInfo",{TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F16), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::QASYMM8), TensorInfo(TensorShape(5U, 5U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 2U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 22U), 1, DataType::F32)}), framework::dataset::make("OutputInfo",{TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F16), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::QASYMM8), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 16U), 1, DataType::F32), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(2U, 37U, 16U), 1, DataType::F32), TensorInfo(TensorShape(22U, 37U, 36U), 1, DataType::F32)})), framework::dataset::make("WinogradInfo",{WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(3U, 3U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(4U, 4U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW)})), framework::dataset::make("Expected",{false, false, false, false, true, true, true}))