31 #include "tests/datasets/ShapeDatasets.h" 36 #include "tests/validation/fixtures/DeconvolutionLayerFixture.h" 48 constexpr AbsoluteTolerance<float> tolerance_qasymm8(1.0);
49 constexpr
float tolerance_num = 0.07f;
128 bool is_valid = bool(
CLDeconvolutionLayer::validate(&
input_info.clone()->set_is_resizable(
false), &weights_info.clone()->set_is_resizable(
false), &bias_info.clone()->set_is_resizable(
false), &output_info.clone()->set_is_resizable(
false), pad_info));
134 template <
typename T>
137 template <
typename T>
140 template <
typename T>
143 template <
typename T>
146 template <
typename T>
149 template <
typename T>
157 data_layouts_dataset),
168 data_layouts_dataset),
176 data_layouts_dataset),
183 data_layouts_dataset),
194 data_layouts_dataset),
204 data_layouts_dataset),
227 data_layouts_dataset),
238 data_layouts_dataset),
245 data_layouts_dataset),
256 data_layouts_dataset),
266 data_layouts_dataset),
277 template <
typename T>
278 using CLDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4>;
280 template <
typename T>
283 template <
typename T>
286 template <
typename T>
295 data_layouts_dataset),
309 data_layouts_dataset),
320 data_layouts_dataset),
332 framework::dataset::
make("
DataType", DataType::QASYMM8)),
333 data_layouts_dataset),
346 data_layouts_dataset),
365 DataType::QASYMM8_SIGNED)),
366 data_layouts_dataset),
380 DataType::QASYMM8_SIGNED)),
381 data_layouts_dataset),
393 data_layouts_dataset),
405 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
406 data_layouts_dataset),
418 DataType::QASYMM8_SIGNED)),
419 data_layouts_dataset),
DeconvolutionValidationFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4 > CLDeconvolutionLayerFixture4x4
DeconvolutionValidationAsymmFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 9, 9 > CLDeconvolutionLayerAsymmFixture9x9
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, ITensorInfo *output, const PadStrideInfo &deconv_info, const WeightsInfo &weights_info=WeightsInfo())
Static function to check if given info will lead to a valid configuration of CLDeconvolutionLayer.
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
DeconvolutionValidationFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1 > CLDeconvolutionLayerFixture1x1
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
RelativeTolerance< float > tolerance_fp32(0.001f)
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
Quantization information.
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(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::QSYMM16, QuantizationInfo(1.f/32768.f, 0)), })), framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SQRT), })), framework::dataset::make("Expected", { false, true, true, true, false, false, true, true, false })), input_info, output_info, act_info, expected)
DatasetMode
Possible dataset modes.
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
quantized, asymmetric fixed-point 8-bit number unsigned
Accessor implementation for CLTensor objects.
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
Padding and stride information class.
validate(CLAccessor(output_state), expected_output)
DeconvolutionValidationQuantizedFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1 > CLDeconvolutionLayerQuantizedFixture1x1
Num samples, channels, height, width.
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
DeconvolutionValidationFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 2, 2 > CLDeconvolutionLayerFixture2x2
DeconvolutionValidationFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3 > CLDeconvolutionLayerFixture3x3
Num samples, height, width, channels.
DeconvolutionValidationQuantizedFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3 > CLDeconvolutionLayerQuantizedFixture3x3
Store the tensor's metadata.
quantized, asymmetric fixed-point 8-bit number signed
RelativeTolerance< half_float::half > tolerance_f16(half(0.2))
F16 Tolerance value for comparing reference's output against implementation's output for floating poi...
zip(zip(framework::dataset::make("Weights", { TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U, 1U), 1, DataType::F32), }), framework::dataset::make("MVBGInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F32), TensorInfo(TensorShape(2U), 1, DataType::F16), TensorInfo(TensorShape(5U), 1, DataType::F32), })), framework::dataset::make("Expected", { true, false, false}))
DeconvolutionValidationQuantizedFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 2, 2 > CLDeconvolutionLayerQuantizedFixture2x2
DataType
Available data types.
DataLayout
[DataLayout enum definition]
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
DeconvolutionValidationAsymmFixture< CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3 > CLDeconvolutionLayerAsymmFixture3x3