30 #include "tests/datasets/DepthwiseConvolutionLayerDataset.h" 31 #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h" 36 #include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h" 48 constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(0);
49 constexpr
float tolerance_num = 0.05f;
57 ActivationLayerInfo(),
146 framework::dataset::make(
"Expected", {
false,
false,
false,
false,
false,
false,
false,
false,
true,
true })),
155 template <
typename T>
164 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
169 ActivationFunctionsDataset))
174 large_depth_multipliers),
178 ActivationFunctionsDataset))
188 ActivationFunctionsDataset))
193 large_depth_multipliers),
197 ActivationFunctionsDataset))
211 ActivationFunctionsDataset))
216 large_depth_multipliers),
220 ActivationFunctionsDataset))
230 ActivationFunctionsDataset))
235 large_depth_multipliers),
239 ActivationFunctionsDataset))
253 ActivationFunctionsDataset))
258 large_depth_multipliers),
262 ActivationFunctionsDataset))
273 ActivationFunctionsDataset))
278 large_depth_multipliers),
282 ActivationFunctionsDataset))
295 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
300 ActivationFunctionsDataset))
305 large_depth_multipliers),
309 ActivationFunctionsDataset))
319 ActivationFunctionsDataset))
325 large_depth_multipliers),
329 ActivationFunctionsDataset))
343 ActivationFunctionsDataset))
348 large_depth_multipliers),
352 ActivationFunctionsDataset))
364 ActivationFunctionsDataset))
370 large_depth_multipliers),
374 ActivationFunctionsDataset))
388 ActivationFunctionsDataset))
393 large_depth_multipliers),
397 ActivationFunctionsDataset))
408 ActivationFunctionsDataset))
414 large_depth_multipliers),
418 ActivationFunctionsDataset))
427 template <
typename T>
428 using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
429 template <
typename T>
438 framework::dataset::
make("
DataType", DataType::QASYMM8)),
442 ActivationFunctionsDataset))
448 large_depth_multipliers),
453 ActivationFunctionsDataset))
461 framework::dataset::
make("
DataType", DataType::QASYMM8)),
465 ActivationFunctionsDataset))
471 large_depth_multipliers),
476 ActivationFunctionsDataset))
486 framework::dataset::
make("
DataType", DataType::QASYMM8)),
490 ActivationFunctionsDataset))
496 large_depth_multipliers),
501 ActivationFunctionsDataset))
509 framework::dataset::
make("
DataType", DataType::QASYMM8)),
513 ActivationFunctionsDataset))
519 large_depth_multipliers),
524 ActivationFunctionsDataset))
537 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
541 ActivationFunctionsDataset))
549 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
553 ActivationFunctionsDataset))
566 framework::dataset::
make("SrcDataType",
DataType::QASYMM8)),
567 framework::dataset::
make("WeightsDataType",
DataType::QSYMM8_PER_CHANNEL)),
571 ActivationFunctionsDataset))
577 large_depth_multipliers),
583 ActivationFunctionsDataset))
591 framework::dataset::
make("SrcDataType",
DataType::QASYMM8)),
592 framework::dataset::
make("WeightsDataType",
DataType::QSYMM8_PER_CHANNEL)),
596 ActivationFunctionsDataset))
602 large_depth_multipliers),
608 ActivationFunctionsDataset))
623 ActivationFunctionsDataset))
629 large_depth_multipliers),
635 ActivationFunctionsDataset))
643 framework::dataset::
make("SrcDataType",
DataType::QASYMM8)),
644 framework::dataset::
make("WeightsDataType",
DataType::QSYMM8_PER_CHANNEL)),
648 ActivationFunctionsDataset))
654 large_depth_multipliers),
660 ActivationFunctionsDataset))
RelativeTolerance< float > tolerance_f32(0.001f)
F32 Tolerance value for comparing reference's output against implementation's output for floating poi...
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Activation Layer Information class.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
DepthwiseConvolutionLayerValidationQuantizedPerChannelFixture< CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, int8_t > CLDepthwiseConvolutionLayerQuantizedPerChannelFixture
1 channel, 1 S32 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)
CLDepthwiseConvolutionLayerQuantizedFixture< uint8_t >
Num samples, channels, height, width.
quantized, symmetric per channel fixed-point 8-bit number
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsLayerFixture< half >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F16)))
Upper Bounded Rectifier ( )
Class for specifying the size of an image or rectangle.
Num samples, height, width, channels.
Store the tensor's metadata.
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
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...
DepthwiseConvolutionLayerValidationFixture< CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T > CLDepthwiseConvolutionLayerFixture
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}))
DataType
Available data types.
DataLayout
[DataLayout enum definition]
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLa...