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