21.02
|
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTensorAllocator.h"
#include "arm_compute/runtime/CL/functions/CLPoolingLayer.h"
#include "tests/CL/CLAccessor.h"
#include "tests/PaddingCalculator.h"
#include "tests/datasets/PoolingLayerDataset.h"
#include "tests/datasets/PoolingTypesDataset.h"
#include "tests/datasets/ShapeDatasets.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Validation.h"
#include "tests/validation/fixtures/PoolingLayerFixture.h"
Go to the source code of this file.
Namespaces | |
arm_compute | |
Copyright (c) 2017-2021 Arm Limited. | |
arm_compute::test | |
arm_compute::test::validation | |
Typedefs | |
template<typename T > | |
using | CLPoolingLayerFixture = PoolingLayerValidationFixture< CLTensor, CLAccessor, CLPoolingLayer, T > |
template<typename T > | |
using | CLSpecialPoolingLayerFixture = SpecialPoolingLayerValidationFixture< CLTensor, CLAccessor, CLPoolingLayer, T > |
template<typename T > | |
using | CLMixedPrecesionPoolingLayerFixture = PoolingLayerValidationMixedPrecisionFixture< CLTensor, CLAccessor, CLPoolingLayer, T > |
template<typename T > | |
using | CLPoolingLayerIndicesFixture = PoolingLayerIndicesValidationFixture< CLTensor, CLAccessor, CLPoolingLayer, T > |
Functions | |
DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(15U, 13U, 5U), 1, DataType::F32), TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::QASYMM8), TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(25U, 16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), TensorInfo(TensorShape(2U, 2U, 5U), 1, DataType::F32), TensorInfo(TensorShape(12U, 12U, 5U), 1, DataType::QASYMM8), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), })), framework::dataset::make("PoolInfo", { PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 2, 0)), PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 2)), PoolingLayerInfo(PoolingType::L2, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), PoolingLayerInfo(PoolingType::MAX, DataLayout::NCHW), PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NHWC, PadStrideInfo(), false), PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), })), framework::dataset::make("Expected", { false, false, false, false, true, false, true, true })), input_info, output_info, pool_info, expected) | |
FIXTURE_DATA_TEST_CASE (RunSpecial, CLSpecialPoolingLayerFixture< float >, framework::DatasetMode::ALL, datasets::PoolingLayerDatasetSpecial() *framework::dataset::make("DataType", DataType::F32)) | |
FIXTURE_DATA_TEST_CASE (RunSmall, CLPoolingLayerFixture< float >, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPSmall, framework::dataset::make("DataType", DataType::F32))), pool_data_layout_dataset)) | |
FIXTURE_DATA_TEST_CASE (RunLarge, CLPoolingLayerFixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, framework::dataset::make("DataType", DataType::F32))), pool_data_layout_dataset)) | |
FIXTURE_DATA_TEST_CASE (RunSmallIndices, CLPoolingLayerIndicesFixture< float >, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPIndicesSmall, framework::dataset::make("DataType", DataType::F32))), pool_data_layout_dataset)) | |
TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T> | |
[CLActivationLayer Test snippet] More... | |
combine (combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPSmall, framework::dataset::make("DataType", DataType::F16))), pool_data_layout_dataset), pool_fp_mixed_precision_dataset)) | |
FIXTURE_DATA_TEST_CASE (RunLarge, CLMixedPrecesionPoolingLayerFixture< half >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, framework::dataset::make("DataType", DataType::F16))), pool_data_layout_dataset), pool_fp_mixed_precision_dataset)) | |
FIXTURE_DATA_TEST_CASE (RunSmallIndices, CLPoolingLayerIndicesFixture< half >, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPIndicesSmall, framework::dataset::make("DataType", DataType::F16))), pool_data_layout_dataset)) | |
FIXTURE_DATA_TEST_CASE (RunSmall, CLPoolingLayerQuantizedFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetQASYMM8Small, framework::dataset::make("DataType", DataType::QASYMM8))), pool_data_layout_dataset), framework::dataset::make("InputQuantInfo", { QuantizationInfo(1.f/255.f, 10), QuantizationInfo(1.f/255.f, 10) })), framework::dataset::make("OutputQuantInfo", { QuantizationInfo(1.f/255.f, 5), QuantizationInfo(1.f/255.f, 10) }))) | |
combine (combine(combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetQASYMM8Small, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED))), pool_data_layout_dataset), framework::dataset::make("InputQuantInfo", { QuantizationInfo(1.f/127.f, -10), QuantizationInfo(1.f/127.f, -10) })), framework::dataset::make("OutputQuantInfo", { QuantizationInfo(1.f/127.f, -5), QuantizationInfo(1.f/127.f, -10) }))) | |
Variables | |
CLMixedPrecesionPoolingLayerFixture< half > | |
CLPoolingLayerQuantizedFixture< int8_t > | |