ArmNN
 21.08
BatchToSpaceNdTestImpl.hpp File Reference

Go to the source code of this file.

Functions

template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest1 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest2 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest3 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest4 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest5 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest6 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNhwcTest7 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest1 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest2 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest3 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest4 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest5 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest6 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > BatchToSpaceNdNchwTest7 (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 

Function Documentation

◆ BatchToSpaceNdNchwTest1()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest1 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 284 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest2()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest2 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 317 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest3()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest3 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 341 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest4()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest4 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 374 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest5()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest5 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 407 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest6()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest6 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 431 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNchwTest7()

LayerTestResult<T, 4> BatchToSpaceNdNchwTest7 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 464 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NCHW.

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 }

◆ BatchToSpaceNdNhwcTest1()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest1 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 91 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest2()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest2 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 139 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest3()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest3 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 163 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest4()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest4 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 184 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest5()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest5 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 219 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest6()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest6 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 239 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }

◆ BatchToSpaceNdNhwcTest7()

LayerTestResult<T, 4> BatchToSpaceNdNhwcTest7 ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 263 of file BatchToSpaceNdTestImpl.hpp.

References armnn::NHWC.

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 }