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 }, |
steniu01 | f81652d | 2017-09-11 15:29:12 +0100 | [diff] [blame] | 231 | // Arbitrary batch size |
| 232 | TensorShape{ 37U, 37U, 3U, 5U } |
| 233 | }) |
| 234 | { |
| 235 | } |
| 236 | }; |
| 237 | |
Gian Marco | 37908d9 | 2017-11-07 14:38:22 +0000 | [diff] [blame] | 238 | /** Data set containing medium 2D tensor shapes. */ |
| 239 | class Medium2DShapes final : public ShapeDataset |
| 240 | { |
| 241 | public: |
| 242 | Medium2DShapes() |
| 243 | : ShapeDataset("Shape", |
| 244 | { |
| 245 | TensorShape{ 42U, 37U }, |
| 246 | TensorShape{ 57U, 60U }, |
| 247 | TensorShape{ 128U, 64U }, |
Gian Marco Iodice | 2abb216 | 2018-04-11 10:49:04 +0100 | [diff] [blame] | 248 | TensorShape{ 83U, 72U }, |
| 249 | TensorShape{ 40U, 40U } |
Gian Marco | 37908d9 | 2017-11-07 14:38:22 +0000 | [diff] [blame] | 250 | }) |
| 251 | { |
| 252 | } |
| 253 | }; |
| 254 | |
Gian Marco Iodice | 7e4b239 | 2018-02-22 16:17:20 +0000 | [diff] [blame] | 255 | /** Data set containing medium 3D tensor shapes. */ |
| 256 | class Medium3DShapes final : public ShapeDataset |
| 257 | { |
| 258 | public: |
| 259 | Medium3DShapes() |
| 260 | : ShapeDataset("Shape", |
| 261 | { |
| 262 | TensorShape{ 42U, 37U, 8U }, |
| 263 | TensorShape{ 57U, 60U, 13U }, |
Gian Marco Iodice | 7e4b239 | 2018-02-22 16:17:20 +0000 | [diff] [blame] | 264 | TensorShape{ 83U, 72U, 14U } |
| 265 | }) |
| 266 | { |
| 267 | } |
| 268 | }; |
| 269 | |
| 270 | /** Data set containing medium 4D tensor shapes. */ |
| 271 | class Medium4DShapes final : public ShapeDataset |
| 272 | { |
| 273 | public: |
| 274 | Medium4DShapes() |
| 275 | : ShapeDataset("Shape", |
| 276 | { |
| 277 | TensorShape{ 42U, 37U, 8U, 15U }, |
| 278 | TensorShape{ 57U, 60U, 13U, 8U }, |
Gian Marco Iodice | 7e4b239 | 2018-02-22 16:17:20 +0000 | [diff] [blame] | 279 | TensorShape{ 83U, 72U, 14U, 5U } |
| 280 | }) |
| 281 | { |
| 282 | } |
| 283 | }; |
| 284 | |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 285 | /** Data set containing large tensor shapes. */ |
| 286 | class LargeShapes final : public ShapeDataset |
| 287 | { |
| 288 | public: |
| 289 | LargeShapes() |
| 290 | : ShapeDataset("Shape", |
| 291 | { |
Michalis Spyrou | 97b2bb1 | 2019-05-28 16:59:27 +0100 | [diff] [blame] | 292 | TensorShape{ 582U, 131U, 1U, 4U }, |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 293 | }) |
| 294 | { |
| 295 | } |
| 296 | }; |
| 297 | |
Diego Lopez Recas | 0021d75 | 2017-12-18 14:42:56 +0000 | [diff] [blame] | 298 | /** Data set containing pairs of large tensor shapes that are broadcast compatible. */ |
| 299 | class LargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset> |
| 300 | { |
| 301 | public: |
| 302 | LargeShapesBroadcast() |
| 303 | : ZipDataset<ShapeDataset, ShapeDataset>( |
| 304 | ShapeDataset("Shape0", |
| 305 | { |
| 306 | TensorShape{ 1921U, 541U }, |
| 307 | TensorShape{ 1U, 485U, 2U, 3U }, |
| 308 | TensorShape{ 4159U, 1U }, |
| 309 | TensorShape{ 799U } |
| 310 | }), |
| 311 | ShapeDataset("Shape1", |
| 312 | { |
| 313 | TensorShape{ 1921U, 1U, 2U }, |
| 314 | TensorShape{ 641U, 1U, 2U, 3U }, |
| 315 | TensorShape{ 1U, 127U, 25U }, |
| 316 | TensorShape{ 799U, 595U, 1U, 4U } |
| 317 | })) |
| 318 | { |
| 319 | } |
| 320 | }; |
| 321 | |
Gian Marco | 5420b28 | 2017-11-29 10:41:38 +0000 | [diff] [blame] | 322 | /** Data set containing large 1D tensor shapes. */ |
| 323 | class Large1DShapes final : public ShapeDataset |
| 324 | { |
| 325 | public: |
| 326 | Large1DShapes() |
| 327 | : ShapeDataset("Shape", |
| 328 | { |
| 329 | TensorShape{ 1921U }, |
| 330 | TensorShape{ 1245U }, |
| 331 | TensorShape{ 4160U } |
| 332 | }) |
| 333 | { |
| 334 | } |
| 335 | }; |
| 336 | |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 337 | /** Data set containing large 2D tensor shapes. */ |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 338 | class Large2DShapes final : public ShapeDataset |
| 339 | { |
| 340 | public: |
| 341 | Large2DShapes() |
| 342 | : ShapeDataset("Shape", |
| 343 | { |
| 344 | TensorShape{ 1920U, 1080U }, |
Moritz Pflanzer | 3ce3ff4 | 2017-07-21 17:41:02 +0100 | [diff] [blame] | 345 | TensorShape{ 1245U, 652U }, |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 346 | TensorShape{ 4160U, 3120U } |
| 347 | }) |
| 348 | { |
| 349 | } |
| 350 | }; |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 351 | |
Gian Marco Iodice | 06b184a | 2017-08-29 16:05:25 +0100 | [diff] [blame] | 352 | /** Data set containing large 3D tensor shapes. */ |
| 353 | class Large3DShapes final : public ShapeDataset |
| 354 | { |
| 355 | public: |
| 356 | Large3DShapes() |
| 357 | : ShapeDataset("Shape", |
| 358 | { |
| 359 | TensorShape{ 320U, 240U, 3U }, |
| 360 | TensorShape{ 383U, 653U, 2U }, |
| 361 | TensorShape{ 721U, 123U, 13U } |
| 362 | }) |
| 363 | { |
| 364 | } |
| 365 | }; |
| 366 | |
| 367 | /** Data set containing large 4D tensor shapes. */ |
| 368 | class Large4DShapes final : public ShapeDataset |
| 369 | { |
| 370 | public: |
| 371 | Large4DShapes() |
| 372 | : ShapeDataset("Shape", |
| 373 | { |
| 374 | TensorShape{ 320U, 123U, 3U, 3U }, |
| 375 | TensorShape{ 383U, 413U, 2U, 3U }, |
| 376 | TensorShape{ 517U, 123U, 13U, 2U } |
| 377 | }) |
| 378 | { |
| 379 | } |
| 380 | }; |
| 381 | |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 382 | /** Data set containing small 3x3 tensor shapes. */ |
| 383 | class Small3x3Shapes final : public ShapeDataset |
| 384 | { |
| 385 | public: |
| 386 | Small3x3Shapes() |
| 387 | : ShapeDataset("Shape", |
| 388 | { |
| 389 | TensorShape{ 3U, 3U, 7U, 4U }, |
| 390 | TensorShape{ 3U, 3U, 4U, 13U }, |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 391 | TensorShape{ 3U, 3U, 3U, 5U }, |
| 392 | }) |
| 393 | { |
| 394 | } |
| 395 | }; |
| 396 | |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 397 | /** Data set containing small 3x1 tensor shapes. */ |
| 398 | class Small3x1Shapes final : public ShapeDataset |
| 399 | { |
| 400 | public: |
| 401 | Small3x1Shapes() |
| 402 | : ShapeDataset("Shape", |
| 403 | { |
| 404 | TensorShape{ 3U, 1U, 7U, 4U }, |
| 405 | TensorShape{ 3U, 1U, 4U, 13U }, |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 406 | TensorShape{ 3U, 1U, 3U, 5U }, |
| 407 | }) |
| 408 | { |
| 409 | } |
| 410 | }; |
| 411 | |
| 412 | /** Data set containing small 1x3 tensor shapes. */ |
| 413 | class Small1x3Shapes final : public ShapeDataset |
| 414 | { |
| 415 | public: |
| 416 | Small1x3Shapes() |
| 417 | : ShapeDataset("Shape", |
| 418 | { |
| 419 | TensorShape{ 1U, 3U, 7U, 4U }, |
| 420 | TensorShape{ 1U, 3U, 4U, 13U }, |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 421 | TensorShape{ 1U, 3U, 3U, 5U }, |
| 422 | }) |
| 423 | { |
| 424 | } |
| 425 | }; |
| 426 | |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 427 | /** Data set containing large 3x3 tensor shapes. */ |
| 428 | class Large3x3Shapes final : public ShapeDataset |
| 429 | { |
| 430 | public: |
| 431 | Large3x3Shapes() |
| 432 | : ShapeDataset("Shape", |
| 433 | { |
| 434 | TensorShape{ 3U, 3U, 32U, 64U }, |
| 435 | TensorShape{ 3U, 3U, 51U, 13U }, |
| 436 | TensorShape{ 3U, 3U, 53U, 47U }, |
Gian Marco Iodice | 247f52c | 2018-03-22 11:24:56 +0000 | [diff] [blame] | 437 | }) |
| 438 | { |
| 439 | } |
| 440 | }; |
| 441 | |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 442 | /** Data set containing large 3x1 tensor shapes. */ |
| 443 | class Large3x1Shapes final : public ShapeDataset |
| 444 | { |
| 445 | public: |
| 446 | Large3x1Shapes() |
| 447 | : ShapeDataset("Shape", |
| 448 | { |
| 449 | TensorShape{ 3U, 1U, 32U, 64U }, |
| 450 | TensorShape{ 3U, 1U, 51U, 13U }, |
| 451 | TensorShape{ 3U, 1U, 53U, 47U }, |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 452 | }) |
| 453 | { |
| 454 | } |
| 455 | }; |
| 456 | |
| 457 | /** Data set containing large 1x3 tensor shapes. */ |
| 458 | class Large1x3Shapes final : public ShapeDataset |
| 459 | { |
| 460 | public: |
| 461 | Large1x3Shapes() |
| 462 | : ShapeDataset("Shape", |
| 463 | { |
| 464 | TensorShape{ 1U, 3U, 32U, 64U }, |
| 465 | TensorShape{ 1U, 3U, 51U, 13U }, |
| 466 | TensorShape{ 1U, 3U, 53U, 47U }, |
Gian Marco Iodice | f1c2bf0 | 2018-06-13 14:05:54 +0100 | [diff] [blame] | 467 | }) |
| 468 | { |
| 469 | } |
| 470 | }; |
| 471 | |
Giorgio Arena | 9373c8b | 2018-04-11 19:07:17 +0100 | [diff] [blame] | 472 | /** Data set containing small 5x5 tensor shapes. */ |
| 473 | class Small5x5Shapes final : public ShapeDataset |
| 474 | { |
| 475 | public: |
| 476 | Small5x5Shapes() |
| 477 | : ShapeDataset("Shape", |
| 478 | { |
| 479 | TensorShape{ 5U, 5U, 7U, 4U }, |
| 480 | TensorShape{ 5U, 5U, 4U, 13U }, |
Giorgio Arena | 9373c8b | 2018-04-11 19:07:17 +0100 | [diff] [blame] | 481 | TensorShape{ 5U, 5U, 3U, 5U }, |
| 482 | }) |
| 483 | { |
| 484 | } |
| 485 | }; |
| 486 | |
| 487 | /** Data set containing large 5x5 tensor shapes. */ |
| 488 | class Large5x5Shapes final : public ShapeDataset |
| 489 | { |
| 490 | public: |
| 491 | Large5x5Shapes() |
| 492 | : ShapeDataset("Shape", |
| 493 | { |
| 494 | TensorShape{ 5U, 5U, 32U, 64U }, |
| 495 | TensorShape{ 5U, 5U, 51U, 13U }, |
| 496 | TensorShape{ 5U, 5U, 53U, 47U }, |
Giorgio Arena | 9373c8b | 2018-04-11 19:07:17 +0100 | [diff] [blame] | 497 | }) |
| 498 | { |
| 499 | } |
| 500 | }; |
| 501 | |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 502 | /** Data set containing small 5x1 tensor shapes. */ |
| 503 | class Small5x1Shapes final : public ShapeDataset |
| 504 | { |
| 505 | public: |
| 506 | Small5x1Shapes() |
| 507 | : ShapeDataset("Shape", |
| 508 | { |
| 509 | TensorShape{ 5U, 1U, 7U, 4U }, |
| 510 | TensorShape{ 5U, 1U, 4U, 13U }, |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 511 | TensorShape{ 5U, 1U, 3U, 5U }, |
| 512 | }) |
| 513 | { |
| 514 | } |
| 515 | }; |
| 516 | |
| 517 | /** Data set containing large 5x1 tensor shapes. */ |
| 518 | class Large5x1Shapes final : public ShapeDataset |
| 519 | { |
| 520 | public: |
| 521 | Large5x1Shapes() |
| 522 | : ShapeDataset("Shape", |
| 523 | { |
| 524 | TensorShape{ 5U, 1U, 32U, 64U }, |
| 525 | TensorShape{ 5U, 1U, 51U, 13U }, |
| 526 | TensorShape{ 5U, 1U, 53U, 47U }, |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 527 | }) |
| 528 | { |
| 529 | } |
| 530 | }; |
| 531 | |
| 532 | /** Data set containing small 1x5 tensor shapes. */ |
| 533 | class Small1x5Shapes final : public ShapeDataset |
| 534 | { |
| 535 | public: |
| 536 | Small1x5Shapes() |
| 537 | : ShapeDataset("Shape", |
| 538 | { |
| 539 | TensorShape{ 1U, 5U, 7U, 4U }, |
| 540 | TensorShape{ 1U, 5U, 4U, 13U }, |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 541 | TensorShape{ 1U, 5U, 3U, 5U }, |
| 542 | }) |
| 543 | { |
| 544 | } |
| 545 | }; |
| 546 | |
| 547 | /** Data set containing large 1x5 tensor shapes. */ |
| 548 | class Large1x5Shapes final : public ShapeDataset |
| 549 | { |
| 550 | public: |
| 551 | Large1x5Shapes() |
| 552 | : ShapeDataset("Shape", |
| 553 | { |
| 554 | TensorShape{ 1U, 5U, 32U, 64U }, |
| 555 | TensorShape{ 1U, 5U, 51U, 13U }, |
| 556 | TensorShape{ 1U, 5U, 53U, 47U }, |
Gian Marco Iodice | 876be2a | 2018-07-03 12:22:09 +0100 | [diff] [blame] | 557 | }) |
| 558 | { |
| 559 | } |
| 560 | }; |
| 561 | |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 562 | /** Data set containing small 1x7 tensor shapes. */ |
| 563 | class Small1x7Shapes final : public ShapeDataset |
| 564 | { |
| 565 | public: |
| 566 | Small1x7Shapes() |
| 567 | : ShapeDataset("Shape", |
| 568 | { |
| 569 | TensorShape{ 1U, 7U, 7U, 4U }, |
| 570 | TensorShape{ 1U, 7U, 4U, 13U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 571 | TensorShape{ 1U, 7U, 3U, 5U }, |
| 572 | }) |
| 573 | { |
| 574 | } |
| 575 | }; |
| 576 | |
| 577 | /** Data set containing large 1x7 tensor shapes. */ |
| 578 | class Large1x7Shapes final : public ShapeDataset |
| 579 | { |
| 580 | public: |
| 581 | Large1x7Shapes() |
| 582 | : ShapeDataset("Shape", |
| 583 | { |
| 584 | TensorShape{ 1U, 7U, 32U, 64U }, |
| 585 | TensorShape{ 1U, 7U, 51U, 13U }, |
| 586 | TensorShape{ 1U, 7U, 53U, 47U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 587 | }) |
| 588 | { |
| 589 | } |
| 590 | }; |
| 591 | |
| 592 | /** Data set containing small 7x7 tensor shapes. */ |
| 593 | class Small7x7Shapes final : public ShapeDataset |
| 594 | { |
| 595 | public: |
| 596 | Small7x7Shapes() |
| 597 | : ShapeDataset("Shape", |
| 598 | { |
| 599 | TensorShape{ 7U, 7U, 7U, 4U }, |
| 600 | TensorShape{ 7U, 7U, 4U, 13U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 601 | TensorShape{ 7U, 7U, 3U, 5U }, |
| 602 | }) |
| 603 | { |
| 604 | } |
| 605 | }; |
| 606 | |
| 607 | /** Data set containing large 7x7 tensor shapes. */ |
| 608 | class Large7x7Shapes final : public ShapeDataset |
| 609 | { |
| 610 | public: |
| 611 | Large7x7Shapes() |
| 612 | : ShapeDataset("Shape", |
| 613 | { |
| 614 | TensorShape{ 7U, 7U, 32U, 64U }, |
| 615 | TensorShape{ 7U, 7U, 51U, 13U }, |
| 616 | TensorShape{ 7U, 7U, 53U, 47U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 617 | }) |
| 618 | { |
| 619 | } |
| 620 | }; |
| 621 | |
| 622 | /** Data set containing small 7x1 tensor shapes. */ |
| 623 | class Small7x1Shapes final : public ShapeDataset |
| 624 | { |
| 625 | public: |
| 626 | Small7x1Shapes() |
| 627 | : ShapeDataset("Shape", |
| 628 | { |
| 629 | TensorShape{ 7U, 1U, 7U, 4U }, |
| 630 | TensorShape{ 7U, 1U, 4U, 13U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 631 | TensorShape{ 7U, 1U, 3U, 5U }, |
| 632 | }) |
| 633 | { |
| 634 | } |
| 635 | }; |
| 636 | |
| 637 | /** Data set containing large 7x1 tensor shapes. */ |
| 638 | class Large7x1Shapes final : public ShapeDataset |
| 639 | { |
| 640 | public: |
| 641 | Large7x1Shapes() |
| 642 | : ShapeDataset("Shape", |
| 643 | { |
| 644 | TensorShape{ 7U, 1U, 32U, 64U }, |
| 645 | TensorShape{ 7U, 1U, 51U, 13U }, |
| 646 | TensorShape{ 7U, 1U, 53U, 47U }, |
Michele Di Giorgio | 881c684 | 2019-02-27 14:26:51 +0000 | [diff] [blame] | 647 | }) |
| 648 | { |
| 649 | } |
| 650 | }; |
| 651 | |
Pablo Tello | f5f34bb | 2017-08-22 13:34:13 +0100 | [diff] [blame] | 652 | /** Data set containing small tensor shapes for deconvolution. */ |
| 653 | class SmallDeconvolutionShapes final : public ShapeDataset |
| 654 | { |
| 655 | public: |
| 656 | SmallDeconvolutionShapes() |
| 657 | : ShapeDataset("InputShape", |
| 658 | { |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 659 | TensorShape{ 5U, 4U, 3U, 2U }, |
Pablo Tello | f5f34bb | 2017-08-22 13:34:13 +0100 | [diff] [blame] | 660 | TensorShape{ 5U, 5U, 3U }, |
| 661 | TensorShape{ 11U, 13U, 4U, 3U } |
| 662 | }) |
| 663 | { |
| 664 | } |
| 665 | }; |
| 666 | |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 667 | /** Data set containing tiny tensor shapes for direct convolution. */ |
| 668 | class TinyDirectConvolutionShapes final : public ShapeDataset |
| 669 | { |
| 670 | public: |
| 671 | TinyDirectConvolutionShapes() |
| 672 | : ShapeDataset("InputShape", |
| 673 | { |
| 674 | // Batch size 1 |
| 675 | TensorShape{ 11U, 13U, 3U }, |
| 676 | TensorShape{ 7U, 27U, 3U } |
| 677 | }) |
| 678 | { |
| 679 | } |
| 680 | }; |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 681 | /** Data set containing small tensor shapes for direct convolution. */ |
| 682 | class SmallDirectConvolutionShapes final : public ShapeDataset |
| 683 | { |
| 684 | public: |
| 685 | SmallDirectConvolutionShapes() |
| 686 | : ShapeDataset("InputShape", |
| 687 | { |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 688 | // Batch size 1 |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 689 | TensorShape{ 32U, 37U, 3U }, |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 690 | // Batch size 4 |
SiCong Li | caf8c5e | 2017-08-21 13:12:52 +0100 | [diff] [blame] | 691 | TensorShape{ 32U, 37U, 3U, 4U }, |
Moritz Pflanzer | b3d2579 | 2017-07-26 11:49:37 +0100 | [diff] [blame] | 692 | }) |
| 693 | { |
| 694 | } |
| 695 | }; |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 696 | |
Xinghang Zhou | 33ff9ef | 2018-01-17 11:23:39 +0800 | [diff] [blame] | 697 | /** Data set containing small tensor shapes for direct convolution. */ |
| 698 | class SmallDirectConvolutionTensorShiftShapes final : public ShapeDataset |
| 699 | { |
| 700 | public: |
| 701 | SmallDirectConvolutionTensorShiftShapes() |
| 702 | : ShapeDataset("InputShape", |
| 703 | { |
| 704 | // Batch size 1 |
Xinghang Zhou | 33ff9ef | 2018-01-17 11:23:39 +0800 | [diff] [blame] | 705 | TensorShape{ 32U, 37U, 3U }, |
| 706 | // Batch size 4 |
| 707 | TensorShape{ 32U, 37U, 3U, 4U }, |
Xinghang Zhou | 33ff9ef | 2018-01-17 11:23:39 +0800 | [diff] [blame] | 708 | // Arbitrary batch size |
| 709 | TensorShape{ 32U, 37U, 3U, 8U } |
| 710 | }) |
| 711 | { |
| 712 | } |
| 713 | }; |
| 714 | |
Giorgio Arena | 0f17039 | 2018-07-18 16:13:12 +0100 | [diff] [blame] | 715 | /** Data set containing small grouped im2col tensor shapes. */ |
| 716 | class GroupedIm2ColSmallShapes final : public ShapeDataset |
| 717 | { |
| 718 | public: |
| 719 | GroupedIm2ColSmallShapes() |
| 720 | : ShapeDataset("Shape", |
| 721 | { |
| 722 | TensorShape{ 11U, 11U, 48U }, |
| 723 | TensorShape{ 27U, 13U, 24U }, |
| 724 | TensorShape{ 128U, 64U, 12U, 3U }, |
| 725 | TensorShape{ 11U, 11U, 48U, 4U }, |
| 726 | TensorShape{ 27U, 13U, 24U, 4U }, |
| 727 | TensorShape{ 11U, 11U, 48U, 5U } |
| 728 | }) |
| 729 | { |
| 730 | } |
| 731 | }; |
| 732 | |
| 733 | /** Data set containing large grouped im2col tensor shapes. */ |
| 734 | class GroupedIm2ColLargeShapes final : public ShapeDataset |
| 735 | { |
| 736 | public: |
| 737 | GroupedIm2ColLargeShapes() |
| 738 | : ShapeDataset("Shape", |
| 739 | { |
Georgios Pinitas | 2a51818 | 2018-08-13 15:53:31 +0100 | [diff] [blame] | 740 | TensorShape{ 153U, 231U, 12U }, |
| 741 | TensorShape{ 123U, 191U, 12U, 2U }, |
Giorgio Arena | 0f17039 | 2018-07-18 16:13:12 +0100 | [diff] [blame] | 742 | }) |
| 743 | { |
| 744 | } |
| 745 | }; |
| 746 | |
Giorgio Arena | c6aa49b | 2018-08-07 11:53:30 +0100 | [diff] [blame] | 747 | /** Data set containing small grouped weights tensor shapes. */ |
| 748 | class GroupedWeightsSmallShapes final : public ShapeDataset |
| 749 | { |
| 750 | public: |
| 751 | GroupedWeightsSmallShapes() |
| 752 | : ShapeDataset("Shape", |
| 753 | { |
| 754 | TensorShape{ 3U, 3U, 48U, 120U }, |
| 755 | TensorShape{ 1U, 3U, 24U, 240U }, |
| 756 | TensorShape{ 3U, 1U, 12U, 480U }, |
| 757 | TensorShape{ 5U, 5U, 48U, 120U }, |
| 758 | TensorShape{ 1U, 5U, 24U, 240U }, |
| 759 | TensorShape{ 5U, 1U, 48U, 480U } |
| 760 | }) |
| 761 | { |
| 762 | } |
| 763 | }; |
| 764 | |
| 765 | /** Data set containing large grouped weights tensor shapes. */ |
| 766 | class GroupedWeightsLargeShapes final : public ShapeDataset |
| 767 | { |
| 768 | public: |
| 769 | GroupedWeightsLargeShapes() |
| 770 | : ShapeDataset("Shape", |
| 771 | { |
| 772 | TensorShape{ 9U, 9U, 96U, 240U }, |
| 773 | TensorShape{ 7U, 9U, 48U, 480U }, |
| 774 | TensorShape{ 9U, 7U, 24U, 960U }, |
| 775 | TensorShape{ 13U, 13U, 96U, 240U }, |
| 776 | TensorShape{ 11U, 13U, 48U, 480U }, |
| 777 | TensorShape{ 13U, 11U, 24U, 960U } |
| 778 | }) |
| 779 | { |
| 780 | } |
| 781 | }; |
| 782 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 783 | /** Data set containing 2D tensor shapes for DepthConcatenateLayer. */ |
| 784 | class DepthConcatenateLayerShapes final : public ShapeDataset |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 785 | { |
| 786 | public: |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 787 | DepthConcatenateLayerShapes() |
Gian Marco Iodice | b2833b8 | 2017-09-13 16:23:18 +0100 | [diff] [blame] | 788 | : ShapeDataset("Shape", |
| 789 | { |
| 790 | TensorShape{ 322U, 243U }, |
| 791 | TensorShape{ 463U, 879U }, |
| 792 | TensorShape{ 416U, 651U } |
| 793 | }) |
| 794 | { |
| 795 | } |
| 796 | }; |
| 797 | |
Pablo Tello | 3dd5b68 | 2019-03-04 14:14:02 +0000 | [diff] [blame] | 798 | /** Data set containing tensor shapes for ConcatenateLayer. */ |
| 799 | class ConcatenateLayerShapes final : public ShapeDataset |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 800 | { |
| 801 | public: |
Pablo Tello | 3dd5b68 | 2019-03-04 14:14:02 +0000 | [diff] [blame] | 802 | ConcatenateLayerShapes() |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 803 | : ShapeDataset("Shape", |
| 804 | { |
| 805 | TensorShape{ 232U, 65U, 3U }, |
| 806 | TensorShape{ 432U, 65U, 3U }, |
Michele Di Giorgio | e6dbde0 | 2018-10-19 15:46:19 +0100 | [diff] [blame] | 807 | TensorShape{ 124U, 65U, 3U }, |
| 808 | TensorShape{ 124U, 65U, 3U, 4U } |
Michalis Spyrou | 55b3d12 | 2018-05-09 09:59:23 +0100 | [diff] [blame] | 809 | }) |
| 810 | { |
| 811 | } |
| 812 | }; |
| 813 | |
Gian Marco Iodice | bf17955 | 2017-09-05 13:51:21 +0100 | [diff] [blame] | 814 | /** Data set containing global pooling tensor shapes. */ |
| 815 | class GlobalPoolingShapes final : public ShapeDataset |
| 816 | { |
| 817 | public: |
| 818 | GlobalPoolingShapes() |
| 819 | : ShapeDataset("Shape", |
| 820 | { |
| 821 | // Batch size 1 |
| 822 | TensorShape{ 9U, 9U }, |
| 823 | TensorShape{ 13U, 13U, 2U }, |
| 824 | TensorShape{ 27U, 27U, 1U, 3U }, |
| 825 | // Batch size 4 |
| 826 | TensorShape{ 31U, 31U, 3U, 4U }, |
| 827 | TensorShape{ 34U, 34U, 2U, 4U } |
| 828 | }) |
| 829 | { |
| 830 | } |
| 831 | }; |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 832 | /** Data set containing tiny softmax layer shapes. */ |
| 833 | class SoftmaxLayerTinyShapes final : public ShapeDataset |
| 834 | { |
| 835 | public: |
| 836 | SoftmaxLayerTinyShapes() |
| 837 | : ShapeDataset("Shape", |
| 838 | { |
| 839 | TensorShape{ 9U, 9U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 840 | TensorShape{ 128U, 10U }, |
Anthony Barbier | 1c0d0ff | 2018-01-31 13:05:09 +0000 | [diff] [blame] | 841 | }) |
| 842 | { |
| 843 | } |
| 844 | }; |
Gian Marco Iodice | bf17955 | 2017-09-05 13:51:21 +0100 | [diff] [blame] | 845 | |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 846 | /** Data set containing small softmax layer shapes. */ |
| 847 | class SoftmaxLayerSmallShapes final : public ShapeDataset |
| 848 | { |
| 849 | public: |
| 850 | SoftmaxLayerSmallShapes() |
| 851 | : ShapeDataset("Shape", |
| 852 | { |
| 853 | TensorShape{ 9U, 9U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 854 | TensorShape{ 256U, 10U }, |
| 855 | TensorShape{ 353U, 8U }, |
| 856 | TensorShape{ 781U, 5U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 857 | }) |
| 858 | { |
| 859 | } |
| 860 | }; |
| 861 | |
| 862 | /** Data set containing large softmax layer shapes. */ |
| 863 | class SoftmaxLayerLargeShapes final : public ShapeDataset |
| 864 | { |
| 865 | public: |
| 866 | SoftmaxLayerLargeShapes() |
| 867 | : ShapeDataset("Shape", |
| 868 | { |
| 869 | TensorShape{ 1000U, 10U }, |
Georgios Pinitas | 17d6d3c | 2018-07-02 17:52:40 +0100 | [diff] [blame] | 870 | TensorShape{ 3989U, 10U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 871 | TensorShape{ 7339U, 11U }, |
Giuseppe Rossini | 87e896a | 2018-08-24 10:24:12 +0100 | [diff] [blame] | 872 | |
| 873 | }) |
| 874 | { |
| 875 | } |
| 876 | }; |
| 877 | |
| 878 | /** Data set containing large and small softmax layer 4D shapes. */ |
| 879 | class SoftmaxLayer4DShapes final : public ShapeDataset |
| 880 | { |
| 881 | public: |
| 882 | SoftmaxLayer4DShapes() |
| 883 | : ShapeDataset("Shape", |
| 884 | { |
| 885 | TensorShape{ 9U, 9U, 9U, 9U }, |
| 886 | TensorShape{ 256U, 10U, 1U, 9U }, |
| 887 | TensorShape{ 353U, 8U, 2U }, |
| 888 | TensorShape{ 781U, 5U, 2U, 2U }, |
| 889 | TensorShape{ 781U, 11U, 1U, 2U }, |
Chunosov | d6afedc | 2017-11-06 22:09:45 +0700 | [diff] [blame] | 890 | }) |
| 891 | { |
| 892 | } |
| 893 | }; |
| 894 | |
Ioan-Cristian Szabo | 2c35018 | 2017-12-20 16:27:37 +0000 | [diff] [blame] | 895 | /** Data set containing 2D tensor shapes relative to an image size. */ |
| 896 | class SmallImageShapes final : public ShapeDataset |
| 897 | { |
| 898 | public: |
| 899 | SmallImageShapes() |
| 900 | : ShapeDataset("Shape", |
| 901 | { |
| 902 | TensorShape{ 640U, 480U }, |
| 903 | TensorShape{ 800U, 600U }, |
| 904 | TensorShape{ 1200U, 800U } |
| 905 | }) |
| 906 | { |
| 907 | } |
| 908 | }; |
| 909 | |
| 910 | /** Data set containing 2D tensor shapes relative to an image size. */ |
| 911 | class LargeImageShapes final : public ShapeDataset |
| 912 | { |
| 913 | public: |
| 914 | LargeImageShapes() |
| 915 | : ShapeDataset("Shape", |
| 916 | { |
| 917 | TensorShape{ 1920U, 1080U }, |
| 918 | TensorShape{ 2560U, 1536U }, |
| 919 | TensorShape{ 3584U, 2048U } |
| 920 | }) |
| 921 | { |
| 922 | } |
| 923 | }; |
Giorgio Arena | 7302302 | 2018-09-04 14:55:55 +0100 | [diff] [blame] | 924 | |
| 925 | /** Data set containing small YOLO tensor shapes. */ |
| 926 | class SmallYOLOShapes final : public ShapeDataset |
| 927 | { |
| 928 | public: |
| 929 | SmallYOLOShapes() |
| 930 | : ShapeDataset("Shape", |
| 931 | { |
| 932 | // Batch size 1 |
| 933 | TensorShape{ 11U, 11U, 270U }, |
| 934 | TensorShape{ 27U, 13U, 90U }, |
Gian Marco Iodice | 8e1f3c0 | 2018-09-13 15:56:47 +0100 | [diff] [blame] | 935 | TensorShape{ 13U, 12U, 45U, 2U }, |
Giorgio Arena | 7302302 | 2018-09-04 14:55:55 +0100 | [diff] [blame] | 936 | }) |
| 937 | { |
| 938 | } |
| 939 | }; |
| 940 | |
| 941 | /** Data set containing large YOLO tensor shapes. */ |
| 942 | class LargeYOLOShapes final : public ShapeDataset |
| 943 | { |
| 944 | public: |
| 945 | LargeYOLOShapes() |
| 946 | : ShapeDataset("Shape", |
| 947 | { |
| 948 | TensorShape{ 24U, 23U, 270U }, |
| 949 | TensorShape{ 51U, 63U, 90U, 2U }, |
| 950 | TensorShape{ 76U, 91U, 45U, 3U } |
| 951 | }) |
| 952 | { |
| 953 | } |
| 954 | }; |
Gian Marco Iodice | 5ba5e09 | 2018-12-06 17:13:09 +0000 | [diff] [blame] | 955 | |
| 956 | /** Data set containing small tensor shapes to be used with the GEMM reshaping kernel */ |
| 957 | class SmallGEMMReshape2DShapes final : public ShapeDataset |
| 958 | { |
| 959 | public: |
| 960 | SmallGEMMReshape2DShapes() |
| 961 | : ShapeDataset("Shape", |
| 962 | { |
| 963 | TensorShape{ 63U, 72U }, |
| 964 | }) |
| 965 | { |
| 966 | } |
| 967 | }; |
| 968 | |
| 969 | /** Data set containing small tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */ |
| 970 | class SmallGEMMReshape3DShapes final : public ShapeDataset |
| 971 | { |
| 972 | public: |
| 973 | SmallGEMMReshape3DShapes() |
| 974 | : ShapeDataset("Shape", |
| 975 | { |
| 976 | TensorShape{ 63U, 9U, 8U }, |
| 977 | }) |
| 978 | { |
| 979 | } |
| 980 | }; |
| 981 | |
| 982 | /** Data set containing large tensor shapes to be used with the GEMM reshaping kernel */ |
| 983 | class LargeGEMMReshape2DShapes final : public ShapeDataset |
| 984 | { |
| 985 | public: |
| 986 | LargeGEMMReshape2DShapes() |
| 987 | : ShapeDataset("Shape", |
| 988 | { |
| 989 | TensorShape{ 16U, 27U }, |
| 990 | TensorShape{ 533U, 171U }, |
| 991 | TensorShape{ 345U, 612U } |
| 992 | }) |
| 993 | { |
| 994 | } |
| 995 | }; |
| 996 | |
| 997 | /** Data set containing large tensor shapes to be used with the GEMM reshaping kernel when the input has to be reinterpreted as 3D */ |
| 998 | class LargeGEMMReshape3DShapes final : public ShapeDataset |
| 999 | { |
| 1000 | public: |
| 1001 | LargeGEMMReshape3DShapes() |
| 1002 | : ShapeDataset("Shape", |
| 1003 | { |
| 1004 | TensorShape{ 16U, 3U, 9U }, |
| 1005 | TensorShape{ 533U, 19U, 9U }, |
| 1006 | TensorShape{ 345U, 34U, 18U } |
| 1007 | }) |
| 1008 | { |
| 1009 | } |
| 1010 | }; |
Pablo Tello | e96e4f0 | 2018-12-21 16:47:23 +0000 | [diff] [blame] | 1011 | |
| 1012 | /** Data set containing small 2D tensor shapes. */ |
| 1013 | class Small2DNonMaxSuppressionShapes final : public ShapeDataset |
| 1014 | { |
| 1015 | public: |
| 1016 | Small2DNonMaxSuppressionShapes() |
| 1017 | : ShapeDataset("Shape", |
| 1018 | { |
| 1019 | TensorShape{ 4U, 7U }, |
| 1020 | TensorShape{ 4U, 13U }, |
| 1021 | TensorShape{ 4U, 64U } |
| 1022 | }) |
| 1023 | { |
| 1024 | } |
| 1025 | }; |
| 1026 | |
| 1027 | /** Data set containing large 2D tensor shapes. */ |
| 1028 | class Large2DNonMaxSuppressionShapes final : public ShapeDataset |
| 1029 | { |
| 1030 | public: |
| 1031 | Large2DNonMaxSuppressionShapes() |
| 1032 | : ShapeDataset("Shape", |
| 1033 | { |
| 1034 | TensorShape{ 4U, 207U }, |
| 1035 | TensorShape{ 4U, 113U }, |
| 1036 | TensorShape{ 4U, 264U } |
| 1037 | }) |
| 1038 | { |
| 1039 | } |
| 1040 | }; |
| 1041 | |
Moritz Pflanzer | f6ad98a | 2017-07-21 17:19:58 +0100 | [diff] [blame] | 1042 | } // namespace datasets |
| 1043 | } // namespace test |
| 1044 | } // namespace arm_compute |
| 1045 | #endif /* __ARM_COMPUTE_TEST_SHAPE_DATASETS_H__ */ |