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