Compute Library
 22.11
PadLayer.cpp File Reference
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/NEON/functions/NEPadLayer.h"
#include "arm_compute/runtime/Tensor.h"
#include "arm_compute/runtime/TensorAllocator.h"
#include "tests/NEON/Accessor.h"
#include "tests/PaddingCalculator.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/PadLayerFixture.h"

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::validation
 

Typedefs

template<typename T >
using NEPaddingFixture = PaddingFixture< Tensor, Accessor, NEPadLayer, T >
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(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::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 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::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32) }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(28U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(29U, 17U, 2U), 1, DataType::F32), TensorInfo(TensorShape(29U, 15U, 4U, 3U), 1, DataType::F32), TensorInfo(TensorShape(27U, 14U, 3U, 4U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 3U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(28U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(29U, 17U, 2U), 1, DataType::F32), TensorInfo(TensorShape(29U, 15U, 4U, 3U), 1, DataType::F32), TensorInfo(TensorShape(27U, 14U, 3U, 4U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 3U), 1, DataType::F32) })), framework::dataset::make("PaddingSize", { PaddingList{{0, 0}}, PaddingList{{1, 1}}, PaddingList{{1, 1}, {2, 2}}, PaddingList{{1, 1}, {1, 1}, {1, 1}, {1, 1}}, PaddingList{{0, 0}, {1, 0}, {0, 1}, {1, 2}}, PaddingList{{0, 0}, {0, 0}, {0, 0}, {1, 1}}, PaddingList{{0, 0}}, PaddingList{{1, 1}}, PaddingList{{1, 1}, {2, 2}}, PaddingList{{1, 1}, {1, 1}, {1, 1}, {1, 1}}, PaddingList{{0, 0}, {1, 0}, {0, 1}, {1, 2}}, PaddingList{{0, 0}, {0, 0}, {0, 0}, {1, 1}} })), framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::CONSTANT, PaddingMode::CONSTANT, PaddingMode::CONSTANT, PaddingMode::CONSTANT, PaddingMode::CONSTANT, PaddingMode::REFLECT, PaddingMode::REFLECT, PaddingMode::REFLECT, PaddingMode::REFLECT, PaddingMode::REFLECT, PaddingMode::SYMMETRIC })), framework::dataset::make("Expected", { false, false, true, true, true, true, false, false, true, false, false, true })), input_info, output_info, padding, mode, expected)
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEPaddingFixture< float >, framework::DatasetMode::ALL, combine(combine(combine(datasets::Small3DShapes(), framework::dataset::make("DataType", { DataType::F32 })), PaddingSizesDataset), framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEPaddingFixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large3DShapes(), framework::dataset::make("DataType", { DataType::F32 })), PaddingSizesDataset), framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT, PaddingMode::SYMMETRIC })))
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
 combine (combine(combine(datasets::Small3DShapes(), framework::dataset::make("DataType", { DataType::QASYMM8 })), PaddingSizesDataset), framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEPaddingFixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large3DShapes(), framework::dataset::make("DataType", { DataType::QASYMM8 })), PaddingSizesDataset), framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT, PaddingMode::SYMMETRIC })))
 

Variables

 NEPaddingFixture< uint8_t >