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