Compute Library
 22.05
DeconvolutionLayer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2021 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #include "arm_compute/core/Types.h"
29 #include "tests/NEON/Accessor.h"
31 #include "tests/datasets/ShapeDatasets.h"
33 #include "tests/framework/Macros.h"
36 #include "tests/validation/fixtures/DeconvolutionLayerFixture.h"
37 
38 namespace arm_compute
39 {
40 namespace test
41 {
42 namespace validation
43 {
44 namespace
45 {
46 constexpr AbsoluteTolerance<float> tolerance_fp32(0.001f); /**< Tolerance for floating point tests */
47 constexpr AbsoluteTolerance<float> tolerance_quantized(1.0f); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */
48 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
49 const RelativeTolerance<half_float::half> tolerance_fp16(half_float::half(0.2f)); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType::F16 */
50 #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC*/
51 constexpr float tolerance_num = 0.07f; /**< Tolerance number */
52 
53 const auto data4x4 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 3)
54  * framework::dataset::make("PadY", 0, 3) * framework::dataset::make("NumKernels", { 3 });
55 
56 const auto data3x3 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 2)
57  * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 });
58 
59 const auto data3x3_asymm = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadLeft", 0, 1)
60  * framework::dataset::make("PadRight", 0, 1) * framework::dataset::make("PadTop", 0, 1) * framework::dataset::make("PadBottom", 0, 1) * framework::dataset::make("NumKernels", { 3 });
61 
62 const auto data9x9_small_asymm = framework::dataset::make("InputShape", TensorShape{ 10U, 10U, 1U, 1U }) *framework::dataset::make("StrideX", 2) *framework::dataset::make("StrideY",
63  2)
64  *framework::dataset::make("PadLeft", 3)
65  *framework::dataset::make("PadRight", 4) *framework::dataset::make("PadTop", 3) *framework::dataset::make("PadBottom", 4) *framework::dataset::make("NumKernels", { 1 });
66 
67 const auto data9x9_large_asymm = framework::dataset::make("InputShape", TensorShape{ 640U, 360U, 56U, 1U }) *framework::dataset::make("StrideX", 2) *framework::dataset::make("StrideY",
68  2)
69  *framework::dataset::make("PadLeft", 3)
70  *framework::dataset::make("PadRight", 4) *framework::dataset::make("PadTop", 3) *framework::dataset::make("PadBottom", 4) *framework::dataset::make("NumKernels", { 1 });
71 
72 const auto data3x3_precommit = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadX", 0, 2)
73  * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 });
74 
75 const auto data1x1 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 1)
76  * framework::dataset::make("PadY", 0, 1) * framework::dataset::make("NumKernels", { 3 });
77 
78 const auto data_layouts_dataset = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC });
79 
80 const auto add_bias_dataset = framework::dataset::make("AddBias", { true, false });
81 
82 const auto input_qinfo_dataset = framework::dataset::make("InputQInfo",
83 {
84  QuantizationInfo(1.f / 255.f, 0),
85  QuantizationInfo(2.f, 0),
86 });
87 
88 const auto output_qinfo_dataset = framework::dataset::make("OutputQInfo",
89 {
90  QuantizationInfo(3.f / 255.f, 0),
91  QuantizationInfo(4.f, 0),
92 });
93 
94 } // namespace
95 
96 TEST_SUITE(NEON)
97 TEST_SUITE(DeconvolutionLayer)
98 
99 // *INDENT-OFF*
100 // clang-format off
101 DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
102  framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type
103  TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid weights shape
104  TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Non supported data type
105  TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid bias shape
106  TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), // Window shrink
107  TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32),
108  }),
109  framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
110  TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32),
111  TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
112  TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32),
114  TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32),
115  })),
122  })),
123  framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16),
124  TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32),
125  TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
126  TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32),
127  TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32),
128  TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32),
129  })),
130  framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0),
131  PadStrideInfo(1, 1, 0, 0),
132  PadStrideInfo(1, 1, 0, 0),
133  PadStrideInfo(1, 1, 0, 0),
134  PadStrideInfo(1, 1, 1, 1),
135  PadStrideInfo(1, 1, 0, 0),
136  })),
137  framework::dataset::make("Expected", { false, false, false, false, false, true })),
138  input_info, weights_info, bias_info, output_info, pad_info, expected)
139 {
140  bool is_valid = bool(NEDeconvolutionLayer::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));
142 }
143 // clang-format on
144 // *INDENT-ON*
145 
146 template <typename T>
147 using NEDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
148 
149 template <typename T>
150 using NEDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
151 
152 template <typename T>
153 using NEDeconvolutionLayerAsymmFixture3x3 = DeconvolutionValidationAsymmFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
154 
155 template <typename T>
156 using NEDeconvolutionLayerAsymmFixture9x9 = DeconvolutionValidationAsymmFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 9, 9>;
157 
158 template <typename T>
159 using NEDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
160 
161 TEST_SUITE(Float)
162 TEST_SUITE(FP32)
163 TEST_SUITE(W4x4)
164 FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture4x4<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)),
165  data_layouts_dataset),
166  add_bias_dataset))
167 {
168  // Validate output
169  validate(Accessor(_target), _reference, tolerance_fp32);
170 }
171 TEST_SUITE_END() // W4x4
172 TEST_SUITE(W3x3)
173 FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType",
174  DataType::F32)),
175  data_layouts_dataset),
176  add_bias_dataset))
177 {
178  // Validate output
179  validate(Accessor(_target), _reference, tolerance_fp32);
180 }
182  DataType::F32)),
183  data_layouts_dataset),
184  add_bias_dataset))
185 {
186  // Validate output
187  validate(Accessor(_target), _reference, tolerance_fp32);
188 }
190  data_layouts_dataset),
191  add_bias_dataset))
192 {
193  // Validate output
194  validate(Accessor(_target), _reference, tolerance_fp32);
195 }
196 TEST_SUITE_END() // W3x3
197 TEST_SUITE(W1x1)
198 FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture1x1<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)),
199  data_layouts_dataset),
200  add_bias_dataset))
201 {
202  // Validate output
203  validate(Accessor(_target), _reference, tolerance_fp32);
204 }
205 TEST_SUITE_END() // W1x1
206 TEST_SUITE(W9x9)
207 FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerAsymmFixture9x9<float>, framework::DatasetMode::ALL, combine(combine(combine(data9x9_small_asymm, framework::dataset::make("DataType",
208  DataType::F32)),
209  framework::dataset::make("DataLayout", { DataLayout::NHWC })),
210  framework::dataset::make("AddBias", { false })))
211 {
212  // Validate output
213  validate(Accessor(_target), _reference, tolerance_fp32);
214 }
216  DataType::F32)),
217  framework::dataset::make("DataLayout", { DataLayout::NHWC })),
218  framework::dataset::make("AddBias", { false })))
219 {
220  // Validate output
221  validate(Accessor(_target), _reference, tolerance_fp32);
222 }
223 TEST_SUITE_END() // W9x9
224 TEST_SUITE_END() // FP32
225 
226 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
227 TEST_SUITE(FP16)
228 TEST_SUITE(W4x4)
230  data_layouts_dataset),
231  add_bias_dataset))
232 {
233  // Validate output
234  validate(Accessor(_target), _reference, tolerance_fp16);
235 }
236 TEST_SUITE_END() // W4x4
237 TEST_SUITE(W3x3)
239  DataType::F16)),
240  data_layouts_dataset),
241  add_bias_dataset))
242 {
243  // Validate output
244  validate(Accessor(_target), _reference, tolerance_fp16);
245 }
247  data_layouts_dataset),
248  add_bias_dataset))
249 {
250  // Validate output
251  validate(Accessor(_target), _reference, tolerance_fp16);
252 }
253 TEST_SUITE_END() // W3x3
254 TEST_SUITE(W1x1)
256  data_layouts_dataset),
257  add_bias_dataset))
258 {
259  // Validate output
260  validate(Accessor(_target), _reference, tolerance_fp16);
261 }
262 TEST_SUITE_END() // W1x1
263 TEST_SUITE_END() // FP16
264 #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */
265 
266 TEST_SUITE_END() // Float
267 
268 template <typename T>
269 using NEDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
270 
271 template <typename T>
272 using NEDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
273 
274 template <typename T>
275 using NEDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
276 
277 template <typename T>
278 using NEDeconvolutionLayerQuantizedPerChannelFixture4x4 = DeconvolutionValidationQuantizedPerChannelFixture<Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 4, 4>;
279 
280 template <typename T>
281 using NEDeconvolutionLayerQuantizedPerChannelFixture3x3 = DeconvolutionValidationQuantizedPerChannelFixture<Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 3, 3>;
282 
283 template <typename T>
284 using NEDeconvolutionLayerQuantizedPerChannelFixture1x1 = DeconvolutionValidationQuantizedPerChannelFixture<Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 1, 1>;
285 
286 TEST_SUITE(Quantized)
287 TEST_SUITE(QASYMM8)
288 
289 TEST_SUITE(W4x4)
290 FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture4x4<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType",
291  DataType::QASYMM8)),
292  data_layouts_dataset),
293  input_qinfo_dataset),
295  add_bias_dataset))
296 {
297  // Validate output
298  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
299 }
300 TEST_SUITE_END() // W4x4
301 
302 TEST_SUITE(W3x3)
304  framework::dataset::make("DataType",
305  DataType::QASYMM8)),
306  data_layouts_dataset),
307  input_qinfo_dataset),
309  add_bias_dataset))
310 {
311  // Validate output
312  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
313 }
315  framework::dataset::make("DataType",
317  data_layouts_dataset),
318  input_qinfo_dataset),
320  add_bias_dataset))
321 {
322  // Validate output
323  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
324 }
325 TEST_SUITE_END() // W3x3
326 
327 TEST_SUITE(W1x1)
329  DataType::QASYMM8)),
330  data_layouts_dataset),
331  input_qinfo_dataset),
333  add_bias_dataset))
334 {
335  // Validate output
336  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
337 }
338 TEST_SUITE_END() // W1x1
339 
340 TEST_SUITE_END() // QASYMM8
341 
343 
344 TEST_SUITE(W4x4)
345 FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture4x4<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType",
346  DataType::QASYMM8_SIGNED)),
347  data_layouts_dataset),
348  input_qinfo_dataset),
350  add_bias_dataset))
351 {
352  // Validate output
353  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
354 }
355 TEST_SUITE_END() // W4x4
356 
357 TEST_SUITE(W3x3)
359  framework::dataset::make("DataType",
360  DataType::QASYMM8_SIGNED)),
361  data_layouts_dataset),
362  input_qinfo_dataset),
364  add_bias_dataset))
365 {
366  // Validate output
367  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
368 }
370  framework::dataset::make("DataType",
372  data_layouts_dataset),
373  input_qinfo_dataset),
375  add_bias_dataset))
376 {
377  // Validate output
378  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
379 }
380 TEST_SUITE_END() // W3x3
381 
382 TEST_SUITE(W1x1)
384  framework::dataset::make("DataType",
385  DataType::QASYMM8_SIGNED)),
386  data_layouts_dataset),
387  input_qinfo_dataset),
389  add_bias_dataset))
390 {
391  // Validate output
392  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
393 }
394 TEST_SUITE_END() // W1x1
395 
396 TEST_SUITE_END() // QASYMM8_SIGNED
397 
398 const auto input_qinfo_per_channel_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10) });
399 const auto output_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0) });
400 const auto input_signed_qinfo_per_channel_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, -10) });
401 const auto output_signed_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10) });
402 
404 
405 TEST_SUITE(W4x4)
407  framework::dataset::make("DataType", DataType::QASYMM8)),
408  data_layouts_dataset),
409  input_qinfo_per_channel_dataset),
411  add_bias_dataset),
412  framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
413 {
414  // Validate output
415  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
416 }
419  data_layouts_dataset),
422  add_bias_dataset),
424 {
425  // Validate output
426  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
427 }
428 TEST_SUITE_END() // W4x4
429 
430 TEST_SUITE(W3x3)
432  framework::dataset::make("DataType", DataType::QASYMM8)),
433  data_layouts_dataset),
434  input_qinfo_per_channel_dataset),
436  add_bias_dataset),
437  framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
438 {
439  // Validate output
440  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
441 }
444  data_layouts_dataset),
447  add_bias_dataset),
449 {
450  // Validate output
451  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
452 }
453 TEST_SUITE_END() // W3x3
454 
455 TEST_SUITE(W1x1)
457  framework::dataset::make("DataType", DataType::QASYMM8)),
458  data_layouts_dataset),
459  input_qinfo_per_channel_dataset),
461  add_bias_dataset),
462  framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
463 {
464  // Validate output
465  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
466 }
469  data_layouts_dataset),
472  add_bias_dataset),
474 {
475  // Validate output
476  validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
477 }
478 TEST_SUITE_END() // W1x1
479 
480 TEST_SUITE_END() // QSYMM8_PER_CHANNEL
481 
482 TEST_SUITE_END() // Quantized
483 
484 TEST_SUITE_END() // DeconvolutionLayer
485 TEST_SUITE_END() // Neon
486 } // namespace validation
487 } // namespace test
488 } // namespace arm_compute
Shape of a tensor.
Definition: TensorShape.h:39
DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 > NEDeconvolutionLayerFixture3x3
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *bias, const ITensorInfo *output, const PadStrideInfo &info)
Static function to check if given info will lead to a valid configuration of NEDeconvolutionLayer.
half_float::half half
16-bit floating point type
Definition: Types.h:48
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.
RelativeTolerance< float > tolerance_fp32(0.001f)
Copyright (c) 2017-2022 Arm Limited.
DeconvolutionValidationAsymmFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 9, 9 > NEDeconvolutionLayerAsymmFixture9x9
1 channel, 1 F16 per channel
DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1 > NEDeconvolutionLayerFixture1x1
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)
DeconvolutionValidationAsymmFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 > NEDeconvolutionLayerAsymmFixture3x3
Accessor implementation for Tensor objects.
Definition: Accessor.h:35
DatasetMode
Possible dataset modes.
Definition: DatasetModes.h:40
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
quantized, asymmetric fixed-point 8-bit number unsigned
DeconvolutionValidationQuantizedFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3 > NEDeconvolutionLayerQuantizedFixture3x3
Padding and stride information class.
Definition: Types.h:669
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)))
Definition: AbsLayer.cpp:50
DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 1, 1 > NEDeconvolutionLayerQuantizedPerChannelFixture1x1
DeconvolutionValidationQuantizedFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1 > NEDeconvolutionLayerQuantizedFixture1x1
Num samples, height, width, channels.
Store the tensor&#39;s metadata.
Definition: TensorInfo.h:43
quantized, asymmetric fixed-point 8-bit number signed
DeconvolutionValidationFixture< Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4 > NEDeconvolutionLayerFixture4x4
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}))
DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 4, 4 > NEDeconvolutionLayerQuantizedPerChannelFixture4x4
TEST_SUITE(QASYMM8_to_F32) FIXTURE_DATA_TEST_CASE(RunSmall
DataType
Available data types.
Definition: Types.h:79
DataLayout
[DataLayout enum definition]
Definition: Types.h:113
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
Definition: AbsLayer.cpp:65
DeconvolutionValidationQuantizedPerChannelFixture< Tensor, Accessor, NEDeconvolutionLayer, T, int8_t, 3, 3 > NEDeconvolutionLayerQuantizedPerChannelFixture3x3