blob: 629c47d54cfc428cc18f148d73a841ae5f07f18e [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 },
Pablo Tello54303692018-11-22 16:14:36 +0000121 TensorShape{ 2U, 5U, 4U },
122
Georgios Pinitas02ee4292018-02-15 17:22:36 +0000123 TensorShape{ 7U, 7U, 5U },
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100124 TensorShape{ 27U, 13U, 37U },
125 TensorShape{ 128U, 64U, 21U }
126 })
127 {
128 }
129};
130
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000131/** Data set containing tiny 4D tensor shapes. */
132class Tiny4DShapes final : public ShapeDataset
133{
134public:
135 Tiny4DShapes()
136 : ShapeDataset("Shape",
137 {
138 TensorShape{ 7U, 7U, 5U, 3U },
139 TensorShape{ 17U, 13U, 7U, 2U },
140 })
141 {
142 }
143};
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100144/** Data set containing small 4D tensor shapes. */
145class Small4DShapes final : public ShapeDataset
146{
147public:
148 Small4DShapes()
149 : ShapeDataset("Shape",
150 {
Georgios Pinitas02ee4292018-02-15 17:22:36 +0000151 TensorShape{ 1U, 7U, 1U, 3U },
152 TensorShape{ 7U, 7U, 5U, 3U },
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100153 TensorShape{ 27U, 13U, 37U, 2U },
154 TensorShape{ 128U, 64U, 21U, 3U }
155 })
156 {
157 }
158};
159
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100160/** Data set containing small tensor shapes. */
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000161class TinyShapes final : public ShapeDataset
162{
163public:
164 TinyShapes()
165 : ShapeDataset("Shape",
166 {
167 // Batch size 1
168 TensorShape{ 9U, 9U },
169 TensorShape{ 27U, 13U, 2U },
170 })
171 {
172 }
173};
174/** Data set containing small tensor shapes. */
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100175class SmallShapes final : public ShapeDataset
176{
177public:
178 SmallShapes()
179 : ShapeDataset("Shape",
180 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100181 // Batch size 1
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100182 TensorShape{ 11U, 11U },
Georgios Pinitas64f1a902018-09-18 13:42:51 +0100183 TensorShape{ 27U, 13U, 7U },
184 TensorShape{ 31U, 27U, 17U, 2U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100185 // Batch size 4
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100186 TensorShape{ 11U, 11U, 3U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100187 TensorShape{ 27U, 13U, 2U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100188 // Arbitrary batch size
Gian Marco Iodice215b4ea2018-06-28 16:29:29 +0100189 TensorShape{ 11U, 11U, 3U, 5U }
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100190 })
191 {
192 }
193};
194
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000195/** Data set containing pairs of small tensor shapes that are broadcast compatible. */
196class SmallShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
197{
198public:
199 SmallShapesBroadcast()
200 : ZipDataset<ShapeDataset, ShapeDataset>(
201 ShapeDataset("Shape0",
202 {
203 TensorShape{ 9U, 9U },
204 TensorShape{ 27U, 13U, 2U },
205 TensorShape{ 128U, 1U, 5U, 3U },
206 TensorShape{ 9U, 9U, 3U, 4U },
207 TensorShape{ 27U, 13U, 2U, 4U },
208 TensorShape{ 1U, 1U, 1U, 5U }
209 }),
210 ShapeDataset("Shape1",
211 {
212 TensorShape{ 9U, 1U, 2U },
213 TensorShape{ 1U, 13U, 2U },
214 TensorShape{ 128U, 64U, 1U, 3U },
215 TensorShape{ 9U, 1U, 3U },
216 TensorShape{ 1U },
217 TensorShape{ 9U, 9U, 3U, 5U }
218 }))
219 {
220 }
221};
222
steniu01f81652d2017-09-11 15:29:12 +0100223/** Data set containing medium tensor shapes. */
224class MediumShapes final : public ShapeDataset
225{
226public:
227 MediumShapes()
228 : ShapeDataset("Shape",
229 {
230 // Batch size 1
231 TensorShape{ 37U, 37U },
232 TensorShape{ 27U, 33U, 2U },
233 TensorShape{ 128U, 64U, 1U, 3U },
234 // Batch size 4
235 TensorShape{ 37U, 37U, 3U, 4U },
236 TensorShape{ 27U, 33U, 2U, 4U },
237 // Arbitrary batch size
238 TensorShape{ 37U, 37U, 3U, 5U }
239 })
240 {
241 }
242};
243
Gian Marco37908d92017-11-07 14:38:22 +0000244/** Data set containing medium 2D tensor shapes. */
245class Medium2DShapes final : public ShapeDataset
246{
247public:
248 Medium2DShapes()
249 : ShapeDataset("Shape",
250 {
251 TensorShape{ 42U, 37U },
252 TensorShape{ 57U, 60U },
253 TensorShape{ 128U, 64U },
Gian Marco Iodice2abb2162018-04-11 10:49:04 +0100254 TensorShape{ 83U, 72U },
255 TensorShape{ 40U, 40U }
Gian Marco37908d92017-11-07 14:38:22 +0000256 })
257 {
258 }
259};
260
Gian Marco Iodice7e4b2392018-02-22 16:17:20 +0000261/** Data set containing medium 3D tensor shapes. */
262class Medium3DShapes final : public ShapeDataset
263{
264public:
265 Medium3DShapes()
266 : ShapeDataset("Shape",
267 {
268 TensorShape{ 42U, 37U, 8U },
269 TensorShape{ 57U, 60U, 13U },
270 TensorShape{ 128U, 64U, 21U },
271 TensorShape{ 83U, 72U, 14U }
272 })
273 {
274 }
275};
276
277/** Data set containing medium 4D tensor shapes. */
278class Medium4DShapes final : public ShapeDataset
279{
280public:
281 Medium4DShapes()
282 : ShapeDataset("Shape",
283 {
284 TensorShape{ 42U, 37U, 8U, 15U },
285 TensorShape{ 57U, 60U, 13U, 8U },
286 TensorShape{ 128U, 64U, 21U, 13U },
287 TensorShape{ 83U, 72U, 14U, 5U }
288 })
289 {
290 }
291};
292
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100293/** Data set containing large tensor shapes. */
294class LargeShapes final : public ShapeDataset
295{
296public:
297 LargeShapes()
298 : ShapeDataset("Shape",
299 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100300 // Batch size 1
Gian Marco7f0f7902017-12-07 09:26:56 +0000301 TensorShape{ 1921U, 1083U },
302 TensorShape{ 641U, 485U, 2U, 3U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100303 // Batch size 4
Gian Marco7f0f7902017-12-07 09:26:56 +0000304 TensorShape{ 799U, 595U, 1U, 4U },
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100305 })
306 {
307 }
308};
309
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000310/** Data set containing pairs of large tensor shapes that are broadcast compatible. */
311class LargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
312{
313public:
314 LargeShapesBroadcast()
315 : ZipDataset<ShapeDataset, ShapeDataset>(
316 ShapeDataset("Shape0",
317 {
318 TensorShape{ 1921U, 541U },
319 TensorShape{ 1U, 485U, 2U, 3U },
320 TensorShape{ 4159U, 1U },
321 TensorShape{ 799U }
322 }),
323 ShapeDataset("Shape1",
324 {
325 TensorShape{ 1921U, 1U, 2U },
326 TensorShape{ 641U, 1U, 2U, 3U },
327 TensorShape{ 1U, 127U, 25U },
328 TensorShape{ 799U, 595U, 1U, 4U }
329 }))
330 {
331 }
332};
333
Gian Marco5420b282017-11-29 10:41:38 +0000334/** Data set containing large 1D tensor shapes. */
335class Large1DShapes final : public ShapeDataset
336{
337public:
338 Large1DShapes()
339 : ShapeDataset("Shape",
340 {
341 TensorShape{ 1921U },
342 TensorShape{ 1245U },
343 TensorShape{ 4160U }
344 })
345 {
346 }
347};
348
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100349/** Data set containing large 2D tensor shapes. */
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100350class Large2DShapes final : public ShapeDataset
351{
352public:
353 Large2DShapes()
354 : ShapeDataset("Shape",
355 {
356 TensorShape{ 1920U, 1080U },
Moritz Pflanzer3ce3ff42017-07-21 17:41:02 +0100357 TensorShape{ 1245U, 652U },
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100358 TensorShape{ 4160U, 3120U }
359 })
360 {
361 }
362};
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100363
Gian Marco Iodice06b184a2017-08-29 16:05:25 +0100364/** Data set containing large 3D tensor shapes. */
365class Large3DShapes final : public ShapeDataset
366{
367public:
368 Large3DShapes()
369 : ShapeDataset("Shape",
370 {
371 TensorShape{ 320U, 240U, 3U },
372 TensorShape{ 383U, 653U, 2U },
373 TensorShape{ 721U, 123U, 13U }
374 })
375 {
376 }
377};
378
379/** Data set containing large 4D tensor shapes. */
380class Large4DShapes final : public ShapeDataset
381{
382public:
383 Large4DShapes()
384 : ShapeDataset("Shape",
385 {
386 TensorShape{ 320U, 123U, 3U, 3U },
387 TensorShape{ 383U, 413U, 2U, 3U },
388 TensorShape{ 517U, 123U, 13U, 2U }
389 })
390 {
391 }
392};
393
Gian Marco Iodice247f52c2018-03-22 11:24:56 +0000394/** Data set containing small 3x3 tensor shapes. */
395class Small3x3Shapes final : public ShapeDataset
396{
397public:
398 Small3x3Shapes()
399 : ShapeDataset("Shape",
400 {
401 TensorShape{ 3U, 3U, 7U, 4U },
402 TensorShape{ 3U, 3U, 4U, 13U },
403 TensorShape{ 3U, 3U, 9U, 2U },
404 TensorShape{ 3U, 3U, 3U, 5U },
405 })
406 {
407 }
408};
409
Gian Marco Iodicef1c2bf02018-06-13 14:05:54 +0100410/** Data set containing small 3x1 tensor shapes. */
411class Small3x1Shapes final : public ShapeDataset
412{
413public:
414 Small3x1Shapes()
415 : ShapeDataset("Shape",
416 {
417 TensorShape{ 3U, 1U, 7U, 4U },
418 TensorShape{ 3U, 1U, 4U, 13U },
419 TensorShape{ 3U, 1U, 9U, 2U },
420 TensorShape{ 3U, 1U, 3U, 5U },
421 })
422 {
423 }
424};
425
426/** Data set containing small 1x3 tensor shapes. */
427class Small1x3Shapes final : public ShapeDataset
428{
429public:
430 Small1x3Shapes()
431 : ShapeDataset("Shape",
432 {
433 TensorShape{ 1U, 3U, 7U, 4U },
434 TensorShape{ 1U, 3U, 4U, 13U },
435 TensorShape{ 1U, 3U, 9U, 2U },
436 TensorShape{ 1U, 3U, 3U, 5U },
437 })
438 {
439 }
440};
441
Gian Marco Iodice247f52c2018-03-22 11:24:56 +0000442/** Data set containing large 3x3 tensor shapes. */
443class Large3x3Shapes final : public ShapeDataset
444{
445public:
446 Large3x3Shapes()
447 : ShapeDataset("Shape",
448 {
449 TensorShape{ 3U, 3U, 32U, 64U },
450 TensorShape{ 3U, 3U, 51U, 13U },
451 TensorShape{ 3U, 3U, 53U, 47U },
452 TensorShape{ 3U, 3U, 128U, 384U },
453 })
454 {
455 }
456};
457
Gian Marco Iodicef1c2bf02018-06-13 14:05:54 +0100458/** Data set containing large 3x1 tensor shapes. */
459class Large3x1Shapes final : public ShapeDataset
460{
461public:
462 Large3x1Shapes()
463 : ShapeDataset("Shape",
464 {
465 TensorShape{ 3U, 1U, 32U, 64U },
466 TensorShape{ 3U, 1U, 51U, 13U },
467 TensorShape{ 3U, 1U, 53U, 47U },
468 TensorShape{ 3U, 1U, 128U, 384U },
469 })
470 {
471 }
472};
473
474/** Data set containing large 1x3 tensor shapes. */
475class Large1x3Shapes final : public ShapeDataset
476{
477public:
478 Large1x3Shapes()
479 : ShapeDataset("Shape",
480 {
481 TensorShape{ 1U, 3U, 32U, 64U },
482 TensorShape{ 1U, 3U, 51U, 13U },
483 TensorShape{ 1U, 3U, 53U, 47U },
484 TensorShape{ 1U, 3U, 128U, 384U },
485 })
486 {
487 }
488};
489
Giorgio Arena9373c8b2018-04-11 19:07:17 +0100490/** Data set containing small 5x5 tensor shapes. */
491class Small5x5Shapes final : public ShapeDataset
492{
493public:
494 Small5x5Shapes()
495 : ShapeDataset("Shape",
496 {
497 TensorShape{ 5U, 5U, 7U, 4U },
498 TensorShape{ 5U, 5U, 4U, 13U },
499 TensorShape{ 5U, 5U, 9U, 2U },
500 TensorShape{ 5U, 5U, 3U, 5U },
501 })
502 {
503 }
504};
505
506/** Data set containing large 5x5 tensor shapes. */
507class Large5x5Shapes final : public ShapeDataset
508{
509public:
510 Large5x5Shapes()
511 : ShapeDataset("Shape",
512 {
513 TensorShape{ 5U, 5U, 32U, 64U },
514 TensorShape{ 5U, 5U, 51U, 13U },
515 TensorShape{ 5U, 5U, 53U, 47U },
516 TensorShape{ 5U, 5U, 128U, 384U },
517 })
518 {
519 }
520};
521
Gian Marco Iodice876be2a2018-07-03 12:22:09 +0100522/** Data set containing small 5x1 tensor shapes. */
523class Small5x1Shapes final : public ShapeDataset
524{
525public:
526 Small5x1Shapes()
527 : ShapeDataset("Shape",
528 {
529 TensorShape{ 5U, 1U, 7U, 4U },
530 TensorShape{ 5U, 1U, 4U, 13U },
531 TensorShape{ 5U, 1U, 9U, 2U },
532 TensorShape{ 5U, 1U, 3U, 5U },
533 })
534 {
535 }
536};
537
538/** Data set containing large 5x1 tensor shapes. */
539class Large5x1Shapes final : public ShapeDataset
540{
541public:
542 Large5x1Shapes()
543 : ShapeDataset("Shape",
544 {
545 TensorShape{ 5U, 1U, 32U, 64U },
546 TensorShape{ 5U, 1U, 51U, 13U },
547 TensorShape{ 5U, 1U, 53U, 47U },
548 TensorShape{ 5U, 1U, 128U, 384U },
549 })
550 {
551 }
552};
553
554/** Data set containing small 1x5 tensor shapes. */
555class Small1x5Shapes final : public ShapeDataset
556{
557public:
558 Small1x5Shapes()
559 : ShapeDataset("Shape",
560 {
561 TensorShape{ 1U, 5U, 7U, 4U },
562 TensorShape{ 1U, 5U, 4U, 13U },
563 TensorShape{ 1U, 5U, 9U, 2U },
564 TensorShape{ 1U, 5U, 3U, 5U },
565 })
566 {
567 }
568};
569
570/** Data set containing large 1x5 tensor shapes. */
571class Large1x5Shapes final : public ShapeDataset
572{
573public:
574 Large1x5Shapes()
575 : ShapeDataset("Shape",
576 {
577 TensorShape{ 1U, 5U, 32U, 64U },
578 TensorShape{ 1U, 5U, 51U, 13U },
579 TensorShape{ 1U, 5U, 53U, 47U },
580 TensorShape{ 1U, 5U, 128U, 384U },
581 })
582 {
583 }
584};
585
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100586/** Data set containing small tensor shapes for deconvolution. */
587class SmallDeconvolutionShapes final : public ShapeDataset
588{
589public:
590 SmallDeconvolutionShapes()
591 : ShapeDataset("InputShape",
592 {
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000593 TensorShape{ 5U, 4U, 3U, 2U },
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100594 TensorShape{ 5U, 5U, 3U },
595 TensorShape{ 11U, 13U, 4U, 3U }
596 })
597 {
598 }
599};
600
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000601/** Data set containing tiny tensor shapes for direct convolution. */
602class TinyDirectConvolutionShapes final : public ShapeDataset
603{
604public:
605 TinyDirectConvolutionShapes()
606 : ShapeDataset("InputShape",
607 {
608 // Batch size 1
609 TensorShape{ 11U, 13U, 3U },
610 TensorShape{ 7U, 27U, 3U }
611 })
612 {
613 }
614};
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100615/** Data set containing small tensor shapes for direct convolution. */
616class SmallDirectConvolutionShapes final : public ShapeDataset
617{
618public:
619 SmallDirectConvolutionShapes()
620 : ShapeDataset("InputShape",
621 {
SiCong Licaf8c5e2017-08-21 13:12:52 +0100622 // Batch size 1
steniu01f81652d2017-09-11 15:29:12 +0100623 TensorShape{ 35U, 35U, 3U },
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100624 TensorShape{ 32U, 37U, 3U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100625 // Batch size 4
SiCong Licaf8c5e2017-08-21 13:12:52 +0100626 TensorShape{ 32U, 37U, 3U, 4U },
SiCong Licaf8c5e2017-08-21 13:12:52 +0100627 // Batch size 8
SiCong Licaf8c5e2017-08-21 13:12:52 +0100628 TensorShape{ 32U, 37U, 3U, 8U },
Michalis Spyroud466c2d2018-01-30 10:54:39 +0000629 TensorShape{ 33U, 35U, 8U, 8U }
Moritz Pflanzerb3d25792017-07-26 11:49:37 +0100630 })
631 {
632 }
633};
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100634
Xinghang Zhou33ff9ef2018-01-17 11:23:39 +0800635/** Data set containing small tensor shapes for direct convolution. */
636class SmallDirectConvolutionTensorShiftShapes final : public ShapeDataset
637{
638public:
639 SmallDirectConvolutionTensorShiftShapes()
640 : ShapeDataset("InputShape",
641 {
642 // Batch size 1
643 TensorShape{ 35U, 35U, 3U },
644 TensorShape{ 32U, 37U, 3U },
645 // Batch size 4
646 TensorShape{ 32U, 37U, 3U, 4U },
647 // Batch size 8
648 TensorShape{ 32U, 37U, 3U, 8U },
649 TensorShape{ 33U, 35U, 3U, 8U },
650 // Arbitrary batch size
651 TensorShape{ 32U, 37U, 3U, 8U }
652 })
653 {
654 }
655};
656
Giorgio Arena0f170392018-07-18 16:13:12 +0100657/** Data set containing small grouped im2col tensor shapes. */
658class GroupedIm2ColSmallShapes final : public ShapeDataset
659{
660public:
661 GroupedIm2ColSmallShapes()
662 : ShapeDataset("Shape",
663 {
664 TensorShape{ 11U, 11U, 48U },
665 TensorShape{ 27U, 13U, 24U },
666 TensorShape{ 128U, 64U, 12U, 3U },
667 TensorShape{ 11U, 11U, 48U, 4U },
668 TensorShape{ 27U, 13U, 24U, 4U },
669 TensorShape{ 11U, 11U, 48U, 5U }
670 })
671 {
672 }
673};
674
675/** Data set containing large grouped im2col tensor shapes. */
676class GroupedIm2ColLargeShapes final : public ShapeDataset
677{
678public:
679 GroupedIm2ColLargeShapes()
680 : ShapeDataset("Shape",
681 {
Georgios Pinitas2a518182018-08-13 15:53:31 +0100682 TensorShape{ 153U, 231U, 12U },
683 TensorShape{ 123U, 191U, 12U, 2U },
Giorgio Arena0f170392018-07-18 16:13:12 +0100684 })
685 {
686 }
687};
688
Giorgio Arenac6aa49b2018-08-07 11:53:30 +0100689/** Data set containing small grouped weights tensor shapes. */
690class GroupedWeightsSmallShapes final : public ShapeDataset
691{
692public:
693 GroupedWeightsSmallShapes()
694 : ShapeDataset("Shape",
695 {
696 TensorShape{ 3U, 3U, 48U, 120U },
697 TensorShape{ 1U, 3U, 24U, 240U },
698 TensorShape{ 3U, 1U, 12U, 480U },
699 TensorShape{ 5U, 5U, 48U, 120U },
700 TensorShape{ 1U, 5U, 24U, 240U },
701 TensorShape{ 5U, 1U, 48U, 480U }
702 })
703 {
704 }
705};
706
707/** Data set containing large grouped weights tensor shapes. */
708class GroupedWeightsLargeShapes final : public ShapeDataset
709{
710public:
711 GroupedWeightsLargeShapes()
712 : ShapeDataset("Shape",
713 {
714 TensorShape{ 9U, 9U, 96U, 240U },
715 TensorShape{ 7U, 9U, 48U, 480U },
716 TensorShape{ 9U, 7U, 24U, 960U },
717 TensorShape{ 13U, 13U, 96U, 240U },
718 TensorShape{ 11U, 13U, 48U, 480U },
719 TensorShape{ 13U, 11U, 24U, 960U }
720 })
721 {
722 }
723};
724
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000725/** Data set containing 2D tensor shapes for DepthConcatenateLayer. */
726class DepthConcatenateLayerShapes final : public ShapeDataset
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100727{
728public:
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000729 DepthConcatenateLayerShapes()
Gian Marco Iodiceb2833b82017-09-13 16:23:18 +0100730 : ShapeDataset("Shape",
731 {
732 TensorShape{ 322U, 243U },
733 TensorShape{ 463U, 879U },
734 TensorShape{ 416U, 651U }
735 })
736 {
737 }
738};
739
Michalis Spyrou55b3d122018-05-09 09:59:23 +0100740/** Data set containing tensor shapes for WidthConcatenateLayer. */
741class WidthConcatenateLayerShapes final : public ShapeDataset
742{
743public:
744 WidthConcatenateLayerShapes()
745 : ShapeDataset("Shape",
746 {
747 TensorShape{ 232U, 65U, 3U },
748 TensorShape{ 432U, 65U, 3U },
Michele Di Giorgioe6dbde02018-10-19 15:46:19 +0100749 TensorShape{ 124U, 65U, 3U },
750 TensorShape{ 124U, 65U, 3U, 4U }
Michalis Spyrou55b3d122018-05-09 09:59:23 +0100751 })
752 {
753 }
754};
755
Gian Marco Iodicebf179552017-09-05 13:51:21 +0100756/** Data set containing global pooling tensor shapes. */
757class GlobalPoolingShapes final : public ShapeDataset
758{
759public:
760 GlobalPoolingShapes()
761 : ShapeDataset("Shape",
762 {
763 // Batch size 1
764 TensorShape{ 9U, 9U },
765 TensorShape{ 13U, 13U, 2U },
766 TensorShape{ 27U, 27U, 1U, 3U },
767 // Batch size 4
768 TensorShape{ 31U, 31U, 3U, 4U },
769 TensorShape{ 34U, 34U, 2U, 4U }
770 })
771 {
772 }
773};
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000774/** Data set containing tiny softmax layer shapes. */
775class SoftmaxLayerTinyShapes final : public ShapeDataset
776{
777public:
778 SoftmaxLayerTinyShapes()
779 : ShapeDataset("Shape",
780 {
781 TensorShape{ 9U, 9U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100782 TensorShape{ 128U, 10U },
Anthony Barbier1c0d0ff2018-01-31 13:05:09 +0000783 })
784 {
785 }
786};
Gian Marco Iodicebf179552017-09-05 13:51:21 +0100787
Chunosovd6afedc2017-11-06 22:09:45 +0700788/** Data set containing small softmax layer shapes. */
789class SoftmaxLayerSmallShapes final : public ShapeDataset
790{
791public:
792 SoftmaxLayerSmallShapes()
793 : ShapeDataset("Shape",
794 {
795 TensorShape{ 9U, 9U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100796 TensorShape{ 256U, 10U },
797 TensorShape{ 353U, 8U },
798 TensorShape{ 781U, 5U },
Chunosovd6afedc2017-11-06 22:09:45 +0700799 })
800 {
801 }
802};
803
804/** Data set containing large softmax layer shapes. */
805class SoftmaxLayerLargeShapes final : public ShapeDataset
806{
807public:
808 SoftmaxLayerLargeShapes()
809 : ShapeDataset("Shape",
810 {
811 TensorShape{ 1000U, 10U },
Georgios Pinitas17d6d3c2018-07-02 17:52:40 +0100812 TensorShape{ 3989U, 10U },
Chunosovd6afedc2017-11-06 22:09:45 +0700813 TensorShape{ 7339U, 11U },
Giuseppe Rossini87e896a2018-08-24 10:24:12 +0100814
815 })
816 {
817 }
818};
819
820/** Data set containing large and small softmax layer 4D shapes. */
821class SoftmaxLayer4DShapes final : public ShapeDataset
822{
823public:
824 SoftmaxLayer4DShapes()
825 : ShapeDataset("Shape",
826 {
827 TensorShape{ 9U, 9U, 9U, 9U },
828 TensorShape{ 256U, 10U, 1U, 9U },
829 TensorShape{ 353U, 8U, 2U },
830 TensorShape{ 781U, 5U, 2U, 2U },
831 TensorShape{ 781U, 11U, 1U, 2U },
Chunosovd6afedc2017-11-06 22:09:45 +0700832 })
833 {
834 }
835};
836
Ioan-Cristian Szabo2c350182017-12-20 16:27:37 +0000837/** Data set containing 2D tensor shapes relative to an image size. */
838class SmallImageShapes final : public ShapeDataset
839{
840public:
841 SmallImageShapes()
842 : ShapeDataset("Shape",
843 {
844 TensorShape{ 640U, 480U },
845 TensorShape{ 800U, 600U },
846 TensorShape{ 1200U, 800U }
847 })
848 {
849 }
850};
851
852/** Data set containing 2D tensor shapes relative to an image size. */
853class LargeImageShapes final : public ShapeDataset
854{
855public:
856 LargeImageShapes()
857 : ShapeDataset("Shape",
858 {
859 TensorShape{ 1920U, 1080U },
860 TensorShape{ 2560U, 1536U },
861 TensorShape{ 3584U, 2048U }
862 })
863 {
864 }
865};
Giorgio Arena73023022018-09-04 14:55:55 +0100866
867/** Data set containing small YOLO tensor shapes. */
868class SmallYOLOShapes final : public ShapeDataset
869{
870public:
871 SmallYOLOShapes()
872 : ShapeDataset("Shape",
873 {
874 // Batch size 1
875 TensorShape{ 11U, 11U, 270U },
876 TensorShape{ 27U, 13U, 90U },
Gian Marco Iodice8e1f3c02018-09-13 15:56:47 +0100877 TensorShape{ 13U, 12U, 45U, 2U },
Giorgio Arena73023022018-09-04 14:55:55 +0100878 })
879 {
880 }
881};
882
883/** Data set containing large YOLO tensor shapes. */
884class LargeYOLOShapes final : public ShapeDataset
885{
886public:
887 LargeYOLOShapes()
888 : ShapeDataset("Shape",
889 {
890 TensorShape{ 24U, 23U, 270U },
891 TensorShape{ 51U, 63U, 90U, 2U },
892 TensorShape{ 76U, 91U, 45U, 3U }
893 })
894 {
895 }
896};
Gian Marco Iodice5ba5e092018-12-06 17:13:09 +0000897
898/** Data set containing small tensor shapes to be used with the GEMM reshaping kernel */
899class SmallGEMMReshape2DShapes final : public ShapeDataset
900{
901public:
902 SmallGEMMReshape2DShapes()
903 : ShapeDataset("Shape",
904 {
905 TensorShape{ 63U, 72U },
906 })
907 {
908 }
909};
910
911/** Data set containing small tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */
912class SmallGEMMReshape3DShapes final : public ShapeDataset
913{
914public:
915 SmallGEMMReshape3DShapes()
916 : ShapeDataset("Shape",
917 {
918 TensorShape{ 63U, 9U, 8U },
919 })
920 {
921 }
922};
923
924/** Data set containing large tensor shapes to be used with the GEMM reshaping kernel */
925class LargeGEMMReshape2DShapes final : public ShapeDataset
926{
927public:
928 LargeGEMMReshape2DShapes()
929 : ShapeDataset("Shape",
930 {
931 TensorShape{ 16U, 27U },
932 TensorShape{ 533U, 171U },
933 TensorShape{ 345U, 612U }
934 })
935 {
936 }
937};
938
939/** Data set containing large tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */
940class LargeGEMMReshape3DShapes final : public ShapeDataset
941{
942public:
943 LargeGEMMReshape3DShapes()
944 : ShapeDataset("Shape",
945 {
946 TensorShape{ 16U, 3U, 9U },
947 TensorShape{ 533U, 19U, 9U },
948 TensorShape{ 345U, 34U, 18U }
949 })
950 {
951 }
952};
Moritz Pflanzerf6ad98a2017-07-21 17:19:58 +0100953} // namespace datasets
954} // namespace test
955} // namespace arm_compute
956#endif /* __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ */