31 #include "tests/datasets/DepthwiseConvolutionLayerDataset.h" 32 #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h" 37 #include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h" 50 constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1);
51 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 53 constexpr
float tolerance_num = 0.05f;
54 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 62 ActivationLayerInfo(),
68 QuantizationInfo(0.3f, 10),
69 QuantizationInfo(2.2f, 10),
163 framework::dataset::make(
"Expected", {
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
true })),
167 &weights_info.clone()->set_is_resizable(
false), &biases_info.clone()->set_is_resizable(
false), &output_info.clone()->set_is_resizable(
false),
conv_info, depth_multiplier,
ActivationLayerInfo(), dilation));
243 template <
typename T>
254 ActivationFunctionsDataset))
259 large_depth_multipliers),
263 ActivationFunctionsDataset))
274 ActivationFunctionsDataset))
279 large_depth_multipliers),
283 ActivationFunctionsDataset))
296 ActivationFunctionsDataset))
302 large_depth_multipliers),
306 ActivationFunctionsDataset))
317 ActivationFunctionsDataset))
323 large_depth_multipliers),
327 ActivationFunctionsDataset))
342 ActivationFunctionsDataset))
352 ActivationFunctionsDataset))
362 ActivationFunctionsDataset))
369 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 377 ActivationFunctionsDataset))
382 large_depth_multipliers),
386 ActivationFunctionsDataset))
397 ActivationFunctionsDataset))
402 large_depth_multipliers),
406 ActivationFunctionsDataset))
413 template <
typename T>
421 ActivationFunctionsDataset))
427 large_depth_multipliers),
431 ActivationFunctionsDataset))
444 ActivationFunctionsDataset))
450 large_depth_multipliers),
454 ActivationFunctionsDataset))
469 ActivationFunctionsDataset))
479 ActivationFunctionsDataset))
489 ActivationFunctionsDataset))
495 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 499 template <
typename T>
500 using NEDepthwiseConvolutionLayerQuantizedFixtureOptimized = DepthwiseConvolutionLayerValidationQuantizedFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>;
501 template <
typename T>
511 framework::dataset::
make("
DataType", DataType::QASYMM8)),
512 input_qinfo_dataset),
515 ActivationFunctionsDataset))
524 framework::dataset::
make("
DataType", DataType::QASYMM8)),
525 input_qinfo_dataset),
528 ActivationFunctionsDataset))
534 large_depth_multipliers),
536 input_qinfo_dataset),
539 ActivationFunctionsDataset))
548 framework::dataset::
make("
DataType", DataType::QASYMM8)),
549 input_qinfo_dataset),
552 ActivationFunctionsDataset))
558 large_depth_multipliers),
560 input_qinfo_dataset),
563 ActivationFunctionsDataset))
572 framework::dataset::
make("
DataType", DataType::QASYMM8)),
573 input_qinfo_dataset),
576 ActivationFunctionsDataset))
582 large_depth_multipliers),
584 input_qinfo_dataset),
587 ActivationFunctionsDataset))
600 input_qinfo_dataset),
603 ActivationFunctionsDataset))
612 input_qinfo_dataset),
615 ActivationFunctionsDataset))
624 input_qinfo_dataset),
627 ActivationFunctionsDataset))
639 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
640 input_qinfo_dataset),
643 ActivationFunctionsDataset))
652 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
653 input_qinfo_dataset),
656 ActivationFunctionsDataset))
662 large_depth_multipliers),
664 input_qinfo_dataset),
667 ActivationFunctionsDataset))
677 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
678 input_qinfo_dataset),
681 ActivationFunctionsDataset))
687 large_depth_multipliers),
689 input_qinfo_dataset),
692 ActivationFunctionsDataset))
700 framework::dataset::
make("
DataType", DataType::QASYMM8_SIGNED)),
701 input_qinfo_dataset),
704 ActivationFunctionsDataset))
710 large_depth_multipliers),
712 input_qinfo_dataset),
715 ActivationFunctionsDataset))
728 input_qinfo_dataset),
731 ActivationFunctionsDataset))
740 input_qinfo_dataset),
743 ActivationFunctionsDataset))
752 input_qinfo_dataset),
755 ActivationFunctionsDataset))
769 input_qinfo_dataset),
772 ActivationFunctionsDataset))
781 framework::dataset::
make("InputDataType",
DataType::QASYMM8)),
782 framework::dataset::
make("WeightsDataType",
DataType::QSYMM8_PER_CHANNEL)),
783 input_qinfo_dataset),
786 ActivationFunctionsDataset))
795 input_qinfo_dataset),
798 ActivationFunctionsDataset))
811 input_qinfo_dataset),
814 ActivationFunctionsDataset))
823 input_qinfo_dataset),
826 ActivationFunctionsDataset))
RelativeTolerance< float > tolerance_f32(0.001f)
F32 Tolerance value for comparing reference's output against implementation's output for floating poi...
NEDepthwiseConvolutionLayerQuantizedFixtureOptimized< int8_t >
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
DepthwiseConvolutionLayerValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDepthwiseConvolutionLayer, uint8_t, int8_t > NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture
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
1 channel, 1 S32 per channel
DepthwiseConvolutionLayerValidationQuantizedFixture< Tensor, Accessor, NEDepthwiseConvolutionLayer, T > NEDepthwiseConvolutionLayerQuantizedFixture
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)
Accessor implementation for Tensor objects.
DatasetMode
Possible dataset modes.
DepthwiseConvolutionLayerValidationFixture< Tensor, Accessor, NEDepthwiseConvolutionLayer, T > NEDepthwiseConvolutionLayerFixture
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, const ActivationLayerInfo &act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
Static function to check if given info will lead to a valid configuration of NEDepthwiseConvolutionLa...
quantized, asymmetric fixed-point 8-bit number unsigned
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
Padding and stride information class.
validate(CLAccessor(output_state), expected_output)
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)))
Class for specifying the size of an image or rectangle.
Num samples, height, width, channels.
NEDepthwiseConvolutionLayerQuantizedFixtureOptimized< uint8_t >
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}))
DataType
Available data types.
DataLayout
[DataLayout enum definition]
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))