blob: f7e7ae26b94ccf047281985b0d493e1031984d2e [file] [log] [blame]
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +01001/*
Michalis Spyroud466c2d2018-01-30 10:54:39 +00002 * Copyright (c) 2017-2018 ARM Limited.
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +01003 *
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#ifndef __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__
25#define __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__
26
27#include "arm_compute/core/TensorShape.h"
Moritz Pflanzera09de0c2017-09-01 20:41:12 +010028#include "tests/framework/datasets/Datasets.h"
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +010029
30#include <type_traits>
31
32namespace arm_compute
33{
34namespace test
35{
36namespace datasets
37{
Gian Marco5420b282017-11-29 10:41:38 +000038/** Parent type for all for shape datasets. */
39using ShapeDataset = framework::dataset::ContainerDataset<std::vector<TensorShape>>;
40
Michele Di Giorgio5daeffd2018-11-26 10:01:15 +000041/** Data set containing tiny 1D tensor shapes. */
42class Tiny1DShapes final : public ShapeDataset
43{
44public:
45 Tiny1DShapes()
46 : ShapeDataset("Shape",
47 {
48 TensorShape{ 2U },
49 TensorShape{ 3U },
50 })
51 {
52 }
53};
54
Gian Marco5420b282017-11-29 10:41:38 +000055/** Data set containing small 1D tensor shapes. */
56class Small1DShapes final : public ShapeDataset
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +010057{
58public:
Gian Marco5420b282017-11-29 10:41:38 +000059 Small1DShapes()
60 : ShapeDataset("Shape",
61 {
Giorgio Arenae3d24ce2018-08-24 14:44:08 +010062 TensorShape{ 128U },
63 TensorShape{ 256U },
64 TensorShape{ 512U },
65 TensorShape{ 1024U }
Gian Marco5420b282017-11-29 10:41:38 +000066 })
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +010067 {
68 }
69};
70
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +000071/** Data set containing tiny 2D tensor shapes. */
72class Tiny2DShapes final : public ShapeDataset
73{
74public:
75 Tiny2DShapes()
76 : ShapeDataset("Shape",
77 {
78 TensorShape{ 7U, 7U },
79 TensorShape{ 11U, 13U },
80 })
81 {
82 }
83};
Moritz Pflanzerb3d25792017-07-26 11:49:37 +010084/** Data set containing small 2D tensor shapes. */
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +010085class Small2DShapes final : public ShapeDataset
86{
87public:
88 Small2DShapes()
89 : ShapeDataset("Shape",
90 {
Moritz Pflanzer3ce3ff42017-07-21 17:41:02 +010091 TensorShape{ 7U, 7U },
92 TensorShape{ 27U, 13U },
93 TensorShape{ 128U, 64U }
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +010094 })
95 {
96 }
97};
98
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +000099/** Data set containing tiny 3D tensor shapes. */
100class Tiny3DShapes final : public ShapeDataset
101{
102public:
103 Tiny3DShapes()
104 : ShapeDataset("Shape",
105 {
106 TensorShape{ 7U, 7U, 5U },
107 TensorShape{ 23U, 13U, 9U },
108 })
109 {
110 }
111};
112
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100113/** Data set containing small 3D tensor shapes. */
114class Small3DShapes final : public ShapeDataset
115{
116public:
117 Small3DShapes()
118 : ShapeDataset("Shape",
119 {
Georgios Pinitas02ee4292018-02-15 17:22:36 +0000120 TensorShape{ 1U, 7U, 7U },
121 TensorShape{ 7U, 7U, 5U },
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100122 TensorShape{ 27U, 13U, 37U },
123 TensorShape{ 128U, 64U, 21U }
124 })
125 {
126 }
127};
128
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000129/** Data set containing tiny 4D tensor shapes. */
130class Tiny4DShapes final : public ShapeDataset
131{
132public:
133 Tiny4DShapes()
134 : ShapeDataset("Shape",
135 {
136 TensorShape{ 7U, 7U, 5U, 3U },
137 TensorShape{ 17U, 13U, 7U, 2U },
138 })
139 {
140 }
141};
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100142/** Data set containing small 4D tensor shapes. */
143class Small4DShapes final : public ShapeDataset
144{
145public:
146 Small4DShapes()
147 : ShapeDataset("Shape",
148 {
Georgios Pinitas02ee4292018-02-15 17:22:36 +0000149 TensorShape{ 1U, 7U, 1U, 3U },
150 TensorShape{ 7U, 7U, 5U, 3U },
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100151 TensorShape{ 27U, 13U, 37U, 2U },
152 TensorShape{ 128U, 64U, 21U, 3U }
153 })
154 {
155 }
156};
157
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100158/** Data set containing small tensor shapes. */
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000159class TinyShapes final : public ShapeDataset
160{
161public:
162 TinyShapes()
163 : ShapeDataset("Shape",
164 {
165 // Batch size 1
166 TensorShape{ 9U, 9U },
167 TensorShape{ 27U, 13U, 2U },
168 })
169 {
170 }
171};
172/** Data set containing small tensor shapes. */
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100173class SmallShapes final : public ShapeDataset
174{
175public:
176 SmallShapes()
177 : ShapeDataset("Shape",
178 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100179 // Batch size 1
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100180 TensorShape{ 11U, 11U },
Georgios Pinitas64f1a902018-09-18 13:42:51 +0100181 TensorShape{ 27U, 13U, 7U },
182 TensorShape{ 31U, 27U, 17U, 2U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100183 // Batch size 4
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100184 TensorShape{ 11U, 11U, 3U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100185 TensorShape{ 27U, 13U, 2U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100186 // Arbitrary batch size
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100187 TensorShape{ 11U, 11U, 3U, 5U }
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100188 })
189 {
190 }
191};
192
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000193/** Data set containing pairs of small tensor shapes that are broadcast compatible. */
194class SmallShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
195{
196public:
197 SmallShapesBroadcast()
198 : ZipDataset<ShapeDataset, ShapeDataset>(
199 ShapeDataset("Shape0",
200 {
201 TensorShape{ 9U, 9U },
202 TensorShape{ 27U, 13U, 2U },
203 TensorShape{ 128U, 1U, 5U, 3U },
204 TensorShape{ 9U, 9U, 3U, 4U },
205 TensorShape{ 27U, 13U, 2U, 4U },
206 TensorShape{ 1U, 1U, 1U, 5U }
207 }),
208 ShapeDataset("Shape1",
209 {
210 TensorShape{ 9U, 1U, 2U },
211 TensorShape{ 1U, 13U, 2U },
212 TensorShape{ 128U, 64U, 1U, 3U },
213 TensorShape{ 9U, 1U, 3U },
214 TensorShape{ 1U },
215 TensorShape{ 9U, 9U, 3U, 5U }
216 }))
217 {
218 }
219};
220
steniu01f81652d2017-09-11 15:29:12 +0100221/** Data set containing medium tensor shapes. */
222class MediumShapes final : public ShapeDataset
223{
224public:
225 MediumShapes()
226 : ShapeDataset("Shape",
227 {
228 // Batch size 1
229 TensorShape{ 37U, 37U },
230 TensorShape{ 27U, 33U, 2U },
231 TensorShape{ 128U, 64U, 1U, 3U },
232 // Batch size 4
233 TensorShape{ 37U, 37U, 3U, 4U },
234 TensorShape{ 27U, 33U, 2U, 4U },
235 // Arbitrary batch size
236 TensorShape{ 37U, 37U, 3U, 5U }
237 })
238 {
239 }
240};
241
Gian Marco37908d92017-11-07 14:38:22 +0000242/** Data set containing medium 2D tensor shapes. */
243class Medium2DShapes final : public ShapeDataset
244{
245public:
246 Medium2DShapes()
247 : ShapeDataset("Shape",
248 {
249 TensorShape{ 42U, 37U },
250 TensorShape{ 57U, 60U },
251 TensorShape{ 128U, 64U },
Gian Marco Iodice2abb2162018-04-11 10:49:04 +0100252 TensorShape{ 83U, 72U },
253 TensorShape{ 40U, 40U }
Gian Marco37908d92017-11-07 14:38:22 +0000254 })
255 {
256 }
257};
258
Gian Marco Iodice7e4b2392018-02-22 16:17:20 +0000259/** Data set containing medium 3D tensor shapes. */
260class Medium3DShapes final : public ShapeDataset
261{
262public:
263 Medium3DShapes()
264 : ShapeDataset("Shape",
265 {
266 TensorShape{ 42U, 37U, 8U },
267 TensorShape{ 57U, 60U, 13U },
268 TensorShape{ 128U, 64U, 21U },
269 TensorShape{ 83U, 72U, 14U }
270 })
271 {
272 }
273};
274
275/** Data set containing medium 4D tensor shapes. */
276class Medium4DShapes final : public ShapeDataset
277{
278public:
279 Medium4DShapes()
280 : ShapeDataset("Shape",
281 {
282 TensorShape{ 42U, 37U, 8U, 15U },
283 TensorShape{ 57U, 60U, 13U, 8U },
284 TensorShape{ 128U, 64U, 21U, 13U },
285 TensorShape{ 83U, 72U, 14U, 5U }
286 })
287 {
288 }
289};
290
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100291/** Data set containing large tensor shapes. */
292class LargeShapes final : public ShapeDataset
293{
294public:
295 LargeShapes()
296 : ShapeDataset("Shape",
297 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100298 // Batch size 1
Gian Marco7f0f7902017-12-07 09:26:56 +0000299 TensorShape{ 1921U, 1083U },
300 TensorShape{ 641U, 485U, 2U, 3U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100301 // Batch size 4
Gian Marco7f0f7902017-12-07 09:26:56 +0000302 TensorShape{ 799U, 595U, 1U, 4U },
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100303 })
304 {
305 }
306};
307
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000308/** Data set containing pairs of large tensor shapes that are broadcast compatible. */
309class LargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
310{
311public:
312 LargeShapesBroadcast()
313 : ZipDataset<ShapeDataset, ShapeDataset>(
314 ShapeDataset("Shape0",
315 {
316 TensorShape{ 1921U, 541U },
317 TensorShape{ 1U, 485U, 2U, 3U },
318 TensorShape{ 4159U, 1U },
319 TensorShape{ 799U }
320 }),
321 ShapeDataset("Shape1",
322 {
323 TensorShape{ 1921U, 1U, 2U },
324 TensorShape{ 641U, 1U, 2U, 3U },
325 TensorShape{ 1U, 127U, 25U },
326 TensorShape{ 799U, 595U, 1U, 4U }
327 }))
328 {
329 }
330};
331
Gian Marco5420b282017-11-29 10:41:38 +0000332/** Data set containing large 1D tensor shapes. */
333class Large1DShapes final : public ShapeDataset
334{
335public:
336 Large1DShapes()
337 : ShapeDataset("Shape",
338 {
339 TensorShape{ 1921U },
340 TensorShape{ 1245U },
341 TensorShape{ 4160U }
342 })
343 {
344 }
345};
346
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100347/** Data set containing large 2D tensor shapes. */
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100348class Large2DShapes final : public ShapeDataset
349{
350public:
351 Large2DShapes()
352 : ShapeDataset("Shape",
353 {
354 TensorShape{ 1920U, 1080U },
Moritz Pflanzer3ce3ff42017-07-21 17:41:02 +0100355 TensorShape{ 1245U, 652U },
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100356 TensorShape{ 4160U, 3120U }
357 })
358 {
359 }
360};
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100361
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100362/** Data set containing large 3D tensor shapes. */
363class Large3DShapes final : public ShapeDataset
364{
365public:
366 Large3DShapes()
367 : ShapeDataset("Shape",
368 {
369 TensorShape{ 320U, 240U, 3U },
370 TensorShape{ 383U, 653U, 2U },
371 TensorShape{ 721U, 123U, 13U }
372 })
373 {
374 }
375};
376
377/** Data set containing large 4D tensor shapes. */
378class Large4DShapes final : public ShapeDataset
379{
380public:
381 Large4DShapes()
382 : ShapeDataset("Shape",
383 {
384 TensorShape{ 320U, 123U, 3U, 3U },
385 TensorShape{ 383U, 413U, 2U, 3U },
386 TensorShape{ 517U, 123U, 13U, 2U }
387 })
388 {
389 }
390};
391
Gian Marco Iodice247f52c2018-03-22 11:24:56 +0000392/** Data set containing small 3x3 tensor shapes. */
393class Small3x3Shapes final : public ShapeDataset
394{
395public:
396 Small3x3Shapes()
397 : ShapeDataset("Shape",
398 {
399 TensorShape{ 3U, 3U, 7U, 4U },
400 TensorShape{ 3U, 3U, 4U, 13U },
401 TensorShape{ 3U, 3U, 9U, 2U },
402 TensorShape{ 3U, 3U, 3U, 5U },
403 })
404 {
405 }
406};
407
Gian Marco Iodicef1c2bf02018-06-13 14:05:54 +0100408/** Data set containing small 3x1 tensor shapes. */
409class Small3x1Shapes final : public ShapeDataset
410{
411public:
412 Small3x1Shapes()
413 : ShapeDataset("Shape",
414 {
415 TensorShape{ 3U, 1U, 7U, 4U },
416 TensorShape{ 3U, 1U, 4U, 13U },
417 TensorShape{ 3U, 1U, 9U, 2U },
418 TensorShape{ 3U, 1U, 3U, 5U },
419 })
420 {
421 }
422};
423
424/** Data set containing small 1x3 tensor shapes. */
425class Small1x3Shapes final : public ShapeDataset
426{
427public:
428 Small1x3Shapes()
429 : ShapeDataset("Shape",
430 {
431 TensorShape{ 1U, 3U, 7U, 4U },
432 TensorShape{ 1U, 3U, 4U, 13U },
433 TensorShape{ 1U, 3U, 9U, 2U },
434 TensorShape{ 1U, 3U, 3U, 5U },
435 })
436 {
437 }
438};
439
Gian Marco Iodice247f52c2018-03-22 11:24:56 +0000440/** Data set containing large 3x3 tensor shapes. */
441class Large3x3Shapes final : public ShapeDataset
442{
443public:
444 Large3x3Shapes()
445 : ShapeDataset("Shape",
446 {
447 TensorShape{ 3U, 3U, 32U, 64U },
448 TensorShape{ 3U, 3U, 51U, 13U },
449 TensorShape{ 3U, 3U, 53U, 47U },
450 TensorShape{ 3U, 3U, 128U, 384U },
451 })
452 {
453 }
454};
455
Gian Marco Iodicef1c2bf02018-06-13 14:05:54 +0100456/** Data set containing large 3x1 tensor shapes. */
457class Large3x1Shapes final : public ShapeDataset
458{
459public:
460 Large3x1Shapes()
461 : ShapeDataset("Shape",
462 {
463 TensorShape{ 3U, 1U, 32U, 64U },
464 TensorShape{ 3U, 1U, 51U, 13U },
465 TensorShape{ 3U, 1U, 53U, 47U },
466 TensorShape{ 3U, 1U, 128U, 384U },
467 })
468 {
469 }
470};
471
472/** Data set containing large 1x3 tensor shapes. */
473class Large1x3Shapes final : public ShapeDataset
474{
475public:
476 Large1x3Shapes()
477 : ShapeDataset("Shape",
478 {
479 TensorShape{ 1U, 3U, 32U, 64U },
480 TensorShape{ 1U, 3U, 51U, 13U },
481 TensorShape{ 1U, 3U, 53U, 47U },
482 TensorShape{ 1U, 3U, 128U, 384U },
483 })
484 {
485 }
486};
487
Giorgio Arena9373c8b2018-04-11 19:07:17 +0100488/** Data set containing small 5x5 tensor shapes. */
489class Small5x5Shapes final : public ShapeDataset
490{
491public:
492 Small5x5Shapes()
493 : ShapeDataset("Shape",
494 {
495 TensorShape{ 5U, 5U, 7U, 4U },
496 TensorShape{ 5U, 5U, 4U, 13U },
497 TensorShape{ 5U, 5U, 9U, 2U },
498 TensorShape{ 5U, 5U, 3U, 5U },
499 })
500 {
501 }
502};
503
504/** Data set containing large 5x5 tensor shapes. */
505class Large5x5Shapes final : public ShapeDataset
506{
507public:
508 Large5x5Shapes()
509 : ShapeDataset("Shape",
510 {
511 TensorShape{ 5U, 5U, 32U, 64U },
512 TensorShape{ 5U, 5U, 51U, 13U },
513 TensorShape{ 5U, 5U, 53U, 47U },
514 TensorShape{ 5U, 5U, 128U, 384U },
515 })
516 {
517 }
518};
519
Gian Marco Iodice876be2a2018-07-03 12:22:09 +0100520/** Data set containing small 5x1 tensor shapes. */
521class Small5x1Shapes final : public ShapeDataset
522{
523public:
524 Small5x1Shapes()
525 : ShapeDataset("Shape",
526 {
527 TensorShape{ 5U, 1U, 7U, 4U },
528 TensorShape{ 5U, 1U, 4U, 13U },
529 TensorShape{ 5U, 1U, 9U, 2U },
530 TensorShape{ 5U, 1U, 3U, 5U },
531 })
532 {
533 }
534};
535
536/** Data set containing large 5x1 tensor shapes. */
537class Large5x1Shapes final : public ShapeDataset
538{
539public:
540 Large5x1Shapes()
541 : ShapeDataset("Shape",
542 {
543 TensorShape{ 5U, 1U, 32U, 64U },
544 TensorShape{ 5U, 1U, 51U, 13U },
545 TensorShape{ 5U, 1U, 53U, 47U },
546 TensorShape{ 5U, 1U, 128U, 384U },
547 })
548 {
549 }
550};
551
552/** Data set containing small 1x5 tensor shapes. */
553class Small1x5Shapes final : public ShapeDataset
554{
555public:
556 Small1x5Shapes()
557 : ShapeDataset("Shape",
558 {
559 TensorShape{ 1U, 5U, 7U, 4U },
560 TensorShape{ 1U, 5U, 4U, 13U },
561 TensorShape{ 1U, 5U, 9U, 2U },
562 TensorShape{ 1U, 5U, 3U, 5U },
563 })
564 {
565 }
566};
567
568/** Data set containing large 1x5 tensor shapes. */
569class Large1x5Shapes final : public ShapeDataset
570{
571public:
572 Large1x5Shapes()
573 : ShapeDataset("Shape",
574 {
575 TensorShape{ 1U, 5U, 32U, 64U },
576 TensorShape{ 1U, 5U, 51U, 13U },
577 TensorShape{ 1U, 5U, 53U, 47U },
578 TensorShape{ 1U, 5U, 128U, 384U },
579 })
580 {
581 }
582};
583
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100584/** Data set containing small tensor shapes for deconvolution. */
585class SmallDeconvolutionShapes final : public ShapeDataset
586{
587public:
588 SmallDeconvolutionShapes()
589 : ShapeDataset("InputShape",
590 {
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000591 TensorShape{ 5U, 4U, 3U, 2U },
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100592 TensorShape{ 5U, 5U, 3U },
593 TensorShape{ 11U, 13U, 4U, 3U }
594 })
595 {
596 }
597};
598
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000599/** Data set containing tiny tensor shapes for direct convolution. */
600class TinyDirectConvolutionShapes final : public ShapeDataset
601{
602public:
603 TinyDirectConvolutionShapes()
604 : ShapeDataset("InputShape",
605 {
606 // Batch size 1
607 TensorShape{ 11U, 13U, 3U },
608 TensorShape{ 7U, 27U, 3U }
609 })
610 {
611 }
612};
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100613/** Data set containing small tensor shapes for direct convolution. */
614class SmallDirectConvolutionShapes final : public ShapeDataset
615{
616public:
617 SmallDirectConvolutionShapes()
618 : ShapeDataset("InputShape",
619 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100620 // Batch size 1
steniu01f81652d2017-09-11 15:29:12 +0100621 TensorShape{ 35U, 35U, 3U },
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100622 TensorShape{ 32U, 37U, 3U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100623 // Batch size 4
SiCong Licaf8c5e2017-08-21 13:12:52 +0100624 TensorShape{ 32U, 37U, 3U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100625 // Batch size 8
SiCong Licaf8c5e2017-08-21 13:12:52 +0100626 TensorShape{ 32U, 37U, 3U, 8U },
Michalis Spyroud466c2d2018-01-30 10:54:39 +0000627 TensorShape{ 33U, 35U, 8U, 8U }
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100628 })
629 {
630 }
631};
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100632
Xinghang Zhou33ff9ef2018-01-17 11:23:39 +0800633/** Data set containing small tensor shapes for direct convolution. */
634class SmallDirectConvolutionTensorShiftShapes final : public ShapeDataset
635{
636public:
637 SmallDirectConvolutionTensorShiftShapes()
638 : ShapeDataset("InputShape",
639 {
640 // Batch size 1
641 TensorShape{ 35U, 35U, 3U },
642 TensorShape{ 32U, 37U, 3U },
643 // Batch size 4
644 TensorShape{ 32U, 37U, 3U, 4U },
645 // Batch size 8
646 TensorShape{ 32U, 37U, 3U, 8U },
647 TensorShape{ 33U, 35U, 3U, 8U },
648 // Arbitrary batch size
649 TensorShape{ 32U, 37U, 3U, 8U }
650 })
651 {
652 }
653};
654
Giorgio Arena0f170392018-07-18 16:13:12 +0100655/** Data set containing small grouped im2col tensor shapes. */
656class GroupedIm2ColSmallShapes final : public ShapeDataset
657{
658public:
659 GroupedIm2ColSmallShapes()
660 : ShapeDataset("Shape",
661 {
662 TensorShape{ 11U, 11U, 48U },
663 TensorShape{ 27U, 13U, 24U },
664 TensorShape{ 128U, 64U, 12U, 3U },
665 TensorShape{ 11U, 11U, 48U, 4U },
666 TensorShape{ 27U, 13U, 24U, 4U },
667 TensorShape{ 11U, 11U, 48U, 5U }
668 })
669 {
670 }
671};
672
673/** Data set containing large grouped im2col tensor shapes. */
674class GroupedIm2ColLargeShapes final : public ShapeDataset
675{
676public:
677 GroupedIm2ColLargeShapes()
678 : ShapeDataset("Shape",
679 {
Georgios Pinitas2a518182018-08-13 15:53:31 +0100680 TensorShape{ 153U, 231U, 12U },
681 TensorShape{ 123U, 191U, 12U, 2U },
Giorgio Arena0f170392018-07-18 16:13:12 +0100682 })
683 {
684 }
685};
686
Giorgio Arenac6aa49b2018-08-07 11:53:30 +0100687/** Data set containing small grouped weights tensor shapes. */
688class GroupedWeightsSmallShapes final : public ShapeDataset
689{
690public:
691 GroupedWeightsSmallShapes()
692 : ShapeDataset("Shape",
693 {
694 TensorShape{ 3U, 3U, 48U, 120U },
695 TensorShape{ 1U, 3U, 24U, 240U },
696 TensorShape{ 3U, 1U, 12U, 480U },
697 TensorShape{ 5U, 5U, 48U, 120U },
698 TensorShape{ 1U, 5U, 24U, 240U },
699 TensorShape{ 5U, 1U, 48U, 480U }
700 })
701 {
702 }
703};
704
705/** Data set containing large grouped weights tensor shapes. */
706class GroupedWeightsLargeShapes final : public ShapeDataset
707{
708public:
709 GroupedWeightsLargeShapes()
710 : ShapeDataset("Shape",
711 {
712 TensorShape{ 9U, 9U, 96U, 240U },
713 TensorShape{ 7U, 9U, 48U, 480U },
714 TensorShape{ 9U, 7U, 24U, 960U },
715 TensorShape{ 13U, 13U, 96U, 240U },
716 TensorShape{ 11U, 13U, 48U, 480U },
717 TensorShape{ 13U, 11U, 24U, 960U }
718 })
719 {
720 }
721};
722
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000723/** Data set containing 2D tensor shapes for DepthConcatenateLayer. */
724class DepthConcatenateLayerShapes final : public ShapeDataset
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100725{
726public:
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000727 DepthConcatenateLayerShapes()
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100728 : ShapeDataset("Shape",
729 {
730 TensorShape{ 322U, 243U },
731 TensorShape{ 463U, 879U },
732 TensorShape{ 416U, 651U }
733 })
734 {
735 }
736};
737
Michalis Spyrou55b3d122018-05-09 09:59:23 +0100738/** Data set containing tensor shapes for WidthConcatenateLayer. */
739class WidthConcatenateLayerShapes final : public ShapeDataset
740{
741public:
742 WidthConcatenateLayerShapes()
743 : ShapeDataset("Shape",
744 {
745 TensorShape{ 232U, 65U, 3U },
746 TensorShape{ 432U, 65U, 3U },
Michele Di Giorgioe6dbde02018-10-19 15:46:19 +0100747 TensorShape{ 124U, 65U, 3U },
748 TensorShape{ 124U, 65U, 3U, 4U }
Michalis Spyrou55b3d122018-05-09 09:59:23 +0100749 })
750 {
751 }
752};
753
Gian Marco Iodicebf179552017-09-05 13:51:21 +0100754/** Data set containing global pooling tensor shapes. */
755class GlobalPoolingShapes final : public ShapeDataset
756{
757public:
758 GlobalPoolingShapes()
759 : ShapeDataset("Shape",
760 {
761 // Batch size 1
762 TensorShape{ 9U, 9U },
763 TensorShape{ 13U, 13U, 2U },
764 TensorShape{ 27U, 27U, 1U, 3U },
765 // Batch size 4
766 TensorShape{ 31U, 31U, 3U, 4U },
767 TensorShape{ 34U, 34U, 2U, 4U }
768 })
769 {
770 }
771};
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000772/** Data set containing tiny softmax layer shapes. */
773class SoftmaxLayerTinyShapes final : public ShapeDataset
774{
775public:
776 SoftmaxLayerTinyShapes()
777 : ShapeDataset("Shape",
778 {
779 TensorShape{ 9U, 9U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100780 TensorShape{ 128U, 10U },
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000781 })
782 {
783 }
784};
Gian Marco Iodicebf179552017-09-05 13:51:21 +0100785
Chunosovd6afedc2017-11-06 22:09:45 +0700786/** Data set containing small softmax layer shapes. */
787class SoftmaxLayerSmallShapes final : public ShapeDataset
788{
789public:
790 SoftmaxLayerSmallShapes()
791 : ShapeDataset("Shape",
792 {
793 TensorShape{ 9U, 9U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100794 TensorShape{ 256U, 10U },
795 TensorShape{ 353U, 8U },
796 TensorShape{ 781U, 5U },
Chunosovd6afedc2017-11-06 22:09:45 +0700797 })
798 {
799 }
800};
801
802/** Data set containing large softmax layer shapes. */
803class SoftmaxLayerLargeShapes final : public ShapeDataset
804{
805public:
806 SoftmaxLayerLargeShapes()
807 : ShapeDataset("Shape",
808 {
809 TensorShape{ 1000U, 10U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100810 TensorShape{ 3989U, 10U },
Chunosovd6afedc2017-11-06 22:09:45 +0700811 TensorShape{ 7339U, 11U },
Giuseppe Rossini87e896a2018-08-24 10:24:12 +0100812
813 })
814 {
815 }
816};
817
818/** Data set containing large and small softmax layer 4D shapes. */
819class SoftmaxLayer4DShapes final : public ShapeDataset
820{
821public:
822 SoftmaxLayer4DShapes()
823 : ShapeDataset("Shape",
824 {
825 TensorShape{ 9U, 9U, 9U, 9U },
826 TensorShape{ 256U, 10U, 1U, 9U },
827 TensorShape{ 353U, 8U, 2U },
828 TensorShape{ 781U, 5U, 2U, 2U },
829 TensorShape{ 781U, 11U, 1U, 2U },
Chunosovd6afedc2017-11-06 22:09:45 +0700830 })
831 {
832 }
833};
834
Ioan-Cristian Szabo2c350182017-12-20 16:27:37 +0000835/** Data set containing 2D tensor shapes relative to an image size. */
836class SmallImageShapes final : public ShapeDataset
837{
838public:
839 SmallImageShapes()
840 : ShapeDataset("Shape",
841 {
842 TensorShape{ 640U, 480U },
843 TensorShape{ 800U, 600U },
844 TensorShape{ 1200U, 800U }
845 })
846 {
847 }
848};
849
850/** Data set containing 2D tensor shapes relative to an image size. */
851class LargeImageShapes final : public ShapeDataset
852{
853public:
854 LargeImageShapes()
855 : ShapeDataset("Shape",
856 {
857 TensorShape{ 1920U, 1080U },
858 TensorShape{ 2560U, 1536U },
859 TensorShape{ 3584U, 2048U }
860 })
861 {
862 }
863};
Giorgio Arena73023022018-09-04 14:55:55 +0100864
865/** Data set containing small YOLO tensor shapes. */
866class SmallYOLOShapes final : public ShapeDataset
867{
868public:
869 SmallYOLOShapes()
870 : ShapeDataset("Shape",
871 {
872 // Batch size 1
873 TensorShape{ 11U, 11U, 270U },
874 TensorShape{ 27U, 13U, 90U },
Gian Marco Iodice8e1f3c02018-09-13 15:56:47 +0100875 TensorShape{ 13U, 12U, 45U, 2U },
Giorgio Arena73023022018-09-04 14:55:55 +0100876 })
877 {
878 }
879};
880
881/** Data set containing large YOLO tensor shapes. */
882class LargeYOLOShapes final : public ShapeDataset
883{
884public:
885 LargeYOLOShapes()
886 : ShapeDataset("Shape",
887 {
888 TensorShape{ 24U, 23U, 270U },
889 TensorShape{ 51U, 63U, 90U, 2U },
890 TensorShape{ 76U, 91U, 45U, 3U }
891 })
892 {
893 }
894};
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100895} // namespace datasets
896} // namespace test
897} // namespace arm_compute
898#endif /* __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ */