Compute Library
 22.11
DeconvolutionLayer.cpp File Reference
#include "arm_compute/core/Types.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
#include "arm_compute/runtime/NEON/functions/NEDeconvolutionLayer.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/DeconvolutionLayerFixture.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 NEDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4 >
 
template<typename T >
using NEDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 >
 
template<typename T >
using NEDeconvolutionLayerAsymmFixture3x3 = DeconvolutionValidationAsymmFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 >
 
template<typename T >
using NEDeconvolutionLayerAsymmFixture9x9 = DeconvolutionValidationAsymmFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 9, 9 >
 
template<typename T >
using NEDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1 >
 
template<typename T >
using NEDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 >
 
template<typename T >
using NEDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1 >
 
template<typename T >
using NEDeconvolutionLayerQuantizedPerChannelFixture4x4 = DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 4, 4 >
 
template<typename T >
using NEDeconvolutionLayerQuantizedPerChannelFixture3x3 = DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 3, 3 >
 
template<typename T >
using NEDeconvolutionLayerQuantizedPerChannelFixture1x1 = DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 1, 1 >
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(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::F16), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32), }), framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 4U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32), })), framework::dataset::make("BiasInfo", { TensorInfo(TensorShape(1U), 1, DataType::F16), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(25U, 11U), 1, DataType::F32), TensorInfo(TensorShape(1U), 1, DataType::F32), TensorInfo(TensorShape(4U), 1, DataType::F32), })), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32), TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32), TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32), })), framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(1, 1, 0, 0), PadStrideInfo(1, 1, 0, 0), PadStrideInfo(1, 1, 0, 0), PadStrideInfo(1, 1, 1, 1), PadStrideInfo(1, 1, 0, 0), })), framework::dataset::make("Expected", { false, false, false, false, false, true })), input_info, weights_info, bias_info, output_info, pad_info, expected)
 
 FIXTURE_DATA_TEST_CASE (Run, NEDeconvolutionLayerFixture4x4< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset), add_bias_dataset))
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
 combine (combine(combine(data3x3_precommit, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset), add_bias_dataset))
 
 FIXTURE_DATA_TEST_CASE (RunAsymm, NEDeconvolutionLayerAsymmFixture3x3< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3_asymm, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset), add_bias_dataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDeconvolutionLayerFixture3x3< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset), add_bias_dataset))
 
 combine (combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset), add_bias_dataset))
 
 combine (combine(combine(data9x9_small_asymm, framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout", { DataLayout::NHWC })), framework::dataset::make("AddBias", { false })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDeconvolutionLayerAsymmFixture9x9< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(data9x9_large_asymm, framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("DataLayout", { DataLayout::NHWC })), framework::dataset::make("AddBias", { false })))
 
 FIXTURE_DATA_TEST_CASE (Run, NEDeconvolutionLayerQuantizedFixture4x4< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 combine (combine(combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDeconvolutionLayerQuantizedFixture3x3< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 combine (combine(combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 combine (combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 combine (combine(combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDeconvolutionLayerQuantizedFixture3x3< int8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 combine (combine(combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_qinfo_dataset), output_qinfo_dataset), add_bias_dataset))
 
 FIXTURE_DATA_TEST_CASE (Run, NEDeconvolutionLayerQuantizedPerChannelFixture4x4< uint8_t >, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_per_channel_dataset), output_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 
 FIXTURE_DATA_TEST_CASE (RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture4x4< int8_t >, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_signed_qinfo_per_channel_dataset), output_signed_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 
 combine (combine(combine(combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_per_channel_dataset), output_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 
 FIXTURE_DATA_TEST_CASE (RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture3x3< int8_t >, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_signed_qinfo_per_channel_dataset), output_signed_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 
 combine (combine(combine(combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::QASYMM8)), data_layouts_dataset), input_qinfo_per_channel_dataset), output_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 
 FIXTURE_DATA_TEST_CASE (RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture1x1< int8_t >, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), data_layouts_dataset), input_signed_qinfo_per_channel_dataset), output_signed_qinfo_per_channel_dataset), add_bias_dataset), framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
 

Variables

 NEDeconvolutionLayerFixture3x3< float >
 
 NEDeconvolutionLayerFixture1x1< float >
 
 NEDeconvolutionLayerAsymmFixture9x9< float >
 
 NEDeconvolutionLayerQuantizedFixture3x3< uint8_t >
 
 NEDeconvolutionLayerQuantizedFixture1x1< uint8_t >
 
 NEDeconvolutionLayerQuantizedFixture4x4< int8_t >
 
 NEDeconvolutionLayerQuantizedFixture3x3< int8_t >
 
 NEDeconvolutionLayerQuantizedFixture1x1< int8_t >
 
const auto output_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0) })
 
const auto input_signed_qinfo_per_channel_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, -10) })
 
const auto output_signed_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10) })
 
 NEDeconvolutionLayerQuantizedPerChannelFixture3x3< uint8_t >
 
 NEDeconvolutionLayerQuantizedPerChannelFixture1x1< uint8_t >