Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 1 | /* |
Michalis Spyrou | 8094325 | 2019-01-10 17:19:50 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2019 ARM Limited. |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #ifndef __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ |
| 25 | #define __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ |
| 26 | |
| 27 | #include "arm_compute/core/TensorShape.h" |
Moritz Pflanzer | a09de0c | 2017-09-01 20:41:12 +0100 | [diff] [blame] | 28 | #include "tests/framework/datasets/Datasets.h" |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 29 | |
| 30 | #include <type_traits> |
| 31 | |
| 32 | namespace arm_compute |
| 33 | { |
| 34 | namespace test |
| 35 | { |
| 36 | namespace datasets |
| 37 | { |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 38 | /** Parent type for all for shape datasets. */ |
| 39 | using ShapeDataset = framework::dataset::ContainerDataset<std::vector<TensorShape>>; |
| 40 | |
Michele Di Giorgio | 5daeffd | 2018-11-26 10:01:15 +0000 | [diff] [blame] | 41 | /** Data set containing tiny 1D tensor shapes. */ |
| 42 | class Tiny1DShapes final : public ShapeDataset |
| 43 | { |
| 44 | public: |
| 45 | Tiny1DShapes() |
| 46 | : ShapeDataset("Shape", |
| 47 | { |
| 48 | TensorShape{ 2U }, |
| 49 | TensorShape{ 3U }, |
| 50 | }) |
| 51 | { |
| 52 | } |
| 53 | }; |
| 54 | |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 55 | /** Data set containing small 1D tensor shapes. */ |
| 56 | class Small1DShapes final : public ShapeDataset |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 57 | { |
| 58 | public: |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 59 | Small1DShapes() |
| 60 | : ShapeDataset("Shape", |
| 61 | { |
Giorgio Arena | e3d24ce | 2018-08-24 14:44:08 +0100 | [diff] [blame] | 62 | TensorShape{ 128U }, |
| 63 | TensorShape{ 256U }, |
| 64 | TensorShape{ 512U }, |
| 65 | TensorShape{ 1024U } |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 66 | }) |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 67 | { |
| 68 | } |
| 69 | }; |
| 70 | |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 71 | /** Data set containing tiny 2D tensor shapes. */ |
| 72 | class Tiny2DShapes final : public ShapeDataset |
| 73 | { |
| 74 | public: |
| 75 | Tiny2DShapes() |
| 76 | : ShapeDataset("Shape", |
| 77 | { |
| 78 | TensorShape{ 7U, 7U }, |
| 79 | TensorShape{ 11U, 13U }, |
| 80 | }) |
| 81 | { |
| 82 | } |
| 83 | }; |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 84 | /** Data set containing small 2D tensor shapes. */ |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 85 | class Small2DShapes final : public ShapeDataset |
| 86 | { |
| 87 | public: |
| 88 | Small2DShapes() |
| 89 | : ShapeDataset("Shape", |
| 90 | { |
Moritz Pflanzer | 3ce3ff4 | 2017-07-21 17:41:02 +0100 | [diff] [blame] | 91 | TensorShape{ 7U, 7U }, |
| 92 | TensorShape{ 27U, 13U }, |
| 93 | TensorShape{ 128U, 64U } |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 94 | }) |
| 95 | { |
| 96 | } |
| 97 | }; |
| 98 | |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 99 | /** Data set containing tiny 3D tensor shapes. */ |
| 100 | class Tiny3DShapes final : public ShapeDataset |
| 101 | { |
| 102 | public: |
| 103 | Tiny3DShapes() |
| 104 | : ShapeDataset("Shape", |
| 105 | { |
| 106 | TensorShape{ 7U, 7U, 5U }, |
| 107 | TensorShape{ 23U, 13U, 9U }, |
| 108 | }) |
| 109 | { |
| 110 | } |
| 111 | }; |
| 112 | |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 113 | /** Data set containing small 3D tensor shapes. */ |
| 114 | class Small3DShapes final : public ShapeDataset |
| 115 | { |
| 116 | public: |
| 117 | Small3DShapes() |
| 118 | : ShapeDataset("Shape", |
| 119 | { |
Georgios Pinitas | 02ee429 | 2018-02-15 17:22:36 +0000 | [diff] [blame] | 120 | TensorShape{ 1U, 7U, 7U }, |
Pablo Tello | 5430369 | 2018-11-22 16:14:36 +0000 | [diff] [blame] | 121 | TensorShape{ 2U, 5U, 4U }, |
| 122 | |
Georgios Pinitas | 02ee429 | 2018-02-15 17:22:36 +0000 | [diff] [blame] | 123 | TensorShape{ 7U, 7U, 5U }, |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 124 | TensorShape{ 27U, 13U, 37U }, |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 125 | }) |
| 126 | { |
| 127 | } |
| 128 | }; |
| 129 | |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 130 | /** Data set containing tiny 4D tensor shapes. */ |
| 131 | class Tiny4DShapes final : public ShapeDataset |
| 132 | { |
| 133 | public: |
| 134 | Tiny4DShapes() |
| 135 | : ShapeDataset("Shape", |
| 136 | { |
| 137 | TensorShape{ 7U, 7U, 5U, 3U }, |
| 138 | TensorShape{ 17U, 13U, 7U, 2U }, |
| 139 | }) |
| 140 | { |
| 141 | } |
| 142 | }; |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 143 | /** Data set containing small 4D tensor shapes. */ |
| 144 | class Small4DShapes final : public ShapeDataset |
| 145 | { |
| 146 | public: |
| 147 | Small4DShapes() |
| 148 | : ShapeDataset("Shape", |
| 149 | { |
Manuel Bottini | 1d4f385 | 2019-01-14 15:14:43 +0000 | [diff] [blame] | 150 | TensorShape{ 2U, 7U, 1U, 3U }, |
Georgios Pinitas | 02ee429 | 2018-02-15 17:22:36 +0000 | [diff] [blame] | 151 | TensorShape{ 7U, 7U, 5U, 3U }, |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 152 | TensorShape{ 27U, 13U, 37U, 2U }, |
| 153 | TensorShape{ 128U, 64U, 21U, 3U } |
| 154 | }) |
| 155 | { |
| 156 | } |
| 157 | }; |
| 158 | |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 159 | /** Data set containing small tensor shapes. */ |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 160 | class TinyShapes final : public ShapeDataset |
| 161 | { |
| 162 | public: |
| 163 | TinyShapes() |
| 164 | : ShapeDataset("Shape", |
| 165 | { |
| 166 | // Batch size 1 |
| 167 | TensorShape{ 9U, 9U }, |
| 168 | TensorShape{ 27U, 13U, 2U }, |
| 169 | }) |
| 170 | { |
| 171 | } |
| 172 | }; |
| 173 | /** Data set containing small tensor shapes. */ |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 174 | class SmallShapes final : public ShapeDataset |
| 175 | { |
| 176 | public: |
| 177 | SmallShapes() |
| 178 | : ShapeDataset("Shape", |
| 179 | { |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 180 | // Batch size 1 |
Gian Marco Iodice | 215b4ea | 2018-06-28 16:29:29 +0100 | [diff] [blame] | 181 | TensorShape{ 11U, 11U }, |
Georgios Pinitas | 64f1a90 | 2018-09-18 13:42:51 +0100 | [diff] [blame] | 182 | TensorShape{ 27U, 13U, 7U }, |
| 183 | TensorShape{ 31U, 27U, 17U, 2U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 184 | // Batch size 4 |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 185 | TensorShape{ 27U, 13U, 2U, 4U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 186 | // Arbitrary batch size |
Gian Marco Iodice | 215b4ea | 2018-06-28 16:29:29 +0100 | [diff] [blame] | 187 | TensorShape{ 11U, 11U, 3U, 5U } |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 188 | }) |
| 189 | { |
| 190 | } |
| 191 | }; |
| 192 | |
Diego Lopez Recas | 0021d75 | 2017-12-18 14:42:56 +0000 | [diff] [blame] | 193 | /** Data set containing pairs of small tensor shapes that are broadcast compatible. */ |
| 194 | class SmallShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset> |
| 195 | { |
| 196 | public: |
| 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 | |
steniu01 | f81652d | 2017-09-11 15:29:12 +0100 | [diff] [blame] | 221 | /** Data set containing medium tensor shapes. */ |
| 222 | class MediumShapes final : public ShapeDataset |
| 223 | { |
| 224 | public: |
| 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 }, |
steniu01 | f81652d | 2017-09-11 15:29:12 +0100 | [diff] [blame] | 234 | // Arbitrary batch size |
| 235 | TensorShape{ 37U, 37U, 3U, 5U } |
| 236 | }) |
| 237 | { |
| 238 | } |
| 239 | }; |
| 240 | |
Gian Marco | 37908d9 | 2017-11-07 14:38:22 +0000 | [diff] [blame] | 241 | /** Data set containing medium 2D tensor shapes. */ |
| 242 | class Medium2DShapes final : public ShapeDataset |
| 243 | { |
| 244 | public: |
| 245 | Medium2DShapes() |
| 246 | : ShapeDataset("Shape", |
| 247 | { |
| 248 | TensorShape{ 42U, 37U }, |
| 249 | TensorShape{ 57U, 60U }, |
| 250 | TensorShape{ 128U, 64U }, |
Gian Marco Iodice | 2abb216 | 2018-04-11 10:49:04 +0100 | [diff] [blame] | 251 | TensorShape{ 83U, 72U }, |
| 252 | TensorShape{ 40U, 40U } |
Gian Marco | 37908d9 | 2017-11-07 14:38:22 +0000 | [diff] [blame] | 253 | }) |
| 254 | { |
| 255 | } |
| 256 | }; |
| 257 | |
Gian Marco Iodice | 7e4b239 | 2018-02-22 16:17:20 +0000 | [diff] [blame] | 258 | /** Data set containing medium 3D tensor shapes. */ |
| 259 | class Medium3DShapes final : public ShapeDataset |
| 260 | { |
| 261 | public: |
| 262 | Medium3DShapes() |
| 263 | : ShapeDataset("Shape", |
| 264 | { |
| 265 | TensorShape{ 42U, 37U, 8U }, |
| 266 | TensorShape{ 57U, 60U, 13U }, |
| 267 | TensorShape{ 128U, 64U, 21U }, |
| 268 | TensorShape{ 83U, 72U, 14U } |
| 269 | }) |
| 270 | { |
| 271 | } |
| 272 | }; |
| 273 | |
| 274 | /** Data set containing medium 4D tensor shapes. */ |
| 275 | class Medium4DShapes final : public ShapeDataset |
| 276 | { |
| 277 | public: |
| 278 | Medium4DShapes() |
| 279 | : ShapeDataset("Shape", |
| 280 | { |
| 281 | TensorShape{ 42U, 37U, 8U, 15U }, |
| 282 | TensorShape{ 57U, 60U, 13U, 8U }, |
| 283 | TensorShape{ 128U, 64U, 21U, 13U }, |
| 284 | TensorShape{ 83U, 72U, 14U, 5U } |
| 285 | }) |
| 286 | { |
| 287 | } |
| 288 | }; |
| 289 | |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 290 | /** Data set containing large tensor shapes. */ |
| 291 | class LargeShapes final : public ShapeDataset |
| 292 | { |
| 293 | public: |
| 294 | LargeShapes() |
| 295 | : ShapeDataset("Shape", |
| 296 | { |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 297 | // Batch size 1 |
Gian Marco | 7f0f790 | 2017-12-07 09:26:56 +0000 | [diff] [blame] | 298 | TensorShape{ 1921U, 1083U }, |
| 299 | TensorShape{ 641U, 485U, 2U, 3U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 300 | // Batch size 4 |
Gian Marco | 7f0f790 | 2017-12-07 09:26:56 +0000 | [diff] [blame] | 301 | TensorShape{ 799U, 595U, 1U, 4U }, |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 302 | }) |
| 303 | { |
| 304 | } |
| 305 | }; |
| 306 | |
Diego Lopez Recas | 0021d75 | 2017-12-18 14:42:56 +0000 | [diff] [blame] | 307 | /** Data set containing pairs of large tensor shapes that are broadcast compatible. */ |
| 308 | class LargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset> |
| 309 | { |
| 310 | public: |
| 311 | LargeShapesBroadcast() |
| 312 | : ZipDataset<ShapeDataset, ShapeDataset>( |
| 313 | ShapeDataset("Shape0", |
| 314 | { |
| 315 | TensorShape{ 1921U, 541U }, |
| 316 | TensorShape{ 1U, 485U, 2U, 3U }, |
| 317 | TensorShape{ 4159U, 1U }, |
| 318 | TensorShape{ 799U } |
| 319 | }), |
| 320 | ShapeDataset("Shape1", |
| 321 | { |
| 322 | TensorShape{ 1921U, 1U, 2U }, |
| 323 | TensorShape{ 641U, 1U, 2U, 3U }, |
| 324 | TensorShape{ 1U, 127U, 25U }, |
| 325 | TensorShape{ 799U, 595U, 1U, 4U } |
| 326 | })) |
| 327 | { |
| 328 | } |
| 329 | }; |
| 330 | |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 331 | /** Data set containing large 1D tensor shapes. */ |
| 332 | class Large1DShapes final : public ShapeDataset |
| 333 | { |
| 334 | public: |
| 335 | Large1DShapes() |
| 336 | : ShapeDataset("Shape", |
| 337 | { |
| 338 | TensorShape{ 1921U }, |
| 339 | TensorShape{ 1245U }, |
| 340 | TensorShape{ 4160U } |
| 341 | }) |
| 342 | { |
| 343 | } |
| 344 | }; |
| 345 | |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 346 | /** Data set containing large 2D tensor shapes. */ |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 347 | class Large2DShapes final : public ShapeDataset |
| 348 | { |
| 349 | public: |
| 350 | Large2DShapes() |
| 351 | : ShapeDataset("Shape", |
| 352 | { |
| 353 | TensorShape{ 1920U, 1080U }, |
Moritz Pflanzer | 3ce3ff4 | 2017-07-21 17:41:02 +0100 | [diff] [blame] | 354 | TensorShape{ 1245U, 652U }, |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 355 | TensorShape{ 4160U, 3120U } |
| 356 | }) |
| 357 | { |
| 358 | } |
| 359 | }; |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 360 | |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 361 | /** Data set containing large 3D tensor shapes. */ |
| 362 | class Large3DShapes final : public ShapeDataset |
| 363 | { |
| 364 | public: |
| 365 | Large3DShapes() |
| 366 | : ShapeDataset("Shape", |
| 367 | { |
| 368 | TensorShape{ 320U, 240U, 3U }, |
| 369 | TensorShape{ 383U, 653U, 2U }, |
| 370 | TensorShape{ 721U, 123U, 13U } |
| 371 | }) |
| 372 | { |
| 373 | } |
| 374 | }; |
| 375 | |
| 376 | /** Data set containing large 4D tensor shapes. */ |
| 377 | class Large4DShapes final : public ShapeDataset |
| 378 | { |
| 379 | public: |
| 380 | Large4DShapes() |
| 381 | : ShapeDataset("Shape", |
| 382 | { |
| 383 | TensorShape{ 320U, 123U, 3U, 3U }, |
| 384 | TensorShape{ 383U, 413U, 2U, 3U }, |
| 385 | TensorShape{ 517U, 123U, 13U, 2U } |
| 386 | }) |
| 387 | { |
| 388 | } |
| 389 | }; |
| 390 | |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 391 | /** Data set containing small 3x3 tensor shapes. */ |
| 392 | class Small3x3Shapes final : public ShapeDataset |
| 393 | { |
| 394 | public: |
| 395 | Small3x3Shapes() |
| 396 | : ShapeDataset("Shape", |
| 397 | { |
| 398 | TensorShape{ 3U, 3U, 7U, 4U }, |
| 399 | TensorShape{ 3U, 3U, 4U, 13U }, |
| 400 | TensorShape{ 3U, 3U, 9U, 2U }, |
| 401 | TensorShape{ 3U, 3U, 3U, 5U }, |
| 402 | }) |
| 403 | { |
| 404 | } |
| 405 | }; |
| 406 | |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 407 | /** Data set containing small 3x1 tensor shapes. */ |
| 408 | class Small3x1Shapes final : public ShapeDataset |
| 409 | { |
| 410 | public: |
| 411 | Small3x1Shapes() |
| 412 | : ShapeDataset("Shape", |
| 413 | { |
| 414 | TensorShape{ 3U, 1U, 7U, 4U }, |
| 415 | TensorShape{ 3U, 1U, 4U, 13U }, |
| 416 | TensorShape{ 3U, 1U, 9U, 2U }, |
| 417 | TensorShape{ 3U, 1U, 3U, 5U }, |
| 418 | }) |
| 419 | { |
| 420 | } |
| 421 | }; |
| 422 | |
| 423 | /** Data set containing small 1x3 tensor shapes. */ |
| 424 | class Small1x3Shapes final : public ShapeDataset |
| 425 | { |
| 426 | public: |
| 427 | Small1x3Shapes() |
| 428 | : ShapeDataset("Shape", |
| 429 | { |
| 430 | TensorShape{ 1U, 3U, 7U, 4U }, |
| 431 | TensorShape{ 1U, 3U, 4U, 13U }, |
| 432 | TensorShape{ 1U, 3U, 9U, 2U }, |
| 433 | TensorShape{ 1U, 3U, 3U, 5U }, |
| 434 | }) |
| 435 | { |
| 436 | } |
| 437 | }; |
| 438 | |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 439 | /** Data set containing large 3x3 tensor shapes. */ |
| 440 | class Large3x3Shapes final : public ShapeDataset |
| 441 | { |
| 442 | public: |
| 443 | Large3x3Shapes() |
| 444 | : ShapeDataset("Shape", |
| 445 | { |
| 446 | TensorShape{ 3U, 3U, 32U, 64U }, |
| 447 | TensorShape{ 3U, 3U, 51U, 13U }, |
| 448 | TensorShape{ 3U, 3U, 53U, 47U }, |
| 449 | TensorShape{ 3U, 3U, 128U, 384U }, |
| 450 | }) |
| 451 | { |
| 452 | } |
| 453 | }; |
| 454 | |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 455 | /** Data set containing large 3x1 tensor shapes. */ |
| 456 | class Large3x1Shapes final : public ShapeDataset |
| 457 | { |
| 458 | public: |
| 459 | Large3x1Shapes() |
| 460 | : ShapeDataset("Shape", |
| 461 | { |
| 462 | TensorShape{ 3U, 1U, 32U, 64U }, |
| 463 | TensorShape{ 3U, 1U, 51U, 13U }, |
| 464 | TensorShape{ 3U, 1U, 53U, 47U }, |
| 465 | TensorShape{ 3U, 1U, 128U, 384U }, |
| 466 | }) |
| 467 | { |
| 468 | } |
| 469 | }; |
| 470 | |
| 471 | /** Data set containing large 1x3 tensor shapes. */ |
| 472 | class Large1x3Shapes final : public ShapeDataset |
| 473 | { |
| 474 | public: |
| 475 | Large1x3Shapes() |
| 476 | : ShapeDataset("Shape", |
| 477 | { |
| 478 | TensorShape{ 1U, 3U, 32U, 64U }, |
| 479 | TensorShape{ 1U, 3U, 51U, 13U }, |
| 480 | TensorShape{ 1U, 3U, 53U, 47U }, |
| 481 | TensorShape{ 1U, 3U, 128U, 384U }, |
| 482 | }) |
| 483 | { |
| 484 | } |
| 485 | }; |
| 486 | |
Giorgio Arena | 9373c8b | 2018-04-11 19:07:17 +0100 | [diff] [blame] | 487 | /** Data set containing small 5x5 tensor shapes. */ |
| 488 | class Small5x5Shapes final : public ShapeDataset |
| 489 | { |
| 490 | public: |
| 491 | Small5x5Shapes() |
| 492 | : ShapeDataset("Shape", |
| 493 | { |
| 494 | TensorShape{ 5U, 5U, 7U, 4U }, |
| 495 | TensorShape{ 5U, 5U, 4U, 13U }, |
| 496 | TensorShape{ 5U, 5U, 9U, 2U }, |
| 497 | TensorShape{ 5U, 5U, 3U, 5U }, |
| 498 | }) |
| 499 | { |
| 500 | } |
| 501 | }; |
| 502 | |
| 503 | /** Data set containing large 5x5 tensor shapes. */ |
| 504 | class Large5x5Shapes final : public ShapeDataset |
| 505 | { |
| 506 | public: |
| 507 | Large5x5Shapes() |
| 508 | : ShapeDataset("Shape", |
| 509 | { |
| 510 | TensorShape{ 5U, 5U, 32U, 64U }, |
| 511 | TensorShape{ 5U, 5U, 51U, 13U }, |
| 512 | TensorShape{ 5U, 5U, 53U, 47U }, |
| 513 | TensorShape{ 5U, 5U, 128U, 384U }, |
| 514 | }) |
| 515 | { |
| 516 | } |
| 517 | }; |
| 518 | |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 519 | /** Data set containing small 5x1 tensor shapes. */ |
| 520 | class Small5x1Shapes final : public ShapeDataset |
| 521 | { |
| 522 | public: |
| 523 | Small5x1Shapes() |
| 524 | : ShapeDataset("Shape", |
| 525 | { |
| 526 | TensorShape{ 5U, 1U, 7U, 4U }, |
| 527 | TensorShape{ 5U, 1U, 4U, 13U }, |
| 528 | TensorShape{ 5U, 1U, 9U, 2U }, |
| 529 | TensorShape{ 5U, 1U, 3U, 5U }, |
| 530 | }) |
| 531 | { |
| 532 | } |
| 533 | }; |
| 534 | |
| 535 | /** Data set containing large 5x1 tensor shapes. */ |
| 536 | class Large5x1Shapes final : public ShapeDataset |
| 537 | { |
| 538 | public: |
| 539 | Large5x1Shapes() |
| 540 | : ShapeDataset("Shape", |
| 541 | { |
| 542 | TensorShape{ 5U, 1U, 32U, 64U }, |
| 543 | TensorShape{ 5U, 1U, 51U, 13U }, |
| 544 | TensorShape{ 5U, 1U, 53U, 47U }, |
| 545 | TensorShape{ 5U, 1U, 128U, 384U }, |
| 546 | }) |
| 547 | { |
| 548 | } |
| 549 | }; |
| 550 | |
| 551 | /** Data set containing small 1x5 tensor shapes. */ |
| 552 | class Small1x5Shapes final : public ShapeDataset |
| 553 | { |
| 554 | public: |
| 555 | Small1x5Shapes() |
| 556 | : ShapeDataset("Shape", |
| 557 | { |
| 558 | TensorShape{ 1U, 5U, 7U, 4U }, |
| 559 | TensorShape{ 1U, 5U, 4U, 13U }, |
| 560 | TensorShape{ 1U, 5U, 9U, 2U }, |
| 561 | TensorShape{ 1U, 5U, 3U, 5U }, |
| 562 | }) |
| 563 | { |
| 564 | } |
| 565 | }; |
| 566 | |
| 567 | /** Data set containing large 1x5 tensor shapes. */ |
| 568 | class Large1x5Shapes final : public ShapeDataset |
| 569 | { |
| 570 | public: |
| 571 | Large1x5Shapes() |
| 572 | : ShapeDataset("Shape", |
| 573 | { |
| 574 | TensorShape{ 1U, 5U, 32U, 64U }, |
| 575 | TensorShape{ 1U, 5U, 51U, 13U }, |
| 576 | TensorShape{ 1U, 5U, 53U, 47U }, |
| 577 | TensorShape{ 1U, 5U, 128U, 384U }, |
| 578 | }) |
| 579 | { |
| 580 | } |
| 581 | }; |
| 582 | |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 583 | /** Data set containing small 1x7 tensor shapes. */ |
| 584 | class Small1x7Shapes final : public ShapeDataset |
| 585 | { |
| 586 | public: |
| 587 | Small1x7Shapes() |
| 588 | : ShapeDataset("Shape", |
| 589 | { |
| 590 | TensorShape{ 1U, 7U, 7U, 4U }, |
| 591 | TensorShape{ 1U, 7U, 4U, 13U }, |
| 592 | TensorShape{ 1U, 7U, 9U, 2U }, |
| 593 | TensorShape{ 1U, 7U, 3U, 5U }, |
| 594 | }) |
| 595 | { |
| 596 | } |
| 597 | }; |
| 598 | |
| 599 | /** Data set containing large 1x7 tensor shapes. */ |
| 600 | class Large1x7Shapes final : public ShapeDataset |
| 601 | { |
| 602 | public: |
| 603 | Large1x7Shapes() |
| 604 | : ShapeDataset("Shape", |
| 605 | { |
| 606 | TensorShape{ 1U, 7U, 32U, 64U }, |
| 607 | TensorShape{ 1U, 7U, 51U, 13U }, |
| 608 | TensorShape{ 1U, 7U, 53U, 47U }, |
| 609 | TensorShape{ 1U, 7U, 128U, 384U }, |
| 610 | }) |
| 611 | { |
| 612 | } |
| 613 | }; |
| 614 | |
| 615 | /** Data set containing small 7x7 tensor shapes. */ |
| 616 | class Small7x7Shapes final : public ShapeDataset |
| 617 | { |
| 618 | public: |
| 619 | Small7x7Shapes() |
| 620 | : ShapeDataset("Shape", |
| 621 | { |
| 622 | TensorShape{ 7U, 7U, 7U, 4U }, |
| 623 | TensorShape{ 7U, 7U, 4U, 13U }, |
| 624 | TensorShape{ 7U, 7U, 9U, 2U }, |
| 625 | TensorShape{ 7U, 7U, 3U, 5U }, |
| 626 | }) |
| 627 | { |
| 628 | } |
| 629 | }; |
| 630 | |
| 631 | /** Data set containing large 7x7 tensor shapes. */ |
| 632 | class Large7x7Shapes final : public ShapeDataset |
| 633 | { |
| 634 | public: |
| 635 | Large7x7Shapes() |
| 636 | : ShapeDataset("Shape", |
| 637 | { |
| 638 | TensorShape{ 7U, 7U, 32U, 64U }, |
| 639 | TensorShape{ 7U, 7U, 51U, 13U }, |
| 640 | TensorShape{ 7U, 7U, 53U, 47U }, |
| 641 | TensorShape{ 7U, 7U, 128U, 384U }, |
| 642 | }) |
| 643 | { |
| 644 | } |
| 645 | }; |
| 646 | |
| 647 | /** Data set containing small 7x1 tensor shapes. */ |
| 648 | class Small7x1Shapes final : public ShapeDataset |
| 649 | { |
| 650 | public: |
| 651 | Small7x1Shapes() |
| 652 | : ShapeDataset("Shape", |
| 653 | { |
| 654 | TensorShape{ 7U, 1U, 7U, 4U }, |
| 655 | TensorShape{ 7U, 1U, 4U, 13U }, |
| 656 | TensorShape{ 7U, 1U, 9U, 2U }, |
| 657 | TensorShape{ 7U, 1U, 3U, 5U }, |
| 658 | }) |
| 659 | { |
| 660 | } |
| 661 | }; |
| 662 | |
| 663 | /** Data set containing large 7x1 tensor shapes. */ |
| 664 | class Large7x1Shapes final : public ShapeDataset |
| 665 | { |
| 666 | public: |
| 667 | Large7x1Shapes() |
| 668 | : ShapeDataset("Shape", |
| 669 | { |
| 670 | TensorShape{ 7U, 1U, 32U, 64U }, |
| 671 | TensorShape{ 7U, 1U, 51U, 13U }, |
| 672 | TensorShape{ 7U, 1U, 53U, 47U }, |
| 673 | TensorShape{ 7U, 1U, 128U, 384U }, |
| 674 | }) |
| 675 | { |
| 676 | } |
| 677 | }; |
| 678 | |
Pablo Tello | f5f34bb | 2017-08-22 13:34:13 +0100 | [diff] [blame] | 679 | /** Data set containing small tensor shapes for deconvolution. */ |
| 680 | class SmallDeconvolutionShapes final : public ShapeDataset |
| 681 | { |
| 682 | public: |
| 683 | SmallDeconvolutionShapes() |
| 684 | : ShapeDataset("InputShape", |
| 685 | { |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 686 | TensorShape{ 5U, 4U, 3U, 2U }, |
Pablo Tello | f5f34bb | 2017-08-22 13:34:13 +0100 | [diff] [blame] | 687 | TensorShape{ 5U, 5U, 3U }, |
| 688 | TensorShape{ 11U, 13U, 4U, 3U } |
| 689 | }) |
| 690 | { |
| 691 | } |
| 692 | }; |
| 693 | |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 694 | /** Data set containing tiny tensor shapes for direct convolution. */ |
| 695 | class TinyDirectConvolutionShapes final : public ShapeDataset |
| 696 | { |
| 697 | public: |
| 698 | TinyDirectConvolutionShapes() |
| 699 | : ShapeDataset("InputShape", |
| 700 | { |
| 701 | // Batch size 1 |
| 702 | TensorShape{ 11U, 13U, 3U }, |
| 703 | TensorShape{ 7U, 27U, 3U } |
| 704 | }) |
| 705 | { |
| 706 | } |
| 707 | }; |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 708 | /** Data set containing small tensor shapes for direct convolution. */ |
| 709 | class SmallDirectConvolutionShapes final : public ShapeDataset |
| 710 | { |
| 711 | public: |
| 712 | SmallDirectConvolutionShapes() |
| 713 | : ShapeDataset("InputShape", |
| 714 | { |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 715 | // Batch size 1 |
steniu01 | f81652d | 2017-09-11 15:29:12 +0100 | [diff] [blame] | 716 | TensorShape{ 35U, 35U, 3U }, |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 717 | TensorShape{ 32U, 37U, 3U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 718 | // Batch size 4 |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 719 | TensorShape{ 32U, 37U, 3U, 4U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 720 | // Batch size 8 |
Michalis Spyrou | d466c2d | 2018-01-30 10:54:39 +0000 | [diff] [blame] | 721 | TensorShape{ 33U, 35U, 8U, 8U } |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 722 | }) |
| 723 | { |
| 724 | } |
| 725 | }; |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 726 | |
Xinghang Zhou | 33ff9ef | 2018-01-17 11:23:39 +0800 | [diff] [blame] | 727 | /** Data set containing small tensor shapes for direct convolution. */ |
| 728 | class SmallDirectConvolutionTensorShiftShapes final : public ShapeDataset |
| 729 | { |
| 730 | public: |
| 731 | SmallDirectConvolutionTensorShiftShapes() |
| 732 | : ShapeDataset("InputShape", |
| 733 | { |
| 734 | // Batch size 1 |
| 735 | TensorShape{ 35U, 35U, 3U }, |
| 736 | TensorShape{ 32U, 37U, 3U }, |
| 737 | // Batch size 4 |
| 738 | TensorShape{ 32U, 37U, 3U, 4U }, |
| 739 | // Batch size 8 |
Xinghang Zhou | 33ff9ef | 2018-01-17 11:23:39 +0800 | [diff] [blame] | 740 | TensorShape{ 33U, 35U, 3U, 8U }, |
| 741 | // Arbitrary batch size |
| 742 | TensorShape{ 32U, 37U, 3U, 8U } |
| 743 | }) |
| 744 | { |
| 745 | } |
| 746 | }; |
| 747 | |
Giorgio Arena | 0f17039 | 2018-07-18 16:13:12 +0100 | [diff] [blame] | 748 | /** Data set containing small grouped im2col tensor shapes. */ |
| 749 | class GroupedIm2ColSmallShapes final : public ShapeDataset |
| 750 | { |
| 751 | public: |
| 752 | GroupedIm2ColSmallShapes() |
| 753 | : ShapeDataset("Shape", |
| 754 | { |
| 755 | TensorShape{ 11U, 11U, 48U }, |
| 756 | TensorShape{ 27U, 13U, 24U }, |
| 757 | TensorShape{ 128U, 64U, 12U, 3U }, |
| 758 | TensorShape{ 11U, 11U, 48U, 4U }, |
| 759 | TensorShape{ 27U, 13U, 24U, 4U }, |
| 760 | TensorShape{ 11U, 11U, 48U, 5U } |
| 761 | }) |
| 762 | { |
| 763 | } |
| 764 | }; |
| 765 | |
| 766 | /** Data set containing large grouped im2col tensor shapes. */ |
| 767 | class GroupedIm2ColLargeShapes final : public ShapeDataset |
| 768 | { |
| 769 | public: |
| 770 | GroupedIm2ColLargeShapes() |
| 771 | : ShapeDataset("Shape", |
| 772 | { |
Georgios Pinitas | 2a51818 | 2018-08-13 15:53:31 +0100 | [diff] [blame] | 773 | TensorShape{ 153U, 231U, 12U }, |
| 774 | TensorShape{ 123U, 191U, 12U, 2U }, |
Giorgio Arena | 0f17039 | 2018-07-18 16:13:12 +0100 | [diff] [blame] | 775 | }) |
| 776 | { |
| 777 | } |
| 778 | }; |
| 779 | |
Giorgio Arena | c6aa49b | 2018-08-07 11:53:30 +0100 | [diff] [blame] | 780 | /** Data set containing small grouped weights tensor shapes. */ |
| 781 | class GroupedWeightsSmallShapes final : public ShapeDataset |
| 782 | { |
| 783 | public: |
| 784 | GroupedWeightsSmallShapes() |
| 785 | : ShapeDataset("Shape", |
| 786 | { |
| 787 | TensorShape{ 3U, 3U, 48U, 120U }, |
| 788 | TensorShape{ 1U, 3U, 24U, 240U }, |
| 789 | TensorShape{ 3U, 1U, 12U, 480U }, |
| 790 | TensorShape{ 5U, 5U, 48U, 120U }, |
| 791 | TensorShape{ 1U, 5U, 24U, 240U }, |
| 792 | TensorShape{ 5U, 1U, 48U, 480U } |
| 793 | }) |
| 794 | { |
| 795 | } |
| 796 | }; |
| 797 | |
| 798 | /** Data set containing large grouped weights tensor shapes. */ |
| 799 | class GroupedWeightsLargeShapes final : public ShapeDataset |
| 800 | { |
| 801 | public: |
| 802 | GroupedWeightsLargeShapes() |
| 803 | : ShapeDataset("Shape", |
| 804 | { |
| 805 | TensorShape{ 9U, 9U, 96U, 240U }, |
| 806 | TensorShape{ 7U, 9U, 48U, 480U }, |
| 807 | TensorShape{ 9U, 7U, 24U, 960U }, |
| 808 | TensorShape{ 13U, 13U, 96U, 240U }, |
| 809 | TensorShape{ 11U, 13U, 48U, 480U }, |
| 810 | TensorShape{ 13U, 11U, 24U, 960U } |
| 811 | }) |
| 812 | { |
| 813 | } |
| 814 | }; |
| 815 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 816 | /** Data set containing 2D tensor shapes for DepthConcatenateLayer. */ |
| 817 | class DepthConcatenateLayerShapes final : public ShapeDataset |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 818 | { |
| 819 | public: |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 820 | DepthConcatenateLayerShapes() |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 821 | : ShapeDataset("Shape", |
| 822 | { |
| 823 | TensorShape{ 322U, 243U }, |
| 824 | TensorShape{ 463U, 879U }, |
| 825 | TensorShape{ 416U, 651U } |
| 826 | }) |
| 827 | { |
| 828 | } |
| 829 | }; |
| 830 | |
Pablo Tello | 3dd5b68 | 2019-03-04 14:14:02 +0000 | [diff] [blame] | 831 | /** Data set containing tensor shapes for ConcatenateLayer. */ |
| 832 | class ConcatenateLayerShapes final : public ShapeDataset |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 833 | { |
| 834 | public: |
Pablo Tello | 3dd5b68 | 2019-03-04 14:14:02 +0000 | [diff] [blame] | 835 | ConcatenateLayerShapes() |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 836 | : ShapeDataset("Shape", |
| 837 | { |
| 838 | TensorShape{ 232U, 65U, 3U }, |
| 839 | TensorShape{ 432U, 65U, 3U }, |
Michele Di Giorgio | e6dbde0 | 2018-10-19 15:46:19 +0100 | [diff] [blame] | 840 | TensorShape{ 124U, 65U, 3U }, |
| 841 | TensorShape{ 124U, 65U, 3U, 4U } |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 842 | }) |
| 843 | { |
| 844 | } |
| 845 | }; |
| 846 | |
Gian Marco Iodice | bf17955 | 2017-09-05 13:51:21 +0100 | [diff] [blame] | 847 | /** Data set containing global pooling tensor shapes. */ |
| 848 | class GlobalPoolingShapes final : public ShapeDataset |
| 849 | { |
| 850 | public: |
| 851 | GlobalPoolingShapes() |
| 852 | : ShapeDataset("Shape", |
| 853 | { |
| 854 | // Batch size 1 |
| 855 | TensorShape{ 9U, 9U }, |
| 856 | TensorShape{ 13U, 13U, 2U }, |
| 857 | TensorShape{ 27U, 27U, 1U, 3U }, |
| 858 | // Batch size 4 |
| 859 | TensorShape{ 31U, 31U, 3U, 4U }, |
| 860 | TensorShape{ 34U, 34U, 2U, 4U } |
| 861 | }) |
| 862 | { |
| 863 | } |
| 864 | }; |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 865 | /** Data set containing tiny softmax layer shapes. */ |
| 866 | class SoftmaxLayerTinyShapes final : public ShapeDataset |
| 867 | { |
| 868 | public: |
| 869 | SoftmaxLayerTinyShapes() |
| 870 | : ShapeDataset("Shape", |
| 871 | { |
| 872 | TensorShape{ 9U, 9U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 873 | TensorShape{ 128U, 10U }, |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 874 | }) |
| 875 | { |
| 876 | } |
| 877 | }; |
Gian Marco Iodice | bf17955 | 2017-09-05 13:51:21 +0100 | [diff] [blame] | 878 | |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 879 | /** Data set containing small softmax layer shapes. */ |
| 880 | class SoftmaxLayerSmallShapes final : public ShapeDataset |
| 881 | { |
| 882 | public: |
| 883 | SoftmaxLayerSmallShapes() |
| 884 | : ShapeDataset("Shape", |
| 885 | { |
| 886 | TensorShape{ 9U, 9U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 887 | TensorShape{ 256U, 10U }, |
| 888 | TensorShape{ 353U, 8U }, |
| 889 | TensorShape{ 781U, 5U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 890 | }) |
| 891 | { |
| 892 | } |
| 893 | }; |
| 894 | |
| 895 | /** Data set containing large softmax layer shapes. */ |
| 896 | class SoftmaxLayerLargeShapes final : public ShapeDataset |
| 897 | { |
| 898 | public: |
| 899 | SoftmaxLayerLargeShapes() |
| 900 | : ShapeDataset("Shape", |
| 901 | { |
| 902 | TensorShape{ 1000U, 10U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 903 | TensorShape{ 3989U, 10U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 904 | TensorShape{ 7339U, 11U }, |
Giuseppe Rossini | 87e896a | 2018-08-24 10:24:12 +0100 | [diff] [blame] | 905 | |
| 906 | }) |
| 907 | { |
| 908 | } |
| 909 | }; |
| 910 | |
| 911 | /** Data set containing large and small softmax layer 4D shapes. */ |
| 912 | class SoftmaxLayer4DShapes final : public ShapeDataset |
| 913 | { |
| 914 | public: |
| 915 | SoftmaxLayer4DShapes() |
| 916 | : ShapeDataset("Shape", |
| 917 | { |
| 918 | TensorShape{ 9U, 9U, 9U, 9U }, |
| 919 | TensorShape{ 256U, 10U, 1U, 9U }, |
| 920 | TensorShape{ 353U, 8U, 2U }, |
| 921 | TensorShape{ 781U, 5U, 2U, 2U }, |
| 922 | TensorShape{ 781U, 11U, 1U, 2U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 923 | }) |
| 924 | { |
| 925 | } |
| 926 | }; |
| 927 | |
Ioan-Cristian Szabo | 2c35018 | 2017-12-20 16:27:37 +0000 | [diff] [blame] | 928 | /** Data set containing 2D tensor shapes relative to an image size. */ |
| 929 | class SmallImageShapes final : public ShapeDataset |
| 930 | { |
| 931 | public: |
| 932 | SmallImageShapes() |
| 933 | : ShapeDataset("Shape", |
| 934 | { |
| 935 | TensorShape{ 640U, 480U }, |
| 936 | TensorShape{ 800U, 600U }, |
| 937 | TensorShape{ 1200U, 800U } |
| 938 | }) |
| 939 | { |
| 940 | } |
| 941 | }; |
| 942 | |
| 943 | /** Data set containing 2D tensor shapes relative to an image size. */ |
| 944 | class LargeImageShapes final : public ShapeDataset |
| 945 | { |
| 946 | public: |
| 947 | LargeImageShapes() |
| 948 | : ShapeDataset("Shape", |
| 949 | { |
| 950 | TensorShape{ 1920U, 1080U }, |
| 951 | TensorShape{ 2560U, 1536U }, |
| 952 | TensorShape{ 3584U, 2048U } |
| 953 | }) |
| 954 | { |
| 955 | } |
| 956 | }; |
Giorgio Arena | 7302302 | 2018-09-04 14:55:55 +0100 | [diff] [blame] | 957 | |
| 958 | /** Data set containing small YOLO tensor shapes. */ |
| 959 | class SmallYOLOShapes final : public ShapeDataset |
| 960 | { |
| 961 | public: |
| 962 | SmallYOLOShapes() |
| 963 | : ShapeDataset("Shape", |
| 964 | { |
| 965 | // Batch size 1 |
| 966 | TensorShape{ 11U, 11U, 270U }, |
| 967 | TensorShape{ 27U, 13U, 90U }, |
Gian Marco Iodice | 8e1f3c0 | 2018-09-13 15:56:47 +0100 | [diff] [blame] | 968 | TensorShape{ 13U, 12U, 45U, 2U }, |
Giorgio Arena | 7302302 | 2018-09-04 14:55:55 +0100 | [diff] [blame] | 969 | }) |
| 970 | { |
| 971 | } |
| 972 | }; |
| 973 | |
| 974 | /** Data set containing large YOLO tensor shapes. */ |
| 975 | class LargeYOLOShapes final : public ShapeDataset |
| 976 | { |
| 977 | public: |
| 978 | LargeYOLOShapes() |
| 979 | : ShapeDataset("Shape", |
| 980 | { |
| 981 | TensorShape{ 24U, 23U, 270U }, |
| 982 | TensorShape{ 51U, 63U, 90U, 2U }, |
| 983 | TensorShape{ 76U, 91U, 45U, 3U } |
| 984 | }) |
| 985 | { |
| 986 | } |
| 987 | }; |
Gian Marco Iodice | 5ba5e09 | 2018-12-06 17:13:09 +0000 | [diff] [blame] | 988 | |
| 989 | /** Data set containing small tensor shapes to be used with the GEMM reshaping kernel */ |
| 990 | class SmallGEMMReshape2DShapes final : public ShapeDataset |
| 991 | { |
| 992 | public: |
| 993 | SmallGEMMReshape2DShapes() |
| 994 | : ShapeDataset("Shape", |
| 995 | { |
| 996 | TensorShape{ 63U, 72U }, |
| 997 | }) |
| 998 | { |
| 999 | } |
| 1000 | }; |
| 1001 | |
| 1002 | /** Data set containing small tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */ |
| 1003 | class SmallGEMMReshape3DShapes final : public ShapeDataset |
| 1004 | { |
| 1005 | public: |
| 1006 | SmallGEMMReshape3DShapes() |
| 1007 | : ShapeDataset("Shape", |
| 1008 | { |
| 1009 | TensorShape{ 63U, 9U, 8U }, |
| 1010 | }) |
| 1011 | { |
| 1012 | } |
| 1013 | }; |
| 1014 | |
| 1015 | /** Data set containing large tensor shapes to be used with the GEMM reshaping kernel */ |
| 1016 | class LargeGEMMReshape2DShapes final : public ShapeDataset |
| 1017 | { |
| 1018 | public: |
| 1019 | LargeGEMMReshape2DShapes() |
| 1020 | : ShapeDataset("Shape", |
| 1021 | { |
| 1022 | TensorShape{ 16U, 27U }, |
| 1023 | TensorShape{ 533U, 171U }, |
| 1024 | TensorShape{ 345U, 612U } |
| 1025 | }) |
| 1026 | { |
| 1027 | } |
| 1028 | }; |
| 1029 | |
| 1030 | /** Data set containing large tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */ |
| 1031 | class LargeGEMMReshape3DShapes final : public ShapeDataset |
| 1032 | { |
| 1033 | public: |
| 1034 | LargeGEMMReshape3DShapes() |
| 1035 | : ShapeDataset("Shape", |
| 1036 | { |
| 1037 | TensorShape{ 16U, 3U, 9U }, |
| 1038 | TensorShape{ 533U, 19U, 9U }, |
| 1039 | TensorShape{ 345U, 34U, 18U } |
| 1040 | }) |
| 1041 | { |
| 1042 | } |
| 1043 | }; |
Pablo Tello | e96e4f0 | 2018-12-21 16:47:23 +0000 | [diff] [blame] | 1044 | |
| 1045 | /** Data set containing small 2D tensor shapes. */ |
| 1046 | class Small2DNonMaxSuppressionShapes final : public ShapeDataset |
| 1047 | { |
| 1048 | public: |
| 1049 | Small2DNonMaxSuppressionShapes() |
| 1050 | : ShapeDataset("Shape", |
| 1051 | { |
| 1052 | TensorShape{ 4U, 7U }, |
| 1053 | TensorShape{ 4U, 13U }, |
| 1054 | TensorShape{ 4U, 64U } |
| 1055 | }) |
| 1056 | { |
| 1057 | } |
| 1058 | }; |
| 1059 | |
| 1060 | /** Data set containing large 2D tensor shapes. */ |
| 1061 | class Large2DNonMaxSuppressionShapes final : public ShapeDataset |
| 1062 | { |
| 1063 | public: |
| 1064 | Large2DNonMaxSuppressionShapes() |
| 1065 | : ShapeDataset("Shape", |
| 1066 | { |
| 1067 | TensorShape{ 4U, 207U }, |
| 1068 | TensorShape{ 4U, 113U }, |
| 1069 | TensorShape{ 4U, 264U } |
| 1070 | }) |
| 1071 | { |
| 1072 | } |
| 1073 | }; |
| 1074 | |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 1075 | } // namespace datasets |
| 1076 | } // namespace test |
| 1077 | } // namespace arm_compute |
| 1078 | #endif /* __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ */ |