30 #include "tests/datasets/DepthwiseConvolutionLayerDataset.h"
31 #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h"
36 #include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h"
51 constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(0);
58 const auto ActivationFunctionsSmallDataset =
make(
"ActivationInfo",
60 ActivationLayerInfo(),
61 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 2.f, 0.f)
66 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
67 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 0.8f, -0.5f),
68 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LEAKY_RELU, 0.1f),
69 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SOFT_RELU),
70 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ELU),
71 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ABS),
72 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC),
73 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH),
74 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SQUARE),
75 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::HARD_SWISH),
76 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LINEAR, 2.f, 1.f),
77 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::GELU)
82 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
83 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 2.3f, -1.5f),
137 make(
"ConvInfo", { PadStrideInfo(1, 1, 0, 0),
138 PadStrideInfo(1, 1, 0, 0),
139 PadStrideInfo(1, 1, 0, 0),
140 PadStrideInfo(1, 1, 0, 0),
141 PadStrideInfo(1, 1, 0, 0),
142 PadStrideInfo(1, 1, 0, 0),
143 PadStrideInfo(1, 1, 0, 0),
144 PadStrideInfo(1, 1, 0, 0),
145 PadStrideInfo(1, 1, 0, 0),
146 PadStrideInfo(1, 1, 1, 0),
148 make(
"DepthMultiplier", { 1,
159 make(
"Dilation", { Size2D(1U, 1U),
170 make(
"Expected", {
false,
false,
false,
false,
false,
false,
false,
false,
true,
true })),
179 template <
typename T>
181 template <
typename T>
183 template <
typename T>
192 framework::dataset::
concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
193 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
197 ActivationFunctionsSmallDataset))
204 datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
208 ActivationFunctionsSmallDataset))
218 datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
222 ActivationFunctionsSmallDataset))
228 datasets::LargeDepthwiseConvolutionLayerDataset3x3Fp16Subset(),
242 ActivationFunctionsSmallDataset))
266 ActivationFunctionsSmallDataset))
286 make(
"DepthMultiplier", { 2 }),
300 ActivationFunctionsSmallDataset))
320 make("DepthMultiplier", { 1 })),
324 ActivationFunctionsSmallDataset))
336 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
341 ActivationFunctionsSmallDataset))
351 ActivationFunctionsSmallDataset))
365 ActivationFunctionsSmallDataset))
371 make(
"DepthMultiplier", { 2 })),
397 ActivationFunctionsSmallDataset))
421 ActivationFunctionsSmallDataset))
438 make(
"DepthMultiplier", { 1 })),
442 ActivationFunctionsSmallDataset))
453 make(
"DepthMultiplier", { 2 }),
467 ActivationFunctionsSmallDataset))
487 make("DepthMultiplier", { 1 })),
491 ActivationFunctionsSmallDataset))
499 template <typename T>
500 using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
501 template <typename T>
503 template <typename T>
516 ActivationFunctionsSmallDataset))
518 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
527 make(
"ActivationInfo", ActivationLayerInfo())))
529 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
537 make(
"DepthMultiplier", { 2
U }),
544 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
554 ActivationFunctionsSmallDataset))
556 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
565 make(
"ActivationInfo", ActivationLayerInfo())))
567 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
579 ActivationFunctionsSmallDataset))
581 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
590 make(
"ActivationInfo", ActivationLayerInfo())))
592 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
602 ActivationFunctionsSmallDataset))
604 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
608 make(
"DepthMultiplier", { 2 })),
613 make(
"ActivationInfo", ActivationLayerInfo())))
615 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
624 make(
"ActivationInfo", ActivationLayerInfo())))
626 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
641 ActivationFunctionsSmallDataset))
643 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
647 make(
"DepthMultiplier", { 2 })),
652 make(
"ActivationInfo", ActivationLayerInfo())))
654 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
662 make(
"DepthMultiplier", { 2
U }),
669 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
679 ActivationFunctionsSmallDataset))
681 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
697 ActivationFunctionsSmallDataset))
699 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
709 make(
"ActivationInfo", ActivationLayerInfo())))
711 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
719 make(
"DepthMultiplier", { 2
U }),
727 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
738 ActivationFunctionsSmallDataset))
740 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
750 make(
"ActivationInfo", ActivationLayerInfo())))
752 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
765 ActivationFunctionsSmallDataset))
767 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
777 make(
"ActivationInfo", ActivationLayerInfo())))
779 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
790 ActivationFunctionsSmallDataset))
792 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
802 make(
"ActivationInfo", ActivationLayerInfo())))
804 validate(CLAccessor(_target), _reference, tolerance_qasymm8);