ArmNN
 21.08
BatchToSpaceNdTestImpl.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "LayerTestResult.hpp"
9 
10 #include <ResolveType.hpp>
11 
12 
15 
19 
20 #include <test/TensorHelpers.hpp>
21 
22 namespace
23 {
24 
25 template<armnn::DataType ArmnnType,
26  std::size_t InputDim,
27  std::size_t OutputDim,
28  typename T = armnn::ResolveType<ArmnnType>>
29 LayerTestResult<T, OutputDim> BatchToSpaceNdHelper(
30  armnn::IWorkloadFactory &workloadFactory,
32  const armnn::ITensorHandleFactory& tensorHandleFactory,
33  const armnn::DataLayout& dataLayout,
34  const unsigned int *inputShape,
35  const std::vector<float> &inputData,
36  const std::vector<unsigned int> &blockShape,
37  const std::vector<std::pair<unsigned int, unsigned int>> &crops,
38  const unsigned int *outputShape,
39  const std::vector<float> &outputData,
40  float scale = 1.0f,
41  int32_t offset = 0)
42 {
43  IgnoreUnused(memoryManager);
44 
45  armnn::TensorInfo inputTensorInfo(InputDim, inputShape, ArmnnType);
46  armnn::TensorInfo outputTensorInfo(OutputDim, outputShape, ArmnnType);
47 
48  inputTensorInfo.SetQuantizationScale(scale);
49  inputTensorInfo.SetQuantizationOffset(offset);
50 
51  outputTensorInfo.SetQuantizationScale(scale);
52  outputTensorInfo.SetQuantizationOffset(offset);
53 
54  std::vector<T> input = ConvertToDataType<ArmnnType>(inputData, inputTensorInfo);
55 
56  std::vector<T> actualOutput(outputTensorInfo.GetNumElements());
57  std::vector<T> expectedOutput = ConvertToDataType<ArmnnType>(outputData, outputTensorInfo);
58 
59  std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo);
60  std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo);
61 
63  data.m_Parameters.m_DataLayout = dataLayout;
64  data.m_Parameters.m_BlockShape = blockShape;
65  data.m_Parameters.m_Crops = crops;
67  AddInputToWorkload(data, info, inputTensorInfo, inputHandle.get());
68  AddOutputToWorkload(data, info, outputTensorInfo, outputHandle.get());
69 
70  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateBatchToSpaceNd(data, info);
71 
72  inputHandle->Allocate();
73  outputHandle->Allocate();
74 
75  CopyDataToITensorHandle(inputHandle.get(), input.data());
76 
77  workload->PostAllocationConfigure();
78  workload->Execute();
79 
80  CopyDataFromITensorHandle(actualOutput.data(), outputHandle.get());
81 
82  return LayerTestResult<T, OutputDim>(actualOutput,
83  expectedOutput,
84  outputHandle->GetShape(),
85  outputTensorInfo.GetShape());
86 }
87 
88 } // anonymous namespace
89 
90 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
92  armnn::IWorkloadFactory& workloadFactory,
94  const armnn::ITensorHandleFactory& tensorHandleFactory)
95 {
96  const unsigned int inputShape[] = {4, 2, 2, 1};
97  const unsigned int outputShape[] = {1, 4, 4, 1};
98 
99  std::vector<float> input({
100  // Batch 0, Height 0, Width (2) x Channel (1)
101  1.0f, 3.0f,
102  // Batch 0, Height 1, Width (2) x Channel (1)
103  9.0f, 11.0f,
104 
105 
106  // Batch 1, Height 0, Width (2) x Channel (1)
107  2.0f, 4.0f,
108  // Batch 1, Height 1, Width (2) x Channel (1)
109  10.0f, 12.0f,
110 
111 
112  // Batch 2, Height 0, Width (2) x Channel (1)
113  5.0f, 7.0f,
114  // Batch 2, Height 1, Width (2) x Channel (1)
115  13.0f, 15.0f,
116 
117  // Batch 3, Height 0, Width (2) x Channel (3)
118  6.0f, 8.0f,
119  // Batch 3, Height 1, Width (2) x Channel (1)
120  14.0f, 16.0f
121  });
122 
123  std::vector<float> expectedOutput({
124  1.0f, 2.0f, 3.0f, 4.0f,
125  5.0f, 6.0f, 7.0f, 8.0f,
126  9.0f, 10.0f, 11.0f, 12.0f,
127  13.0f, 14.0f, 15.0f, 16.0f
128  });
129 
130  std::vector<unsigned int> blockShape {2, 2};
131  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
132 
133  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
134  armnn::DataLayout::NHWC, inputShape, input, blockShape,
135  crops, outputShape, expectedOutput);
136 }
137 
138 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
140  armnn::IWorkloadFactory& workloadFactory,
142  const armnn::ITensorHandleFactory& tensorHandleFactory)
143 {
144  const unsigned int inputShape[] = {4, 1, 1, 1};
145  const unsigned int outputShape[] = {1, 2, 2, 1};
146 
147  std::vector<float> input({
148  // Batch 0, Height 0, Width (2) x Channel (1)
149  1.0f, 2.0f, 3.0f, 4.0f
150  });
151 
152  std::vector<float> expectedOutput({1.0f, 2.0f, 3.0f, 4.0f});
153 
154  std::vector<unsigned int> blockShape({2, 2});
155  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
156 
157  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
158  armnn::DataLayout::NHWC, inputShape, input, blockShape,
159  crops, outputShape, expectedOutput);
160 }
161 
162 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
164  armnn::IWorkloadFactory& workloadFactory,
166  const armnn::ITensorHandleFactory& tensorHandleFactory)
167 {
168  const unsigned int inputShape[] = {4, 1, 1, 3};
169  const unsigned int outputShape[] = {1, 2, 2, 3};
170 
171  std::vector<float> input({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f});
172 
173  std::vector<float> expectedOutput({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f});
174 
175  std::vector<unsigned int> blockShape({2, 2});
176  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
177 
178  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
179  armnn::DataLayout::NHWC, inputShape, input, blockShape,
180  crops, outputShape, expectedOutput);
181 }
182 
183 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
185  armnn::IWorkloadFactory& workloadFactory,
187  const armnn::ITensorHandleFactory& tensorHandleFactory)
188 {
189  const unsigned int inputShape[] = {8, 1, 3, 1};
190  const unsigned int outputShape[] = {2, 2, 4, 1};
191 
192  std::vector<float> input({
193  0.0f, 1.0f, 3.0f,
194  0.0f, 9.0f, 11.0f,
195  0.0f, 2.0f, 4.0f,
196  0.0f, 10.0f, 12.0f,
197  0.0f, 5.0f, 7.0f,
198  0.0f, 13.0f, 15.0f,
199  0.0f, 6.0f, 8.0f,
200  0.0f, 14.0f, 16.0f
201  });
202 
203  std::vector<float> expectedOutput({
204  1.0f, 2.0f, 3.0f, 4.0f,
205  5.0f, 6.0f, 7.0f, 8.0f,
206  9.0f, 10.0f, 11.0f, 12.0f,
207  13.0f, 14.0f, 15.0f, 16.0f
208  });
209 
210  std::vector<unsigned int> blockShape({2, 2});
211  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {2, 0}};
212 
213  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
214  armnn::DataLayout::NHWC, inputShape, input, blockShape,
215  crops, outputShape, expectedOutput);
216 }
217 
218 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
220  armnn::IWorkloadFactory& workloadFactory,
222  const armnn::ITensorHandleFactory& tensorHandleFactory)
223 {
224  const unsigned int inputShape[] = {4, 2, 2, 1};
225  const unsigned int outputShape[] = {1, 4, 4, 1};
226 
227  std::vector<float> input({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16});
228  std::vector<float> expectedOutput({1, 5, 2, 6, 9, 13, 10, 14, 3, 7, 4, 8, 11, 15, 12, 16});
229 
230  std::vector<unsigned int> blockShape({2, 2});
231  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
232 
233  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
234  armnn::DataLayout::NHWC, inputShape,
235  input, blockShape, crops, outputShape, expectedOutput);
236 }
237 
238 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
240  armnn::IWorkloadFactory& workloadFactory,
242  const armnn::ITensorHandleFactory& tensorHandleFactory)
243 {
244  const unsigned int inputShape[] = {4, 1, 1, 1};
245  const unsigned int outputShape[] = {1, 2, 2, 1};
246 
247  std::vector<float> input({
248  // Batch 0, Height 0, Width (2) x Channel (1)
249  1, 2, 3, 4
250  });
251 
252  std::vector<float> expectedOutput({1, 2, 3, 4});
253 
254  std::vector<unsigned int> blockShape({2, 2});
255  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
256 
257  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
258  armnn::DataLayout::NHWC, inputShape, input, blockShape,
259  crops, outputShape, expectedOutput);
260 }
261 
262 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
264  armnn::IWorkloadFactory& workloadFactory,
266  const armnn::ITensorHandleFactory& tensorHandleFactory)
267 {
268  const unsigned int inputShape[] = {4, 1, 1, 3};
269  const unsigned int outputShape[] = {1, 2, 2, 3};
270 
271  std::vector<float> input({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
272 
273  std::vector<float> expectedOutput({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
274 
275  std::vector<unsigned int> blockShape({2, 2});
276  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
277 
278  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
279  armnn::DataLayout::NHWC, inputShape, input, blockShape,
280  crops, outputShape, expectedOutput);
281 }
282 
283 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
285  armnn::IWorkloadFactory &workloadFactory,
287  const armnn::ITensorHandleFactory& tensorHandleFactory)
288 {
289  const unsigned int inputShape[] = {4, 3, 1, 1};
290  const unsigned int outputShape[] = {1, 3, 2, 2};
291 
292  std::vector<float> input({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f});
293 
294  std::vector<float> expectedOutput({
295  // Batch 0, Channel 0, Height (2) x Width (2)
296  1.0f, 4.0f,
297  7.0f, 10.0f,
298 
299  // Batch 0, Channel 1, Height (2) x Width (2)
300  2.0f, 5.0f,
301  8.0f, 11.0f,
302 
303  // Batch 0, Channel 2, Height (2) x Width (2)
304  3.0f, 6.0f,
305  9.0f, 12.0f,
306  });
307 
308  std::vector<unsigned int> blockShape({2, 2});
309  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
310 
311  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
312  armnn::DataLayout::NCHW, inputShape, input, blockShape,
313  crops, outputShape, expectedOutput);
314 }
315 
316 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
318  armnn::IWorkloadFactory& workloadFactory,
320  const armnn::ITensorHandleFactory& tensorHandleFactory)
321 {
322  const unsigned int inputShape[] = {4, 1, 1, 1};
323  const unsigned int outputShape[] = {1, 1, 2, 2};
324 
325  std::vector<float> input({
326  // Batch 0, Height 0, Width (2) x Channel (1)
327  1.0f, 2.0f, 3.0f, 4.0f
328  });
329 
330  std::vector<float> expectedOutput({1.0f, 2.0f, 3.0f, 4.0f});
331 
332  std::vector<unsigned int> blockShape({2, 2});
333  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
334 
335  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
336  armnn::DataLayout::NCHW, inputShape, input, blockShape,
337  crops, outputShape, expectedOutput);
338 }
339 
340 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
342  armnn::IWorkloadFactory& workloadFactory,
344  const armnn::ITensorHandleFactory& tensorHandleFactory)
345 {
346  const unsigned int inputShape[] = {4, 3, 1, 1};
347  const unsigned int outputShape[] = {1, 3, 2, 2};
348 
349  std::vector<float> input({1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f});
350 
351  std::vector<float> expectedOutput({
352  // Batch 0, Channel 0, Height (2) x Width (2)
353  1.0f, 7.0f,
354  2.0f, 8.0f,
355 
356  // Batch 0, Channel 1, Height (2) x Width (2)
357  3.0f, 9.0f,
358  4.0f, 10.0f,
359 
360  // Batch 0, Channel 2, Height (2) x Width (2)
361  5.0f, 11.0f,
362  6.0f, 12.0f,
363  });
364 
365  std::vector<unsigned int> blockShape({2, 2});
366  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
367 
368  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
369  armnn::DataLayout::NCHW, inputShape, input, blockShape,
370  crops, outputShape, expectedOutput);
371 }
372 
373 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
375  armnn::IWorkloadFactory &workloadFactory,
377  const armnn::ITensorHandleFactory& tensorHandleFactory)
378 {
379  const unsigned int inputShape[] = {4, 3, 1, 1};
380  const unsigned int outputShape[] = {1, 3, 2, 2};
381 
382  std::vector<float> input({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
383 
384  std::vector<float> expectedOutput({
385  // Batch 0, Channel 0, Height (2) x Width (2)
386  1, 4,
387  7, 10,
388 
389  // Batch 0, Channel 1, Height (2) x Width (2)
390  2, 5,
391  8, 11,
392 
393  // Batch 0, Channel 2, Height (2) x Width (2)
394  3, 6,
395  9, 12,
396  });
397 
398  std::vector<unsigned int> blockShape({2, 2});
399  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
400 
401  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
402  armnn::DataLayout::NCHW, inputShape, input, blockShape,
403  crops, outputShape, expectedOutput);
404 }
405 
406 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
408  armnn::IWorkloadFactory& workloadFactory,
410  const armnn::ITensorHandleFactory& tensorHandleFactory)
411 {
412  const unsigned int inputShape[] = {4, 1, 1, 1};
413  const unsigned int outputShape[] = {1, 1, 2, 2};
414 
415  std::vector<float> input({
416  // Batch 0, Height 0, Width (2) x Channel (1)
417  1, 2, 3, 4
418  });
419 
420  std::vector<float> expectedOutput({1, 2, 3, 4});
421 
422  std::vector<unsigned int> blockShape({2, 2});
423  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
424 
425  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
426  armnn::DataLayout::NCHW, inputShape, input, blockShape,
427  crops, outputShape, expectedOutput);
428 }
429 
430 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
432  armnn::IWorkloadFactory& workloadFactory,
434  const armnn::ITensorHandleFactory& tensorHandleFactory)
435 {
436  const unsigned int inputShape[] = {4, 3, 1, 1};
437  const unsigned int outputShape[] = {1, 3, 2, 2};
438 
439  std::vector<float> input({1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10, 12});
440 
441  std::vector<float> expectedOutput({
442  // Batch 0, Channel 0, Height (2) x Width (2)
443  1, 7,
444  2, 8,
445 
446  // Batch 0, Channel 1, Height (2) x Width (2)
447  3, 9,
448  4, 10,
449 
450  // Batch 0, Channel 2, Height (2) x Width (2)
451  5, 11,
452  6, 12,
453  });
454 
455  std::vector<unsigned int> blockShape({2, 2});
456  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {0, 0}};
457 
458  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
459  armnn::DataLayout::NCHW, inputShape, input, blockShape,
460  crops, outputShape, expectedOutput);
461 }
462 
463 template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
465  armnn::IWorkloadFactory& workloadFactory,
467  const armnn::ITensorHandleFactory& tensorHandleFactory)
468 {
469  const unsigned int inputShape[] = {8, 1, 1, 3};
470  const unsigned int outputShape[] = {2, 1, 2, 4};
471 
472  std::vector<float> input({
473  0, 1, 3, 0, 9, 11,
474  0, 2, 4, 0, 10, 12,
475  0, 5, 7, 0, 13, 15,
476  0, 6, 8, 0, 14, 16
477  });
478 
479  std::vector<float> expectedOutput({
480  1, 2, 3, 4,
481  5, 6, 7, 8,
482  9, 10, 11, 12,
483  13, 14, 15, 16
484  });
485 
486  std::vector<unsigned int> blockShape({2, 2});
487  std::vector<std::pair<unsigned int, unsigned int>> crops = {{0, 0}, {2, 0}};
488 
489  return BatchToSpaceNdHelper<ArmnnType, 4, 4>(workloadFactory, memoryManager, tensorHandleFactory,
490  armnn::DataLayout::NCHW, inputShape, input, blockShape,
491  crops, outputShape, expectedOutput);
492 }
virtual std::unique_ptr< IWorkload > CreateBatchToSpaceNd(const BatchToSpaceNdQueueDescriptor &descriptor, const WorkloadInfo &Info) const
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest2(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest3(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
DataLayout
Definition: Types.hpp:53
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest2(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest1(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest5(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
typename ResolveTypeImpl< DT >::Type ResolveType
Definition: ResolveType.hpp:79
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest6(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
void IgnoreUnused(Ts &&...)
DataType
Definition: Types.hpp:35
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest7(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest7(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
std::vector< unsigned int > m_BlockShape
Block shape values.
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest1(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
std::vector< std::pair< unsigned int, unsigned int > > m_Crops
The values to crop from the input dimension.
Contains information about TensorInfos of a layer.
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest3(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest6(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest4(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const =0
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest4(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest5(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)