| 1 | // Copyright 2020 Google LLC |
| 2 | // |
| 3 | // This source code is licensed under the BSD-style license found in the |
| 4 | // LICENSE file in the root directory of this source tree. |
| 5 | // |
| 6 | // Auto-generated file. Do not edit! |
| 7 | |
| 8 | #include "xnnpack.h" |
| 9 | |
| 10 | #include <algorithm> |
| 11 | #include <array> |
| 12 | #include <cstddef> |
| 13 | #include <cstdint> |
| 14 | #include <functional> |
| 15 | #include <iostream> |
| 16 | #include <limits> |
| 17 | #include <random> |
| 18 | |
| 19 | #include "xnnpack.h" |
| 20 | |
| 21 | // align a size up to XNN_EXTRA_BYTES |
| 22 | #define XNN_PAD_EXTRA_BYTES(s, t) (((s) + XNN_EXTRA_BYTES / sizeof(t) - 1) & ~(XNN_EXTRA_BYTES / sizeof(t) - 1)) |
| 23 | |
| 24 | namespace models { |
| 25 | |
| 26 | xnn_subgraph_t QS8MobileNetV2() { |
| 27 | xnn_status status; |
| 28 | xnn_subgraph_t subgraph = nullptr; |
| 29 | status = xnn_create_subgraph(/*num_external_values=*/2, 0, &subgraph); |
| 30 | if (status != xnn_status_success) { |
| 31 | std::cerr << "failed to create subgrpah" << std::endl; |
| 32 | return nullptr; |
| 33 | } |
| 34 | |
| 35 | std::random_device random_device; |
| 36 | auto rng = std::mt19937(random_device()); |
| 37 | |
| 38 | uint32_t v0 = XNN_INVALID_VALUE_ID; |
| 39 | std::array<size_t, 4> v0_dims = {{1, 224, 224, 3}}; |
| 40 | status = xnn_define_tensor_value( |
| 41 | subgraph, xnn_datatype_fp32, |
| 42 | v0_dims.size(), v0_dims.data(), |
| 43 | /*data=*/nullptr, |
| 44 | 0, XNN_VALUE_FLAG_EXTERNAL_INPUT, &v0); |
| 45 | if (status != xnn_status_success) { |
| 46 | std::cerr << "failed to create tensor v0" << std::endl; |
| 47 | return nullptr; |
| 48 | } |
| 49 | |
| 50 | uint32_t v1 = XNN_INVALID_VALUE_ID; |
| 51 | std::array<size_t, 4> v1_dims = {{1, 224, 224, 3}}; |
| 52 | status = xnn_define_quantized_tensor_value( |
| 53 | subgraph, xnn_datatype_qint8, |
| 54 | /*zero_point=*/-14, |
| 55 | /*scale=*/0.01865844801068306f, |
| 56 | v1_dims.size(), v1_dims.data(), |
| 57 | /*data=*/nullptr, |
| 58 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v1); |
| 59 | if (status != xnn_status_success) { |
| 60 | std::cerr << "failed to create tensor v1" << std::endl; |
| 61 | return nullptr; |
| 62 | } |
| 63 | |
| 64 | uint32_t v2 = XNN_INVALID_VALUE_ID; |
| 65 | std::array<size_t, 4> v2_dims = {{1, 112, 112, 32}}; |
| 66 | status = xnn_define_quantized_tensor_value( |
| 67 | subgraph, xnn_datatype_qint8, |
| 68 | /*zero_point=*/-128, |
| 69 | /*scale=*/0.0235294122248888f, |
| 70 | v2_dims.size(), v2_dims.data(), |
| 71 | /*data=*/nullptr, |
| 72 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v2); |
| 73 | if (status != xnn_status_success) { |
| 74 | std::cerr << "failed to create tensor v2" << std::endl; |
| 75 | return nullptr; |
| 76 | } |
| 77 | |
| 78 | uint32_t v3 = XNN_INVALID_VALUE_ID; |
| 79 | std::array<size_t, 4> v3_dims = {{1, 112, 112, 32}}; |
| 80 | status = xnn_define_quantized_tensor_value( |
| 81 | subgraph, xnn_datatype_qint8, |
| 82 | /*zero_point=*/-128, |
| 83 | /*scale=*/0.0235294122248888f, |
| 84 | v3_dims.size(), v3_dims.data(), |
| 85 | /*data=*/nullptr, |
| 86 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v3); |
| 87 | if (status != xnn_status_success) { |
| 88 | std::cerr << "failed to create tensor v3" << std::endl; |
| 89 | return nullptr; |
| 90 | } |
| 91 | |
| 92 | uint32_t v4 = XNN_INVALID_VALUE_ID; |
| 93 | std::array<size_t, 4> v4_dims = {{1, 112, 112, 16}}; |
| 94 | status = xnn_define_quantized_tensor_value( |
| 95 | subgraph, xnn_datatype_qint8, |
| 96 | /*zero_point=*/-6, |
| 97 | /*scale=*/0.3295263648033142f, |
| 98 | v4_dims.size(), v4_dims.data(), |
| 99 | /*data=*/nullptr, |
| 100 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v4); |
| 101 | if (status != xnn_status_success) { |
| 102 | std::cerr << "failed to create tensor v4" << std::endl; |
| 103 | return nullptr; |
| 104 | } |
| 105 | |
| 106 | uint32_t v5 = XNN_INVALID_VALUE_ID; |
| 107 | std::array<size_t, 4> v5_dims = {{1, 112, 112, 96}}; |
| 108 | status = xnn_define_quantized_tensor_value( |
| 109 | subgraph, xnn_datatype_qint8, |
| 110 | /*zero_point=*/-128, |
| 111 | /*scale=*/0.0235294122248888f, |
| 112 | v5_dims.size(), v5_dims.data(), |
| 113 | /*data=*/nullptr, |
| 114 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v5); |
| 115 | if (status != xnn_status_success) { |
| 116 | std::cerr << "failed to create tensor v5" << std::endl; |
| 117 | return nullptr; |
| 118 | } |
| 119 | |
| 120 | uint32_t v6 = XNN_INVALID_VALUE_ID; |
| 121 | std::array<size_t, 4> v6_dims = {{1, 56, 56, 96}}; |
| 122 | status = xnn_define_quantized_tensor_value( |
| 123 | subgraph, xnn_datatype_qint8, |
| 124 | /*zero_point=*/-128, |
| 125 | /*scale=*/0.0235294122248888f, |
| 126 | v6_dims.size(), v6_dims.data(), |
| 127 | /*data=*/nullptr, |
| 128 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v6); |
| 129 | if (status != xnn_status_success) { |
| 130 | std::cerr << "failed to create tensor v6" << std::endl; |
| 131 | return nullptr; |
| 132 | } |
| 133 | |
| 134 | uint32_t v7 = XNN_INVALID_VALUE_ID; |
| 135 | std::array<size_t, 4> v7_dims = {{1, 56, 56, 24}}; |
| 136 | status = xnn_define_quantized_tensor_value( |
| 137 | subgraph, xnn_datatype_qint8, |
| 138 | /*zero_point=*/1, |
| 139 | /*scale=*/0.26354169845581055f, |
| 140 | v7_dims.size(), v7_dims.data(), |
| 141 | /*data=*/nullptr, |
| 142 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v7); |
| 143 | if (status != xnn_status_success) { |
| 144 | std::cerr << "failed to create tensor v7" << std::endl; |
| 145 | return nullptr; |
| 146 | } |
| 147 | |
| 148 | uint32_t v8 = XNN_INVALID_VALUE_ID; |
| 149 | std::array<size_t, 4> v8_dims = {{1, 56, 56, 144}}; |
| 150 | status = xnn_define_quantized_tensor_value( |
| 151 | subgraph, xnn_datatype_qint8, |
| 152 | /*zero_point=*/-128, |
| 153 | /*scale=*/0.0235294122248888f, |
| 154 | v8_dims.size(), v8_dims.data(), |
| 155 | /*data=*/nullptr, |
| 156 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v8); |
| 157 | if (status != xnn_status_success) { |
| 158 | std::cerr << "failed to create tensor v8" << std::endl; |
| 159 | return nullptr; |
| 160 | } |
| 161 | |
| 162 | uint32_t v9 = XNN_INVALID_VALUE_ID; |
| 163 | std::array<size_t, 4> v9_dims = {{1, 56, 56, 144}}; |
| 164 | status = xnn_define_quantized_tensor_value( |
| 165 | subgraph, xnn_datatype_qint8, |
| 166 | /*zero_point=*/-128, |
| 167 | /*scale=*/0.0235294122248888f, |
| 168 | v9_dims.size(), v9_dims.data(), |
| 169 | /*data=*/nullptr, |
| 170 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v9); |
| 171 | if (status != xnn_status_success) { |
| 172 | std::cerr << "failed to create tensor v9" << std::endl; |
| 173 | return nullptr; |
| 174 | } |
| 175 | |
| 176 | uint32_t v10 = XNN_INVALID_VALUE_ID; |
| 177 | std::array<size_t, 4> v10_dims = {{1, 56, 56, 24}}; |
| 178 | status = xnn_define_quantized_tensor_value( |
| 179 | subgraph, xnn_datatype_qint8, |
| 180 | /*zero_point=*/-1, |
| 181 | /*scale=*/0.361392080783844f, |
| 182 | v10_dims.size(), v10_dims.data(), |
| 183 | /*data=*/nullptr, |
| 184 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v10); |
| 185 | if (status != xnn_status_success) { |
| 186 | std::cerr << "failed to create tensor v10" << std::endl; |
| 187 | return nullptr; |
| 188 | } |
| 189 | |
| 190 | uint32_t v11 = XNN_INVALID_VALUE_ID; |
| 191 | std::array<size_t, 4> v11_dims = {{1, 56, 56, 24}}; |
| 192 | status = xnn_define_quantized_tensor_value( |
| 193 | subgraph, xnn_datatype_qint8, |
| 194 | /*zero_point=*/5, |
| 195 | /*scale=*/0.39553302526474f, |
| 196 | v11_dims.size(), v11_dims.data(), |
| 197 | /*data=*/nullptr, |
| 198 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v11); |
| 199 | if (status != xnn_status_success) { |
| 200 | std::cerr << "failed to create tensor v11" << std::endl; |
| 201 | return nullptr; |
| 202 | } |
| 203 | |
| 204 | uint32_t v12 = XNN_INVALID_VALUE_ID; |
| 205 | std::array<size_t, 4> v12_dims = {{1, 56, 56, 144}}; |
| 206 | status = xnn_define_quantized_tensor_value( |
| 207 | subgraph, xnn_datatype_qint8, |
| 208 | /*zero_point=*/-128, |
| 209 | /*scale=*/0.0235294122248888f, |
| 210 | v12_dims.size(), v12_dims.data(), |
| 211 | /*data=*/nullptr, |
| 212 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v12); |
| 213 | if (status != xnn_status_success) { |
| 214 | std::cerr << "failed to create tensor v12" << std::endl; |
| 215 | return nullptr; |
| 216 | } |
| 217 | |
| 218 | uint32_t v13 = XNN_INVALID_VALUE_ID; |
| 219 | std::array<size_t, 4> v13_dims = {{1, 28, 28, 144}}; |
| 220 | status = xnn_define_quantized_tensor_value( |
| 221 | subgraph, xnn_datatype_qint8, |
| 222 | /*zero_point=*/-128, |
| 223 | /*scale=*/0.0235294122248888f, |
| 224 | v13_dims.size(), v13_dims.data(), |
| 225 | /*data=*/nullptr, |
| 226 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v13); |
| 227 | if (status != xnn_status_success) { |
| 228 | std::cerr << "failed to create tensor v13" << std::endl; |
| 229 | return nullptr; |
| 230 | } |
| 231 | |
| 232 | uint32_t v14 = XNN_INVALID_VALUE_ID; |
| 233 | std::array<size_t, 4> v14_dims = {{1, 28, 28, 32}}; |
| 234 | status = xnn_define_quantized_tensor_value( |
| 235 | subgraph, xnn_datatype_qint8, |
| 236 | /*zero_point=*/1, |
| 237 | /*scale=*/0.24222400784492493f, |
| 238 | v14_dims.size(), v14_dims.data(), |
| 239 | /*data=*/nullptr, |
| 240 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v14); |
| 241 | if (status != xnn_status_success) { |
| 242 | std::cerr << "failed to create tensor v14" << std::endl; |
| 243 | return nullptr; |
| 244 | } |
| 245 | |
| 246 | uint32_t v15 = XNN_INVALID_VALUE_ID; |
| 247 | std::array<size_t, 4> v15_dims = {{1, 28, 28, 192}}; |
| 248 | status = xnn_define_quantized_tensor_value( |
| 249 | subgraph, xnn_datatype_qint8, |
| 250 | /*zero_point=*/-128, |
| 251 | /*scale=*/0.0235294122248888f, |
| 252 | v15_dims.size(), v15_dims.data(), |
| 253 | /*data=*/nullptr, |
| 254 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v15); |
| 255 | if (status != xnn_status_success) { |
| 256 | std::cerr << "failed to create tensor v15" << std::endl; |
| 257 | return nullptr; |
| 258 | } |
| 259 | |
| 260 | uint32_t v16 = XNN_INVALID_VALUE_ID; |
| 261 | std::array<size_t, 4> v16_dims = {{1, 28, 28, 192}}; |
| 262 | status = xnn_define_quantized_tensor_value( |
| 263 | subgraph, xnn_datatype_qint8, |
| 264 | /*zero_point=*/-128, |
| 265 | /*scale=*/0.0235294122248888f, |
| 266 | v16_dims.size(), v16_dims.data(), |
| 267 | /*data=*/nullptr, |
| 268 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v16); |
| 269 | if (status != xnn_status_success) { |
| 270 | std::cerr << "failed to create tensor v16" << std::endl; |
| 271 | return nullptr; |
| 272 | } |
| 273 | |
| 274 | uint32_t v17 = XNN_INVALID_VALUE_ID; |
| 275 | std::array<size_t, 4> v17_dims = {{1, 28, 28, 32}}; |
| 276 | status = xnn_define_quantized_tensor_value( |
| 277 | subgraph, xnn_datatype_qint8, |
| 278 | /*zero_point=*/-22, |
| 279 | /*scale=*/0.2548377215862274f, |
| 280 | v17_dims.size(), v17_dims.data(), |
| 281 | /*data=*/nullptr, |
| 282 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v17); |
| 283 | if (status != xnn_status_success) { |
| 284 | std::cerr << "failed to create tensor v17" << std::endl; |
| 285 | return nullptr; |
| 286 | } |
| 287 | |
| 288 | uint32_t v18 = XNN_INVALID_VALUE_ID; |
| 289 | std::array<size_t, 4> v18_dims = {{1, 28, 28, 32}}; |
| 290 | status = xnn_define_quantized_tensor_value( |
| 291 | subgraph, xnn_datatype_qint8, |
| 292 | /*zero_point=*/-2, |
| 293 | /*scale=*/0.32090887427330017f, |
| 294 | v18_dims.size(), v18_dims.data(), |
| 295 | /*data=*/nullptr, |
| 296 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v18); |
| 297 | if (status != xnn_status_success) { |
| 298 | std::cerr << "failed to create tensor v18" << std::endl; |
| 299 | return nullptr; |
| 300 | } |
| 301 | |
| 302 | uint32_t v19 = XNN_INVALID_VALUE_ID; |
| 303 | std::array<size_t, 4> v19_dims = {{1, 28, 28, 192}}; |
| 304 | status = xnn_define_quantized_tensor_value( |
| 305 | subgraph, xnn_datatype_qint8, |
| 306 | /*zero_point=*/-128, |
| 307 | /*scale=*/0.0235294122248888f, |
| 308 | v19_dims.size(), v19_dims.data(), |
| 309 | /*data=*/nullptr, |
| 310 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v19); |
| 311 | if (status != xnn_status_success) { |
| 312 | std::cerr << "failed to create tensor v19" << std::endl; |
| 313 | return nullptr; |
| 314 | } |
| 315 | |
| 316 | uint32_t v20 = XNN_INVALID_VALUE_ID; |
| 317 | std::array<size_t, 4> v20_dims = {{1, 28, 28, 192}}; |
| 318 | status = xnn_define_quantized_tensor_value( |
| 319 | subgraph, xnn_datatype_qint8, |
| 320 | /*zero_point=*/-128, |
| 321 | /*scale=*/0.0235294122248888f, |
| 322 | v20_dims.size(), v20_dims.data(), |
| 323 | /*data=*/nullptr, |
| 324 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v20); |
| 325 | if (status != xnn_status_success) { |
| 326 | std::cerr << "failed to create tensor v20" << std::endl; |
| 327 | return nullptr; |
| 328 | } |
| 329 | |
| 330 | uint32_t v21 = XNN_INVALID_VALUE_ID; |
| 331 | std::array<size_t, 4> v21_dims = {{1, 28, 28, 32}}; |
| 332 | status = xnn_define_quantized_tensor_value( |
| 333 | subgraph, xnn_datatype_qint8, |
| 334 | /*zero_point=*/0, |
| 335 | /*scale=*/0.22142209112644196f, |
| 336 | v21_dims.size(), v21_dims.data(), |
| 337 | /*data=*/nullptr, |
| 338 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v21); |
| 339 | if (status != xnn_status_success) { |
| 340 | std::cerr << "failed to create tensor v21" << std::endl; |
| 341 | return nullptr; |
| 342 | } |
| 343 | |
| 344 | uint32_t v22 = XNN_INVALID_VALUE_ID; |
| 345 | std::array<size_t, 4> v22_dims = {{1, 28, 28, 32}}; |
| 346 | status = xnn_define_quantized_tensor_value( |
| 347 | subgraph, xnn_datatype_qint8, |
| 348 | /*zero_point=*/-1, |
| 349 | /*scale=*/0.3504160940647125f, |
| 350 | v22_dims.size(), v22_dims.data(), |
| 351 | /*data=*/nullptr, |
| 352 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v22); |
| 353 | if (status != xnn_status_success) { |
| 354 | std::cerr << "failed to create tensor v22" << std::endl; |
| 355 | return nullptr; |
| 356 | } |
| 357 | |
| 358 | uint32_t v23 = XNN_INVALID_VALUE_ID; |
| 359 | std::array<size_t, 4> v23_dims = {{1, 28, 28, 192}}; |
| 360 | status = xnn_define_quantized_tensor_value( |
| 361 | subgraph, xnn_datatype_qint8, |
| 362 | /*zero_point=*/-128, |
| 363 | /*scale=*/0.0235294122248888f, |
| 364 | v23_dims.size(), v23_dims.data(), |
| 365 | /*data=*/nullptr, |
| 366 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v23); |
| 367 | if (status != xnn_status_success) { |
| 368 | std::cerr << "failed to create tensor v23" << std::endl; |
| 369 | return nullptr; |
| 370 | } |
| 371 | |
| 372 | uint32_t v24 = XNN_INVALID_VALUE_ID; |
| 373 | std::array<size_t, 4> v24_dims = {{1, 14, 14, 192}}; |
| 374 | status = xnn_define_quantized_tensor_value( |
| 375 | subgraph, xnn_datatype_qint8, |
| 376 | /*zero_point=*/-128, |
| 377 | /*scale=*/0.0235294122248888f, |
| 378 | v24_dims.size(), v24_dims.data(), |
| 379 | /*data=*/nullptr, |
| 380 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v24); |
| 381 | if (status != xnn_status_success) { |
| 382 | std::cerr << "failed to create tensor v24" << std::endl; |
| 383 | return nullptr; |
| 384 | } |
| 385 | |
| 386 | uint32_t v25 = XNN_INVALID_VALUE_ID; |
| 387 | std::array<size_t, 4> v25_dims = {{1, 14, 14, 64}}; |
| 388 | status = xnn_define_quantized_tensor_value( |
| 389 | subgraph, xnn_datatype_qint8, |
| 390 | /*zero_point=*/-5, |
| 391 | /*scale=*/0.1933557689189911f, |
| 392 | v25_dims.size(), v25_dims.data(), |
| 393 | /*data=*/nullptr, |
| 394 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v25); |
| 395 | if (status != xnn_status_success) { |
| 396 | std::cerr << "failed to create tensor v25" << std::endl; |
| 397 | return nullptr; |
| 398 | } |
| 399 | |
| 400 | uint32_t v26 = XNN_INVALID_VALUE_ID; |
| 401 | std::array<size_t, 4> v26_dims = {{1, 14, 14, 384}}; |
| 402 | status = xnn_define_quantized_tensor_value( |
| 403 | subgraph, xnn_datatype_qint8, |
| 404 | /*zero_point=*/-128, |
| 405 | /*scale=*/0.0235294122248888f, |
| 406 | v26_dims.size(), v26_dims.data(), |
| 407 | /*data=*/nullptr, |
| 408 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v26); |
| 409 | if (status != xnn_status_success) { |
| 410 | std::cerr << "failed to create tensor v26" << std::endl; |
| 411 | return nullptr; |
| 412 | } |
| 413 | |
| 414 | uint32_t v27 = XNN_INVALID_VALUE_ID; |
| 415 | std::array<size_t, 4> v27_dims = {{1, 14, 14, 384}}; |
| 416 | status = xnn_define_quantized_tensor_value( |
| 417 | subgraph, xnn_datatype_qint8, |
| 418 | /*zero_point=*/-128, |
| 419 | /*scale=*/0.0235294122248888f, |
| 420 | v27_dims.size(), v27_dims.data(), |
| 421 | /*data=*/nullptr, |
| 422 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v27); |
| 423 | if (status != xnn_status_success) { |
| 424 | std::cerr << "failed to create tensor v27" << std::endl; |
| 425 | return nullptr; |
| 426 | } |
| 427 | |
| 428 | uint32_t v28 = XNN_INVALID_VALUE_ID; |
| 429 | std::array<size_t, 4> v28_dims = {{1, 14, 14, 64}}; |
| 430 | status = xnn_define_quantized_tensor_value( |
| 431 | subgraph, xnn_datatype_qint8, |
| 432 | /*zero_point=*/-14, |
| 433 | /*scale=*/0.17820045351982117f, |
| 434 | v28_dims.size(), v28_dims.data(), |
| 435 | /*data=*/nullptr, |
| 436 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v28); |
| 437 | if (status != xnn_status_success) { |
| 438 | std::cerr << "failed to create tensor v28" << std::endl; |
| 439 | return nullptr; |
| 440 | } |
| 441 | |
| 442 | uint32_t v29 = XNN_INVALID_VALUE_ID; |
| 443 | std::array<size_t, 4> v29_dims = {{1, 14, 14, 64}}; |
| 444 | status = xnn_define_quantized_tensor_value( |
| 445 | subgraph, xnn_datatype_qint8, |
| 446 | /*zero_point=*/-3, |
| 447 | /*scale=*/0.2269556224346161f, |
| 448 | v29_dims.size(), v29_dims.data(), |
| 449 | /*data=*/nullptr, |
| 450 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v29); |
| 451 | if (status != xnn_status_success) { |
| 452 | std::cerr << "failed to create tensor v29" << std::endl; |
| 453 | return nullptr; |
| 454 | } |
| 455 | |
| 456 | uint32_t v30 = XNN_INVALID_VALUE_ID; |
| 457 | std::array<size_t, 4> v30_dims = {{1, 14, 14, 384}}; |
| 458 | status = xnn_define_quantized_tensor_value( |
| 459 | subgraph, xnn_datatype_qint8, |
| 460 | /*zero_point=*/-128, |
| 461 | /*scale=*/0.0235294122248888f, |
| 462 | v30_dims.size(), v30_dims.data(), |
| 463 | /*data=*/nullptr, |
| 464 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v30); |
| 465 | if (status != xnn_status_success) { |
| 466 | std::cerr << "failed to create tensor v30" << std::endl; |
| 467 | return nullptr; |
| 468 | } |
| 469 | |
| 470 | uint32_t v31 = XNN_INVALID_VALUE_ID; |
| 471 | std::array<size_t, 4> v31_dims = {{1, 14, 14, 384}}; |
| 472 | status = xnn_define_quantized_tensor_value( |
| 473 | subgraph, xnn_datatype_qint8, |
| 474 | /*zero_point=*/-128, |
| 475 | /*scale=*/0.0235294122248888f, |
| 476 | v31_dims.size(), v31_dims.data(), |
| 477 | /*data=*/nullptr, |
| 478 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v31); |
| 479 | if (status != xnn_status_success) { |
| 480 | std::cerr << "failed to create tensor v31" << std::endl; |
| 481 | return nullptr; |
| 482 | } |
| 483 | |
| 484 | uint32_t v32 = XNN_INVALID_VALUE_ID; |
| 485 | std::array<size_t, 4> v32_dims = {{1, 14, 14, 64}}; |
| 486 | status = xnn_define_quantized_tensor_value( |
| 487 | subgraph, xnn_datatype_qint8, |
| 488 | /*zero_point=*/4, |
| 489 | /*scale=*/0.13266333937644958f, |
| 490 | v32_dims.size(), v32_dims.data(), |
| 491 | /*data=*/nullptr, |
| 492 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v32); |
| 493 | if (status != xnn_status_success) { |
| 494 | std::cerr << "failed to create tensor v32" << std::endl; |
| 495 | return nullptr; |
| 496 | } |
| 497 | |
| 498 | uint32_t v33 = XNN_INVALID_VALUE_ID; |
| 499 | std::array<size_t, 4> v33_dims = {{1, 14, 14, 64}}; |
| 500 | status = xnn_define_quantized_tensor_value( |
| 501 | subgraph, xnn_datatype_qint8, |
| 502 | /*zero_point=*/-4, |
| 503 | /*scale=*/0.24267108738422394f, |
| 504 | v33_dims.size(), v33_dims.data(), |
| 505 | /*data=*/nullptr, |
| 506 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v33); |
| 507 | if (status != xnn_status_success) { |
| 508 | std::cerr << "failed to create tensor v33" << std::endl; |
| 509 | return nullptr; |
| 510 | } |
| 511 | |
| 512 | uint32_t v34 = XNN_INVALID_VALUE_ID; |
| 513 | std::array<size_t, 4> v34_dims = {{1, 14, 14, 384}}; |
| 514 | status = xnn_define_quantized_tensor_value( |
| 515 | subgraph, xnn_datatype_qint8, |
| 516 | /*zero_point=*/-128, |
| 517 | /*scale=*/0.0235294122248888f, |
| 518 | v34_dims.size(), v34_dims.data(), |
| 519 | /*data=*/nullptr, |
| 520 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v34); |
| 521 | if (status != xnn_status_success) { |
| 522 | std::cerr << "failed to create tensor v34" << std::endl; |
| 523 | return nullptr; |
| 524 | } |
| 525 | |
| 526 | uint32_t v35 = XNN_INVALID_VALUE_ID; |
| 527 | std::array<size_t, 4> v35_dims = {{1, 14, 14, 384}}; |
| 528 | status = xnn_define_quantized_tensor_value( |
| 529 | subgraph, xnn_datatype_qint8, |
| 530 | /*zero_point=*/-128, |
| 531 | /*scale=*/0.0235294122248888f, |
| 532 | v35_dims.size(), v35_dims.data(), |
| 533 | /*data=*/nullptr, |
| 534 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v35); |
| 535 | if (status != xnn_status_success) { |
| 536 | std::cerr << "failed to create tensor v35" << std::endl; |
| 537 | return nullptr; |
| 538 | } |
| 539 | |
| 540 | uint32_t v36 = XNN_INVALID_VALUE_ID; |
| 541 | std::array<size_t, 4> v36_dims = {{1, 14, 14, 64}}; |
| 542 | status = xnn_define_quantized_tensor_value( |
| 543 | subgraph, xnn_datatype_qint8, |
| 544 | /*zero_point=*/-5, |
| 545 | /*scale=*/0.143711119890213f, |
| 546 | v36_dims.size(), v36_dims.data(), |
| 547 | /*data=*/nullptr, |
| 548 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v36); |
| 549 | if (status != xnn_status_success) { |
| 550 | std::cerr << "failed to create tensor v36" << std::endl; |
| 551 | return nullptr; |
| 552 | } |
| 553 | |
| 554 | uint32_t v37 = XNN_INVALID_VALUE_ID; |
| 555 | std::array<size_t, 4> v37_dims = {{1, 14, 14, 64}}; |
| 556 | status = xnn_define_quantized_tensor_value( |
| 557 | subgraph, xnn_datatype_qint8, |
| 558 | /*zero_point=*/-3, |
| 559 | /*scale=*/0.24989819526672363f, |
| 560 | v37_dims.size(), v37_dims.data(), |
| 561 | /*data=*/nullptr, |
| 562 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v37); |
| 563 | if (status != xnn_status_success) { |
| 564 | std::cerr << "failed to create tensor v37" << std::endl; |
| 565 | return nullptr; |
| 566 | } |
| 567 | |
| 568 | uint32_t v38 = XNN_INVALID_VALUE_ID; |
| 569 | std::array<size_t, 4> v38_dims = {{1, 14, 14, 384}}; |
| 570 | status = xnn_define_quantized_tensor_value( |
| 571 | subgraph, xnn_datatype_qint8, |
| 572 | /*zero_point=*/-128, |
| 573 | /*scale=*/0.0235294122248888f, |
| 574 | v38_dims.size(), v38_dims.data(), |
| 575 | /*data=*/nullptr, |
| 576 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v38); |
| 577 | if (status != xnn_status_success) { |
| 578 | std::cerr << "failed to create tensor v38" << std::endl; |
| 579 | return nullptr; |
| 580 | } |
| 581 | |
| 582 | uint32_t v39 = XNN_INVALID_VALUE_ID; |
| 583 | std::array<size_t, 4> v39_dims = {{1, 14, 14, 384}}; |
| 584 | status = xnn_define_quantized_tensor_value( |
| 585 | subgraph, xnn_datatype_qint8, |
| 586 | /*zero_point=*/-128, |
| 587 | /*scale=*/0.0235294122248888f, |
| 588 | v39_dims.size(), v39_dims.data(), |
| 589 | /*data=*/nullptr, |
| 590 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v39); |
| 591 | if (status != xnn_status_success) { |
| 592 | std::cerr << "failed to create tensor v39" << std::endl; |
| 593 | return nullptr; |
| 594 | } |
| 595 | |
| 596 | uint32_t v40 = XNN_INVALID_VALUE_ID; |
| 597 | std::array<size_t, 4> v40_dims = {{1, 14, 14, 96}}; |
| 598 | status = xnn_define_quantized_tensor_value( |
| 599 | subgraph, xnn_datatype_qint8, |
| 600 | /*zero_point=*/-3, |
| 601 | /*scale=*/0.199631929397583f, |
| 602 | v40_dims.size(), v40_dims.data(), |
| 603 | /*data=*/nullptr, |
| 604 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v40); |
| 605 | if (status != xnn_status_success) { |
| 606 | std::cerr << "failed to create tensor v40" << std::endl; |
| 607 | return nullptr; |
| 608 | } |
| 609 | |
| 610 | uint32_t v41 = XNN_INVALID_VALUE_ID; |
| 611 | std::array<size_t, 4> v41_dims = {{1, 14, 14, 576}}; |
| 612 | status = xnn_define_quantized_tensor_value( |
| 613 | subgraph, xnn_datatype_qint8, |
| 614 | /*zero_point=*/-128, |
| 615 | /*scale=*/0.0235294122248888f, |
| 616 | v41_dims.size(), v41_dims.data(), |
| 617 | /*data=*/nullptr, |
| 618 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v41); |
| 619 | if (status != xnn_status_success) { |
| 620 | std::cerr << "failed to create tensor v41" << std::endl; |
| 621 | return nullptr; |
| 622 | } |
| 623 | |
| 624 | uint32_t v42 = XNN_INVALID_VALUE_ID; |
| 625 | std::array<size_t, 4> v42_dims = {{1, 14, 14, 576}}; |
| 626 | status = xnn_define_quantized_tensor_value( |
| 627 | subgraph, xnn_datatype_qint8, |
| 628 | /*zero_point=*/-128, |
| 629 | /*scale=*/0.0235294122248888f, |
| 630 | v42_dims.size(), v42_dims.data(), |
| 631 | /*data=*/nullptr, |
| 632 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v42); |
| 633 | if (status != xnn_status_success) { |
| 634 | std::cerr << "failed to create tensor v42" << std::endl; |
| 635 | return nullptr; |
| 636 | } |
| 637 | |
| 638 | uint32_t v43 = XNN_INVALID_VALUE_ID; |
| 639 | std::array<size_t, 4> v43_dims = {{1, 14, 14, 96}}; |
| 640 | status = xnn_define_quantized_tensor_value( |
| 641 | subgraph, xnn_datatype_qint8, |
| 642 | /*zero_point=*/-5, |
| 643 | /*scale=*/0.1339312046766281f, |
| 644 | v43_dims.size(), v43_dims.data(), |
| 645 | /*data=*/nullptr, |
| 646 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v43); |
| 647 | if (status != xnn_status_success) { |
| 648 | std::cerr << "failed to create tensor v43" << std::endl; |
| 649 | return nullptr; |
| 650 | } |
| 651 | |
| 652 | uint32_t v44 = XNN_INVALID_VALUE_ID; |
| 653 | std::array<size_t, 4> v44_dims = {{1, 14, 14, 96}}; |
| 654 | status = xnn_define_quantized_tensor_value( |
| 655 | subgraph, xnn_datatype_qint8, |
| 656 | /*zero_point=*/-3, |
| 657 | /*scale=*/0.2115112543106079f, |
| 658 | v44_dims.size(), v44_dims.data(), |
| 659 | /*data=*/nullptr, |
| 660 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v44); |
| 661 | if (status != xnn_status_success) { |
| 662 | std::cerr << "failed to create tensor v44" << std::endl; |
| 663 | return nullptr; |
| 664 | } |
| 665 | |
| 666 | uint32_t v45 = XNN_INVALID_VALUE_ID; |
| 667 | std::array<size_t, 4> v45_dims = {{1, 14, 14, 576}}; |
| 668 | status = xnn_define_quantized_tensor_value( |
| 669 | subgraph, xnn_datatype_qint8, |
| 670 | /*zero_point=*/-128, |
| 671 | /*scale=*/0.0235294122248888f, |
| 672 | v45_dims.size(), v45_dims.data(), |
| 673 | /*data=*/nullptr, |
| 674 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v45); |
| 675 | if (status != xnn_status_success) { |
| 676 | std::cerr << "failed to create tensor v45" << std::endl; |
| 677 | return nullptr; |
| 678 | } |
| 679 | |
| 680 | uint32_t v46 = XNN_INVALID_VALUE_ID; |
| 681 | std::array<size_t, 4> v46_dims = {{1, 14, 14, 576}}; |
| 682 | status = xnn_define_quantized_tensor_value( |
| 683 | subgraph, xnn_datatype_qint8, |
| 684 | /*zero_point=*/-128, |
| 685 | /*scale=*/0.0235294122248888f, |
| 686 | v46_dims.size(), v46_dims.data(), |
| 687 | /*data=*/nullptr, |
| 688 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v46); |
| 689 | if (status != xnn_status_success) { |
| 690 | std::cerr << "failed to create tensor v46" << std::endl; |
| 691 | return nullptr; |
| 692 | } |
| 693 | |
| 694 | uint32_t v47 = XNN_INVALID_VALUE_ID; |
| 695 | std::array<size_t, 4> v47_dims = {{1, 14, 14, 96}}; |
| 696 | status = xnn_define_quantized_tensor_value( |
| 697 | subgraph, xnn_datatype_qint8, |
| 698 | /*zero_point=*/13, |
| 699 | /*scale=*/0.20608632266521454f, |
| 700 | v47_dims.size(), v47_dims.data(), |
| 701 | /*data=*/nullptr, |
| 702 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v47); |
| 703 | if (status != xnn_status_success) { |
| 704 | std::cerr << "failed to create tensor v47" << std::endl; |
| 705 | return nullptr; |
| 706 | } |
| 707 | |
| 708 | uint32_t v48 = XNN_INVALID_VALUE_ID; |
| 709 | std::array<size_t, 4> v48_dims = {{1, 14, 14, 96}}; |
| 710 | status = xnn_define_quantized_tensor_value( |
| 711 | subgraph, xnn_datatype_qint8, |
| 712 | /*zero_point=*/4, |
| 713 | /*scale=*/0.2694852650165558f, |
| 714 | v48_dims.size(), v48_dims.data(), |
| 715 | /*data=*/nullptr, |
| 716 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v48); |
| 717 | if (status != xnn_status_success) { |
| 718 | std::cerr << "failed to create tensor v48" << std::endl; |
| 719 | return nullptr; |
| 720 | } |
| 721 | |
| 722 | uint32_t v49 = XNN_INVALID_VALUE_ID; |
| 723 | std::array<size_t, 4> v49_dims = {{1, 14, 14, 576}}; |
| 724 | status = xnn_define_quantized_tensor_value( |
| 725 | subgraph, xnn_datatype_qint8, |
| 726 | /*zero_point=*/-128, |
| 727 | /*scale=*/0.0235294122248888f, |
| 728 | v49_dims.size(), v49_dims.data(), |
| 729 | /*data=*/nullptr, |
| 730 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v49); |
| 731 | if (status != xnn_status_success) { |
| 732 | std::cerr << "failed to create tensor v49" << std::endl; |
| 733 | return nullptr; |
| 734 | } |
| 735 | |
| 736 | uint32_t v50 = XNN_INVALID_VALUE_ID; |
| 737 | std::array<size_t, 4> v50_dims = {{1, 7, 7, 576}}; |
| 738 | status = xnn_define_quantized_tensor_value( |
| 739 | subgraph, xnn_datatype_qint8, |
| 740 | /*zero_point=*/-128, |
| 741 | /*scale=*/0.0235294122248888f, |
| 742 | v50_dims.size(), v50_dims.data(), |
| 743 | /*data=*/nullptr, |
| 744 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v50); |
| 745 | if (status != xnn_status_success) { |
| 746 | std::cerr << "failed to create tensor v50" << std::endl; |
| 747 | return nullptr; |
| 748 | } |
| 749 | |
| 750 | uint32_t v51 = XNN_INVALID_VALUE_ID; |
| 751 | std::array<size_t, 4> v51_dims = {{1, 7, 7, 160}}; |
| 752 | status = xnn_define_quantized_tensor_value( |
| 753 | subgraph, xnn_datatype_qint8, |
| 754 | /*zero_point=*/-3, |
| 755 | /*scale=*/0.15931324660778046f, |
| 756 | v51_dims.size(), v51_dims.data(), |
| 757 | /*data=*/nullptr, |
| 758 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v51); |
| 759 | if (status != xnn_status_success) { |
| 760 | std::cerr << "failed to create tensor v51" << std::endl; |
| 761 | return nullptr; |
| 762 | } |
| 763 | |
| 764 | uint32_t v52 = XNN_INVALID_VALUE_ID; |
| 765 | std::array<size_t, 4> v52_dims = {{1, 7, 7, 960}}; |
| 766 | status = xnn_define_quantized_tensor_value( |
| 767 | subgraph, xnn_datatype_qint8, |
| 768 | /*zero_point=*/-128, |
| 769 | /*scale=*/0.0235294122248888f, |
| 770 | v52_dims.size(), v52_dims.data(), |
| 771 | /*data=*/nullptr, |
| 772 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v52); |
| 773 | if (status != xnn_status_success) { |
| 774 | std::cerr << "failed to create tensor v52" << std::endl; |
| 775 | return nullptr; |
| 776 | } |
| 777 | |
| 778 | uint32_t v53 = XNN_INVALID_VALUE_ID; |
| 779 | std::array<size_t, 4> v53_dims = {{1, 7, 7, 960}}; |
| 780 | status = xnn_define_quantized_tensor_value( |
| 781 | subgraph, xnn_datatype_qint8, |
| 782 | /*zero_point=*/-128, |
| 783 | /*scale=*/0.0235294122248888f, |
| 784 | v53_dims.size(), v53_dims.data(), |
| 785 | /*data=*/nullptr, |
| 786 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v53); |
| 787 | if (status != xnn_status_success) { |
| 788 | std::cerr << "failed to create tensor v53" << std::endl; |
| 789 | return nullptr; |
| 790 | } |
| 791 | |
| 792 | uint32_t v54 = XNN_INVALID_VALUE_ID; |
| 793 | std::array<size_t, 4> v54_dims = {{1, 7, 7, 160}}; |
| 794 | status = xnn_define_quantized_tensor_value( |
| 795 | subgraph, xnn_datatype_qint8, |
| 796 | /*zero_point=*/1, |
| 797 | /*scale=*/0.10275092720985413f, |
| 798 | v54_dims.size(), v54_dims.data(), |
| 799 | /*data=*/nullptr, |
| 800 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v54); |
| 801 | if (status != xnn_status_success) { |
| 802 | std::cerr << "failed to create tensor v54" << std::endl; |
| 803 | return nullptr; |
| 804 | } |
| 805 | |
| 806 | uint32_t v55 = XNN_INVALID_VALUE_ID; |
| 807 | std::array<size_t, 4> v55_dims = {{1, 7, 7, 160}}; |
| 808 | status = xnn_define_quantized_tensor_value( |
| 809 | subgraph, xnn_datatype_qint8, |
| 810 | /*zero_point=*/-6, |
| 811 | /*scale=*/0.1888202577829361f, |
| 812 | v55_dims.size(), v55_dims.data(), |
| 813 | /*data=*/nullptr, |
| 814 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v55); |
| 815 | if (status != xnn_status_success) { |
| 816 | std::cerr << "failed to create tensor v55" << std::endl; |
| 817 | return nullptr; |
| 818 | } |
| 819 | |
| 820 | uint32_t v56 = XNN_INVALID_VALUE_ID; |
| 821 | std::array<size_t, 4> v56_dims = {{1, 7, 7, 960}}; |
| 822 | status = xnn_define_quantized_tensor_value( |
| 823 | subgraph, xnn_datatype_qint8, |
| 824 | /*zero_point=*/-128, |
| 825 | /*scale=*/0.0235294122248888f, |
| 826 | v56_dims.size(), v56_dims.data(), |
| 827 | /*data=*/nullptr, |
| 828 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v56); |
| 829 | if (status != xnn_status_success) { |
| 830 | std::cerr << "failed to create tensor v56" << std::endl; |
| 831 | return nullptr; |
| 832 | } |
| 833 | |
| 834 | uint32_t v57 = XNN_INVALID_VALUE_ID; |
| 835 | std::array<size_t, 4> v57_dims = {{1, 7, 7, 960}}; |
| 836 | status = xnn_define_quantized_tensor_value( |
| 837 | subgraph, xnn_datatype_qint8, |
| 838 | /*zero_point=*/-128, |
| 839 | /*scale=*/0.0235294122248888f, |
| 840 | v57_dims.size(), v57_dims.data(), |
| 841 | /*data=*/nullptr, |
| 842 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v57); |
| 843 | if (status != xnn_status_success) { |
| 844 | std::cerr << "failed to create tensor v57" << std::endl; |
| 845 | return nullptr; |
| 846 | } |
| 847 | |
| 848 | uint32_t v58 = XNN_INVALID_VALUE_ID; |
| 849 | std::array<size_t, 4> v58_dims = {{1, 7, 7, 160}}; |
| 850 | status = xnn_define_quantized_tensor_value( |
| 851 | subgraph, xnn_datatype_qint8, |
| 852 | /*zero_point=*/7, |
| 853 | /*scale=*/0.22013002634048462f, |
| 854 | v58_dims.size(), v58_dims.data(), |
| 855 | /*data=*/nullptr, |
| 856 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v58); |
| 857 | if (status != xnn_status_success) { |
| 858 | std::cerr << "failed to create tensor v58" << std::endl; |
| 859 | return nullptr; |
| 860 | } |
| 861 | |
| 862 | uint32_t v59 = XNN_INVALID_VALUE_ID; |
| 863 | std::array<size_t, 4> v59_dims = {{1, 7, 7, 160}}; |
| 864 | status = xnn_define_quantized_tensor_value( |
| 865 | subgraph, xnn_datatype_qint8, |
| 866 | /*zero_point=*/-5, |
| 867 | /*scale=*/0.3162474036216736f, |
| 868 | v59_dims.size(), v59_dims.data(), |
| 869 | /*data=*/nullptr, |
| 870 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v59); |
| 871 | if (status != xnn_status_success) { |
| 872 | std::cerr << "failed to create tensor v59" << std::endl; |
| 873 | return nullptr; |
| 874 | } |
| 875 | |
| 876 | uint32_t v60 = XNN_INVALID_VALUE_ID; |
| 877 | std::array<size_t, 4> v60_dims = {{1, 7, 7, 960}}; |
| 878 | status = xnn_define_quantized_tensor_value( |
| 879 | subgraph, xnn_datatype_qint8, |
| 880 | /*zero_point=*/-128, |
| 881 | /*scale=*/0.0235294122248888f, |
| 882 | v60_dims.size(), v60_dims.data(), |
| 883 | /*data=*/nullptr, |
| 884 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v60); |
| 885 | if (status != xnn_status_success) { |
| 886 | std::cerr << "failed to create tensor v60" << std::endl; |
| 887 | return nullptr; |
| 888 | } |
| 889 | |
| 890 | uint32_t v61 = XNN_INVALID_VALUE_ID; |
| 891 | std::array<size_t, 4> v61_dims = {{1, 7, 7, 960}}; |
| 892 | status = xnn_define_quantized_tensor_value( |
| 893 | subgraph, xnn_datatype_qint8, |
| 894 | /*zero_point=*/-128, |
| 895 | /*scale=*/0.0235294122248888f, |
| 896 | v61_dims.size(), v61_dims.data(), |
| 897 | /*data=*/nullptr, |
| 898 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v61); |
| 899 | if (status != xnn_status_success) { |
| 900 | std::cerr << "failed to create tensor v61" << std::endl; |
| 901 | return nullptr; |
| 902 | } |
| 903 | |
| 904 | uint32_t v62 = XNN_INVALID_VALUE_ID; |
| 905 | std::array<size_t, 4> v62_dims = {{1, 7, 7, 320}}; |
| 906 | status = xnn_define_quantized_tensor_value( |
| 907 | subgraph, xnn_datatype_qint8, |
| 908 | /*zero_point=*/-1, |
| 909 | /*scale=*/0.1037522703409195f, |
| 910 | v62_dims.size(), v62_dims.data(), |
| 911 | /*data=*/nullptr, |
| 912 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v62); |
| 913 | if (status != xnn_status_success) { |
| 914 | std::cerr << "failed to create tensor v62" << std::endl; |
| 915 | return nullptr; |
| 916 | } |
| 917 | |
| 918 | uint32_t v63 = XNN_INVALID_VALUE_ID; |
| 919 | std::array<size_t, 4> v63_dims = {{1, 7, 7, 1280}}; |
| 920 | status = xnn_define_quantized_tensor_value( |
| 921 | subgraph, xnn_datatype_qint8, |
| 922 | /*zero_point=*/-128, |
| 923 | /*scale=*/0.0235294122248888f, |
| 924 | v63_dims.size(), v63_dims.data(), |
| 925 | /*data=*/nullptr, |
| 926 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v63); |
| 927 | if (status != xnn_status_success) { |
| 928 | std::cerr << "failed to create tensor v63" << std::endl; |
| 929 | return nullptr; |
| 930 | } |
| 931 | |
| 932 | uint32_t v64 = XNN_INVALID_VALUE_ID; |
| 933 | std::array<size_t, 2> v64_dims = {{1, 1280}}; |
| 934 | status = xnn_define_quantized_tensor_value( |
| 935 | subgraph, xnn_datatype_qint8, |
| 936 | /*zero_point=*/-128, |
| 937 | /*scale=*/0.018486851826310158f, |
| 938 | v64_dims.size(), v64_dims.data(), |
| 939 | /*data=*/nullptr, |
| 940 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v64); |
| 941 | if (status != xnn_status_success) { |
| 942 | std::cerr << "failed to create tensor v64" << std::endl; |
| 943 | return nullptr; |
| 944 | } |
| 945 | |
| 946 | uint32_t v65 = XNN_INVALID_VALUE_ID; |
| 947 | std::array<size_t, 2> v65_dims = {{1, 1001}}; |
| 948 | status = xnn_define_quantized_tensor_value( |
| 949 | subgraph, xnn_datatype_qint8, |
| 950 | /*zero_point=*/-53, |
| 951 | /*scale=*/0.07755904644727707f, |
| 952 | v65_dims.size(), v65_dims.data(), |
| 953 | /*data=*/nullptr, |
| 954 | XNN_INVALID_VALUE_ID, /*flags=*/0, &v65); |
| 955 | if (status != xnn_status_success) { |
| 956 | std::cerr << "failed to create tensor v65" << std::endl; |
| 957 | return nullptr; |
| 958 | } |
| 959 | |
| 960 | uint32_t v66 = XNN_INVALID_VALUE_ID; |
| 961 | std::array<size_t, 2> v66_dims = {{1, 1001}}; |
| 962 | status = xnn_define_tensor_value( |
| 963 | subgraph, xnn_datatype_fp32, |
| 964 | v66_dims.size(), v66_dims.data(), |
| 965 | /*data=*/nullptr, |
| 966 | 1, XNN_VALUE_FLAG_EXTERNAL_OUTPUT, &v66); |
| 967 | if (status != xnn_status_success) { |
| 968 | std::cerr << "failed to create tensor v66" << std::endl; |
| 969 | return nullptr; |
| 970 | } |
| 971 | |
| 972 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(864, int8_t)> w67_data; |
| 973 | uint32_t w67 = XNN_INVALID_VALUE_ID; |
| 974 | std::array<size_t, 4> w67_dims = {{32, 3, 3, 3}}; |
| 975 | static std::array<float, 32> w67_scale; |
| 976 | { |
| 977 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 978 | std::generate(w67_scale.begin(), w67_scale.end(), std::ref(scalerng)); |
| 979 | } |
| 980 | status = xnn_define_channelwise_quantized_tensor_value( |
| 981 | subgraph, xnn_datatype_qcint8, |
| 982 | /*scale=*/w67_scale.data(), |
| 983 | w67_dims.size(), 0, w67_dims.data(), |
| 984 | /*data=*/w67_data.data(), |
| 985 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w67); |
| 986 | if (status != xnn_status_success) { |
| 987 | std::cerr << "failed to create tensor w67" << std::endl; |
| 988 | return nullptr; |
| 989 | } |
| 990 | |
| 991 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(32, int32_t)> w68_data; |
| 992 | uint32_t w68 = XNN_INVALID_VALUE_ID; |
| 993 | std::array<size_t, 1> w68_dims = {{32}}; |
| 994 | static std::array<float, 32> w68_scale; |
| 995 | { |
| 996 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 997 | std::generate(w68_scale.begin(), w68_scale.end(), std::ref(scalerng)); |
| 998 | } |
| 999 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1000 | subgraph, xnn_datatype_qcint32, |
| 1001 | /*scale=*/w68_scale.data(), |
| 1002 | w68_dims.size(), 0, w68_dims.data(), |
| 1003 | /*data=*/w68_data.data(), |
| 1004 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w68); |
| 1005 | if (status != xnn_status_success) { |
| 1006 | std::cerr << "failed to create tensor w68" << std::endl; |
| 1007 | return nullptr; |
| 1008 | } |
| 1009 | |
| 1010 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(288, int8_t)> w69_data; |
| 1011 | uint32_t w69 = XNN_INVALID_VALUE_ID; |
| 1012 | std::array<size_t, 4> w69_dims = {{1, 3, 3, 32}}; |
| 1013 | static std::array<float, 32> w69_scale; |
| 1014 | { |
| 1015 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1016 | std::generate(w69_scale.begin(), w69_scale.end(), std::ref(scalerng)); |
| 1017 | } |
| 1018 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1019 | subgraph, xnn_datatype_qcint8, |
| 1020 | /*scale=*/w69_scale.data(), |
| 1021 | w69_dims.size(), 3, w69_dims.data(), |
| 1022 | /*data=*/w69_data.data(), |
| 1023 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w69); |
| 1024 | if (status != xnn_status_success) { |
| 1025 | std::cerr << "failed to create tensor w69" << std::endl; |
| 1026 | return nullptr; |
| 1027 | } |
| 1028 | |
| 1029 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(32, int32_t)> w70_data; |
| 1030 | uint32_t w70 = XNN_INVALID_VALUE_ID; |
| 1031 | std::array<size_t, 1> w70_dims = {{32}}; |
| 1032 | static std::array<float, 32> w70_scale; |
| 1033 | { |
| 1034 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1035 | std::generate(w70_scale.begin(), w70_scale.end(), std::ref(scalerng)); |
| 1036 | } |
| 1037 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1038 | subgraph, xnn_datatype_qcint32, |
| 1039 | /*scale=*/w70_scale.data(), |
| 1040 | w70_dims.size(), 0, w70_dims.data(), |
| 1041 | /*data=*/w70_data.data(), |
| 1042 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w70); |
| 1043 | if (status != xnn_status_success) { |
| 1044 | std::cerr << "failed to create tensor w70" << std::endl; |
| 1045 | return nullptr; |
| 1046 | } |
| 1047 | |
| 1048 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(512, int8_t)> w71_data; |
| 1049 | uint32_t w71 = XNN_INVALID_VALUE_ID; |
| 1050 | std::array<size_t, 4> w71_dims = {{16, 1, 1, 32}}; |
| 1051 | static std::array<float, 16> w71_scale; |
| 1052 | { |
| 1053 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1054 | std::generate(w71_scale.begin(), w71_scale.end(), std::ref(scalerng)); |
| 1055 | } |
| 1056 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1057 | subgraph, xnn_datatype_qcint8, |
| 1058 | /*scale=*/w71_scale.data(), |
| 1059 | w71_dims.size(), 0, w71_dims.data(), |
| 1060 | /*data=*/w71_data.data(), |
| 1061 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w71); |
| 1062 | if (status != xnn_status_success) { |
| 1063 | std::cerr << "failed to create tensor w71" << std::endl; |
| 1064 | return nullptr; |
| 1065 | } |
| 1066 | |
| 1067 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(16, int32_t)> w72_data; |
| 1068 | uint32_t w72 = XNN_INVALID_VALUE_ID; |
| 1069 | std::array<size_t, 1> w72_dims = {{16}}; |
| 1070 | static std::array<float, 16> w72_scale; |
| 1071 | { |
| 1072 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1073 | std::generate(w72_scale.begin(), w72_scale.end(), std::ref(scalerng)); |
| 1074 | } |
| 1075 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1076 | subgraph, xnn_datatype_qcint32, |
| 1077 | /*scale=*/w72_scale.data(), |
| 1078 | w72_dims.size(), 0, w72_dims.data(), |
| 1079 | /*data=*/w72_data.data(), |
| 1080 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w72); |
| 1081 | if (status != xnn_status_success) { |
| 1082 | std::cerr << "failed to create tensor w72" << std::endl; |
| 1083 | return nullptr; |
| 1084 | } |
| 1085 | |
| 1086 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1536, int8_t)> w73_data; |
| 1087 | uint32_t w73 = XNN_INVALID_VALUE_ID; |
| 1088 | std::array<size_t, 4> w73_dims = {{96, 1, 1, 16}}; |
| 1089 | static std::array<float, 96> w73_scale; |
| 1090 | { |
| 1091 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1092 | std::generate(w73_scale.begin(), w73_scale.end(), std::ref(scalerng)); |
| 1093 | } |
| 1094 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1095 | subgraph, xnn_datatype_qcint8, |
| 1096 | /*scale=*/w73_scale.data(), |
| 1097 | w73_dims.size(), 0, w73_dims.data(), |
| 1098 | /*data=*/w73_data.data(), |
| 1099 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w73); |
| 1100 | if (status != xnn_status_success) { |
| 1101 | std::cerr << "failed to create tensor w73" << std::endl; |
| 1102 | return nullptr; |
| 1103 | } |
| 1104 | |
| 1105 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(96, int32_t)> w74_data; |
| 1106 | uint32_t w74 = XNN_INVALID_VALUE_ID; |
| 1107 | std::array<size_t, 1> w74_dims = {{96}}; |
| 1108 | static std::array<float, 96> w74_scale; |
| 1109 | { |
| 1110 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1111 | std::generate(w74_scale.begin(), w74_scale.end(), std::ref(scalerng)); |
| 1112 | } |
| 1113 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1114 | subgraph, xnn_datatype_qcint32, |
| 1115 | /*scale=*/w74_scale.data(), |
| 1116 | w74_dims.size(), 0, w74_dims.data(), |
| 1117 | /*data=*/w74_data.data(), |
| 1118 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w74); |
| 1119 | if (status != xnn_status_success) { |
| 1120 | std::cerr << "failed to create tensor w74" << std::endl; |
| 1121 | return nullptr; |
| 1122 | } |
| 1123 | |
| 1124 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(864, int8_t)> w75_data; |
| 1125 | uint32_t w75 = XNN_INVALID_VALUE_ID; |
| 1126 | std::array<size_t, 4> w75_dims = {{1, 3, 3, 96}}; |
| 1127 | static std::array<float, 96> w75_scale; |
| 1128 | { |
| 1129 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1130 | std::generate(w75_scale.begin(), w75_scale.end(), std::ref(scalerng)); |
| 1131 | } |
| 1132 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1133 | subgraph, xnn_datatype_qcint8, |
| 1134 | /*scale=*/w75_scale.data(), |
| 1135 | w75_dims.size(), 3, w75_dims.data(), |
| 1136 | /*data=*/w75_data.data(), |
| 1137 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w75); |
| 1138 | if (status != xnn_status_success) { |
| 1139 | std::cerr << "failed to create tensor w75" << std::endl; |
| 1140 | return nullptr; |
| 1141 | } |
| 1142 | |
| 1143 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(96, int32_t)> w76_data; |
| 1144 | uint32_t w76 = XNN_INVALID_VALUE_ID; |
| 1145 | std::array<size_t, 1> w76_dims = {{96}}; |
| 1146 | static std::array<float, 96> w76_scale; |
| 1147 | { |
| 1148 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1149 | std::generate(w76_scale.begin(), w76_scale.end(), std::ref(scalerng)); |
| 1150 | } |
| 1151 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1152 | subgraph, xnn_datatype_qcint32, |
| 1153 | /*scale=*/w76_scale.data(), |
| 1154 | w76_dims.size(), 0, w76_dims.data(), |
| 1155 | /*data=*/w76_data.data(), |
| 1156 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w76); |
| 1157 | if (status != xnn_status_success) { |
| 1158 | std::cerr << "failed to create tensor w76" << std::endl; |
| 1159 | return nullptr; |
| 1160 | } |
| 1161 | |
| 1162 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(2304, int8_t)> w77_data; |
| 1163 | uint32_t w77 = XNN_INVALID_VALUE_ID; |
| 1164 | std::array<size_t, 4> w77_dims = {{24, 1, 1, 96}}; |
| 1165 | static std::array<float, 24> w77_scale; |
| 1166 | { |
| 1167 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1168 | std::generate(w77_scale.begin(), w77_scale.end(), std::ref(scalerng)); |
| 1169 | } |
| 1170 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1171 | subgraph, xnn_datatype_qcint8, |
| 1172 | /*scale=*/w77_scale.data(), |
| 1173 | w77_dims.size(), 0, w77_dims.data(), |
| 1174 | /*data=*/w77_data.data(), |
| 1175 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w77); |
| 1176 | if (status != xnn_status_success) { |
| 1177 | std::cerr << "failed to create tensor w77" << std::endl; |
| 1178 | return nullptr; |
| 1179 | } |
| 1180 | |
| 1181 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(24, int32_t)> w78_data; |
| 1182 | uint32_t w78 = XNN_INVALID_VALUE_ID; |
| 1183 | std::array<size_t, 1> w78_dims = {{24}}; |
| 1184 | static std::array<float, 24> w78_scale; |
| 1185 | { |
| 1186 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1187 | std::generate(w78_scale.begin(), w78_scale.end(), std::ref(scalerng)); |
| 1188 | } |
| 1189 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1190 | subgraph, xnn_datatype_qcint32, |
| 1191 | /*scale=*/w78_scale.data(), |
| 1192 | w78_dims.size(), 0, w78_dims.data(), |
| 1193 | /*data=*/w78_data.data(), |
| 1194 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w78); |
| 1195 | if (status != xnn_status_success) { |
| 1196 | std::cerr << "failed to create tensor w78" << std::endl; |
| 1197 | return nullptr; |
| 1198 | } |
| 1199 | |
| 1200 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w79_data; |
| 1201 | uint32_t w79 = XNN_INVALID_VALUE_ID; |
| 1202 | std::array<size_t, 4> w79_dims = {{144, 1, 1, 24}}; |
| 1203 | static std::array<float, 144> w79_scale; |
| 1204 | { |
| 1205 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1206 | std::generate(w79_scale.begin(), w79_scale.end(), std::ref(scalerng)); |
| 1207 | } |
| 1208 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1209 | subgraph, xnn_datatype_qcint8, |
| 1210 | /*scale=*/w79_scale.data(), |
| 1211 | w79_dims.size(), 0, w79_dims.data(), |
| 1212 | /*data=*/w79_data.data(), |
| 1213 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w79); |
| 1214 | if (status != xnn_status_success) { |
| 1215 | std::cerr << "failed to create tensor w79" << std::endl; |
| 1216 | return nullptr; |
| 1217 | } |
| 1218 | |
| 1219 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(144, int32_t)> w80_data; |
| 1220 | uint32_t w80 = XNN_INVALID_VALUE_ID; |
| 1221 | std::array<size_t, 1> w80_dims = {{144}}; |
| 1222 | static std::array<float, 144> w80_scale; |
| 1223 | { |
| 1224 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1225 | std::generate(w80_scale.begin(), w80_scale.end(), std::ref(scalerng)); |
| 1226 | } |
| 1227 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1228 | subgraph, xnn_datatype_qcint32, |
| 1229 | /*scale=*/w80_scale.data(), |
| 1230 | w80_dims.size(), 0, w80_dims.data(), |
| 1231 | /*data=*/w80_data.data(), |
| 1232 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w80); |
| 1233 | if (status != xnn_status_success) { |
| 1234 | std::cerr << "failed to create tensor w80" << std::endl; |
| 1235 | return nullptr; |
| 1236 | } |
| 1237 | |
| 1238 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1296, int8_t)> w81_data; |
| 1239 | uint32_t w81 = XNN_INVALID_VALUE_ID; |
| 1240 | std::array<size_t, 4> w81_dims = {{1, 3, 3, 144}}; |
| 1241 | static std::array<float, 144> w81_scale; |
| 1242 | { |
| 1243 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1244 | std::generate(w81_scale.begin(), w81_scale.end(), std::ref(scalerng)); |
| 1245 | } |
| 1246 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1247 | subgraph, xnn_datatype_qcint8, |
| 1248 | /*scale=*/w81_scale.data(), |
| 1249 | w81_dims.size(), 3, w81_dims.data(), |
| 1250 | /*data=*/w81_data.data(), |
| 1251 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w81); |
| 1252 | if (status != xnn_status_success) { |
| 1253 | std::cerr << "failed to create tensor w81" << std::endl; |
| 1254 | return nullptr; |
| 1255 | } |
| 1256 | |
| 1257 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(144, int32_t)> w82_data; |
| 1258 | uint32_t w82 = XNN_INVALID_VALUE_ID; |
| 1259 | std::array<size_t, 1> w82_dims = {{144}}; |
| 1260 | static std::array<float, 144> w82_scale; |
| 1261 | { |
| 1262 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1263 | std::generate(w82_scale.begin(), w82_scale.end(), std::ref(scalerng)); |
| 1264 | } |
| 1265 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1266 | subgraph, xnn_datatype_qcint32, |
| 1267 | /*scale=*/w82_scale.data(), |
| 1268 | w82_dims.size(), 0, w82_dims.data(), |
| 1269 | /*data=*/w82_data.data(), |
| 1270 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w82); |
| 1271 | if (status != xnn_status_success) { |
| 1272 | std::cerr << "failed to create tensor w82" << std::endl; |
| 1273 | return nullptr; |
| 1274 | } |
| 1275 | |
| 1276 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w83_data; |
| 1277 | uint32_t w83 = XNN_INVALID_VALUE_ID; |
| 1278 | std::array<size_t, 4> w83_dims = {{24, 1, 1, 144}}; |
| 1279 | static std::array<float, 24> w83_scale; |
| 1280 | { |
| 1281 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1282 | std::generate(w83_scale.begin(), w83_scale.end(), std::ref(scalerng)); |
| 1283 | } |
| 1284 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1285 | subgraph, xnn_datatype_qcint8, |
| 1286 | /*scale=*/w83_scale.data(), |
| 1287 | w83_dims.size(), 0, w83_dims.data(), |
| 1288 | /*data=*/w83_data.data(), |
| 1289 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w83); |
| 1290 | if (status != xnn_status_success) { |
| 1291 | std::cerr << "failed to create tensor w83" << std::endl; |
| 1292 | return nullptr; |
| 1293 | } |
| 1294 | |
| 1295 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(24, int32_t)> w84_data; |
| 1296 | uint32_t w84 = XNN_INVALID_VALUE_ID; |
| 1297 | std::array<size_t, 1> w84_dims = {{24}}; |
| 1298 | static std::array<float, 24> w84_scale; |
| 1299 | { |
| 1300 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1301 | std::generate(w84_scale.begin(), w84_scale.end(), std::ref(scalerng)); |
| 1302 | } |
| 1303 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1304 | subgraph, xnn_datatype_qcint32, |
| 1305 | /*scale=*/w84_scale.data(), |
| 1306 | w84_dims.size(), 0, w84_dims.data(), |
| 1307 | /*data=*/w84_data.data(), |
| 1308 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w84); |
| 1309 | if (status != xnn_status_success) { |
| 1310 | std::cerr << "failed to create tensor w84" << std::endl; |
| 1311 | return nullptr; |
| 1312 | } |
| 1313 | |
| 1314 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w85_data; |
| 1315 | uint32_t w85 = XNN_INVALID_VALUE_ID; |
| 1316 | std::array<size_t, 4> w85_dims = {{144, 1, 1, 24}}; |
| 1317 | static std::array<float, 144> w85_scale; |
| 1318 | { |
| 1319 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1320 | std::generate(w85_scale.begin(), w85_scale.end(), std::ref(scalerng)); |
| 1321 | } |
| 1322 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1323 | subgraph, xnn_datatype_qcint8, |
| 1324 | /*scale=*/w85_scale.data(), |
| 1325 | w85_dims.size(), 0, w85_dims.data(), |
| 1326 | /*data=*/w85_data.data(), |
| 1327 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w85); |
| 1328 | if (status != xnn_status_success) { |
| 1329 | std::cerr << "failed to create tensor w85" << std::endl; |
| 1330 | return nullptr; |
| 1331 | } |
| 1332 | |
| 1333 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(144, int32_t)> w86_data; |
| 1334 | uint32_t w86 = XNN_INVALID_VALUE_ID; |
| 1335 | std::array<size_t, 1> w86_dims = {{144}}; |
| 1336 | static std::array<float, 144> w86_scale; |
| 1337 | { |
| 1338 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1339 | std::generate(w86_scale.begin(), w86_scale.end(), std::ref(scalerng)); |
| 1340 | } |
| 1341 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1342 | subgraph, xnn_datatype_qcint32, |
| 1343 | /*scale=*/w86_scale.data(), |
| 1344 | w86_dims.size(), 0, w86_dims.data(), |
| 1345 | /*data=*/w86_data.data(), |
| 1346 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w86); |
| 1347 | if (status != xnn_status_success) { |
| 1348 | std::cerr << "failed to create tensor w86" << std::endl; |
| 1349 | return nullptr; |
| 1350 | } |
| 1351 | |
| 1352 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1296, int8_t)> w87_data; |
| 1353 | uint32_t w87 = XNN_INVALID_VALUE_ID; |
| 1354 | std::array<size_t, 4> w87_dims = {{1, 3, 3, 144}}; |
| 1355 | static std::array<float, 144> w87_scale; |
| 1356 | { |
| 1357 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1358 | std::generate(w87_scale.begin(), w87_scale.end(), std::ref(scalerng)); |
| 1359 | } |
| 1360 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1361 | subgraph, xnn_datatype_qcint8, |
| 1362 | /*scale=*/w87_scale.data(), |
| 1363 | w87_dims.size(), 3, w87_dims.data(), |
| 1364 | /*data=*/w87_data.data(), |
| 1365 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w87); |
| 1366 | if (status != xnn_status_success) { |
| 1367 | std::cerr << "failed to create tensor w87" << std::endl; |
| 1368 | return nullptr; |
| 1369 | } |
| 1370 | |
| 1371 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(144, int32_t)> w88_data; |
| 1372 | uint32_t w88 = XNN_INVALID_VALUE_ID; |
| 1373 | std::array<size_t, 1> w88_dims = {{144}}; |
| 1374 | static std::array<float, 144> w88_scale; |
| 1375 | { |
| 1376 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1377 | std::generate(w88_scale.begin(), w88_scale.end(), std::ref(scalerng)); |
| 1378 | } |
| 1379 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1380 | subgraph, xnn_datatype_qcint32, |
| 1381 | /*scale=*/w88_scale.data(), |
| 1382 | w88_dims.size(), 0, w88_dims.data(), |
| 1383 | /*data=*/w88_data.data(), |
| 1384 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w88); |
| 1385 | if (status != xnn_status_success) { |
| 1386 | std::cerr << "failed to create tensor w88" << std::endl; |
| 1387 | return nullptr; |
| 1388 | } |
| 1389 | |
| 1390 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(4608, int8_t)> w89_data; |
| 1391 | uint32_t w89 = XNN_INVALID_VALUE_ID; |
| 1392 | std::array<size_t, 4> w89_dims = {{32, 1, 1, 144}}; |
| 1393 | static std::array<float, 32> w89_scale; |
| 1394 | { |
| 1395 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1396 | std::generate(w89_scale.begin(), w89_scale.end(), std::ref(scalerng)); |
| 1397 | } |
| 1398 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1399 | subgraph, xnn_datatype_qcint8, |
| 1400 | /*scale=*/w89_scale.data(), |
| 1401 | w89_dims.size(), 0, w89_dims.data(), |
| 1402 | /*data=*/w89_data.data(), |
| 1403 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w89); |
| 1404 | if (status != xnn_status_success) { |
| 1405 | std::cerr << "failed to create tensor w89" << std::endl; |
| 1406 | return nullptr; |
| 1407 | } |
| 1408 | |
| 1409 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(32, int32_t)> w90_data; |
| 1410 | uint32_t w90 = XNN_INVALID_VALUE_ID; |
| 1411 | std::array<size_t, 1> w90_dims = {{32}}; |
| 1412 | static std::array<float, 32> w90_scale; |
| 1413 | { |
| 1414 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1415 | std::generate(w90_scale.begin(), w90_scale.end(), std::ref(scalerng)); |
| 1416 | } |
| 1417 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1418 | subgraph, xnn_datatype_qcint32, |
| 1419 | /*scale=*/w90_scale.data(), |
| 1420 | w90_dims.size(), 0, w90_dims.data(), |
| 1421 | /*data=*/w90_data.data(), |
| 1422 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w90); |
| 1423 | if (status != xnn_status_success) { |
| 1424 | std::cerr << "failed to create tensor w90" << std::endl; |
| 1425 | return nullptr; |
| 1426 | } |
| 1427 | |
| 1428 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(6144, int8_t)> w91_data; |
| 1429 | uint32_t w91 = XNN_INVALID_VALUE_ID; |
| 1430 | std::array<size_t, 4> w91_dims = {{192, 1, 1, 32}}; |
| 1431 | static std::array<float, 192> w91_scale; |
| 1432 | { |
| 1433 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1434 | std::generate(w91_scale.begin(), w91_scale.end(), std::ref(scalerng)); |
| 1435 | } |
| 1436 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1437 | subgraph, xnn_datatype_qcint8, |
| 1438 | /*scale=*/w91_scale.data(), |
| 1439 | w91_dims.size(), 0, w91_dims.data(), |
| 1440 | /*data=*/w91_data.data(), |
| 1441 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w91); |
| 1442 | if (status != xnn_status_success) { |
| 1443 | std::cerr << "failed to create tensor w91" << std::endl; |
| 1444 | return nullptr; |
| 1445 | } |
| 1446 | |
| 1447 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w92_data; |
| 1448 | uint32_t w92 = XNN_INVALID_VALUE_ID; |
| 1449 | std::array<size_t, 1> w92_dims = {{192}}; |
| 1450 | static std::array<float, 192> w92_scale; |
| 1451 | { |
| 1452 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1453 | std::generate(w92_scale.begin(), w92_scale.end(), std::ref(scalerng)); |
| 1454 | } |
| 1455 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1456 | subgraph, xnn_datatype_qcint32, |
| 1457 | /*scale=*/w92_scale.data(), |
| 1458 | w92_dims.size(), 0, w92_dims.data(), |
| 1459 | /*data=*/w92_data.data(), |
| 1460 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w92); |
| 1461 | if (status != xnn_status_success) { |
| 1462 | std::cerr << "failed to create tensor w92" << std::endl; |
| 1463 | return nullptr; |
| 1464 | } |
| 1465 | |
| 1466 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1728, int8_t)> w93_data; |
| 1467 | uint32_t w93 = XNN_INVALID_VALUE_ID; |
| 1468 | std::array<size_t, 4> w93_dims = {{1, 3, 3, 192}}; |
| 1469 | static std::array<float, 192> w93_scale; |
| 1470 | { |
| 1471 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1472 | std::generate(w93_scale.begin(), w93_scale.end(), std::ref(scalerng)); |
| 1473 | } |
| 1474 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1475 | subgraph, xnn_datatype_qcint8, |
| 1476 | /*scale=*/w93_scale.data(), |
| 1477 | w93_dims.size(), 3, w93_dims.data(), |
| 1478 | /*data=*/w93_data.data(), |
| 1479 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w93); |
| 1480 | if (status != xnn_status_success) { |
| 1481 | std::cerr << "failed to create tensor w93" << std::endl; |
| 1482 | return nullptr; |
| 1483 | } |
| 1484 | |
| 1485 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w94_data; |
| 1486 | uint32_t w94 = XNN_INVALID_VALUE_ID; |
| 1487 | std::array<size_t, 1> w94_dims = {{192}}; |
| 1488 | static std::array<float, 192> w94_scale; |
| 1489 | { |
| 1490 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1491 | std::generate(w94_scale.begin(), w94_scale.end(), std::ref(scalerng)); |
| 1492 | } |
| 1493 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1494 | subgraph, xnn_datatype_qcint32, |
| 1495 | /*scale=*/w94_scale.data(), |
| 1496 | w94_dims.size(), 0, w94_dims.data(), |
| 1497 | /*data=*/w94_data.data(), |
| 1498 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w94); |
| 1499 | if (status != xnn_status_success) { |
| 1500 | std::cerr << "failed to create tensor w94" << std::endl; |
| 1501 | return nullptr; |
| 1502 | } |
| 1503 | |
| 1504 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(6144, int8_t)> w95_data; |
| 1505 | uint32_t w95 = XNN_INVALID_VALUE_ID; |
| 1506 | std::array<size_t, 4> w95_dims = {{32, 1, 1, 192}}; |
| 1507 | static std::array<float, 32> w95_scale; |
| 1508 | { |
| 1509 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1510 | std::generate(w95_scale.begin(), w95_scale.end(), std::ref(scalerng)); |
| 1511 | } |
| 1512 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1513 | subgraph, xnn_datatype_qcint8, |
| 1514 | /*scale=*/w95_scale.data(), |
| 1515 | w95_dims.size(), 0, w95_dims.data(), |
| 1516 | /*data=*/w95_data.data(), |
| 1517 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w95); |
| 1518 | if (status != xnn_status_success) { |
| 1519 | std::cerr << "failed to create tensor w95" << std::endl; |
| 1520 | return nullptr; |
| 1521 | } |
| 1522 | |
| 1523 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(32, int32_t)> w96_data; |
| 1524 | uint32_t w96 = XNN_INVALID_VALUE_ID; |
| 1525 | std::array<size_t, 1> w96_dims = {{32}}; |
| 1526 | static std::array<float, 32> w96_scale; |
| 1527 | { |
| 1528 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1529 | std::generate(w96_scale.begin(), w96_scale.end(), std::ref(scalerng)); |
| 1530 | } |
| 1531 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1532 | subgraph, xnn_datatype_qcint32, |
| 1533 | /*scale=*/w96_scale.data(), |
| 1534 | w96_dims.size(), 0, w96_dims.data(), |
| 1535 | /*data=*/w96_data.data(), |
| 1536 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w96); |
| 1537 | if (status != xnn_status_success) { |
| 1538 | std::cerr << "failed to create tensor w96" << std::endl; |
| 1539 | return nullptr; |
| 1540 | } |
| 1541 | |
| 1542 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(6144, int8_t)> w97_data; |
| 1543 | uint32_t w97 = XNN_INVALID_VALUE_ID; |
| 1544 | std::array<size_t, 4> w97_dims = {{192, 1, 1, 32}}; |
| 1545 | static std::array<float, 192> w97_scale; |
| 1546 | { |
| 1547 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1548 | std::generate(w97_scale.begin(), w97_scale.end(), std::ref(scalerng)); |
| 1549 | } |
| 1550 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1551 | subgraph, xnn_datatype_qcint8, |
| 1552 | /*scale=*/w97_scale.data(), |
| 1553 | w97_dims.size(), 0, w97_dims.data(), |
| 1554 | /*data=*/w97_data.data(), |
| 1555 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w97); |
| 1556 | if (status != xnn_status_success) { |
| 1557 | std::cerr << "failed to create tensor w97" << std::endl; |
| 1558 | return nullptr; |
| 1559 | } |
| 1560 | |
| 1561 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w98_data; |
| 1562 | uint32_t w98 = XNN_INVALID_VALUE_ID; |
| 1563 | std::array<size_t, 1> w98_dims = {{192}}; |
| 1564 | static std::array<float, 192> w98_scale; |
| 1565 | { |
| 1566 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1567 | std::generate(w98_scale.begin(), w98_scale.end(), std::ref(scalerng)); |
| 1568 | } |
| 1569 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1570 | subgraph, xnn_datatype_qcint32, |
| 1571 | /*scale=*/w98_scale.data(), |
| 1572 | w98_dims.size(), 0, w98_dims.data(), |
| 1573 | /*data=*/w98_data.data(), |
| 1574 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w98); |
| 1575 | if (status != xnn_status_success) { |
| 1576 | std::cerr << "failed to create tensor w98" << std::endl; |
| 1577 | return nullptr; |
| 1578 | } |
| 1579 | |
| 1580 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1728, int8_t)> w99_data; |
| 1581 | uint32_t w99 = XNN_INVALID_VALUE_ID; |
| 1582 | std::array<size_t, 4> w99_dims = {{1, 3, 3, 192}}; |
| 1583 | static std::array<float, 192> w99_scale; |
| 1584 | { |
| 1585 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1586 | std::generate(w99_scale.begin(), w99_scale.end(), std::ref(scalerng)); |
| 1587 | } |
| 1588 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1589 | subgraph, xnn_datatype_qcint8, |
| 1590 | /*scale=*/w99_scale.data(), |
| 1591 | w99_dims.size(), 3, w99_dims.data(), |
| 1592 | /*data=*/w99_data.data(), |
| 1593 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w99); |
| 1594 | if (status != xnn_status_success) { |
| 1595 | std::cerr << "failed to create tensor w99" << std::endl; |
| 1596 | return nullptr; |
| 1597 | } |
| 1598 | |
| 1599 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w100_data; |
| 1600 | uint32_t w100 = XNN_INVALID_VALUE_ID; |
| 1601 | std::array<size_t, 1> w100_dims = {{192}}; |
| 1602 | static std::array<float, 192> w100_scale; |
| 1603 | { |
| 1604 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1605 | std::generate(w100_scale.begin(), w100_scale.end(), std::ref(scalerng)); |
| 1606 | } |
| 1607 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1608 | subgraph, xnn_datatype_qcint32, |
| 1609 | /*scale=*/w100_scale.data(), |
| 1610 | w100_dims.size(), 0, w100_dims.data(), |
| 1611 | /*data=*/w100_data.data(), |
| 1612 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w100); |
| 1613 | if (status != xnn_status_success) { |
| 1614 | std::cerr << "failed to create tensor w100" << std::endl; |
| 1615 | return nullptr; |
| 1616 | } |
| 1617 | |
| 1618 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(6144, int8_t)> w101_data; |
| 1619 | uint32_t w101 = XNN_INVALID_VALUE_ID; |
| 1620 | std::array<size_t, 4> w101_dims = {{32, 1, 1, 192}}; |
| 1621 | static std::array<float, 32> w101_scale; |
| 1622 | { |
| 1623 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1624 | std::generate(w101_scale.begin(), w101_scale.end(), std::ref(scalerng)); |
| 1625 | } |
| 1626 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1627 | subgraph, xnn_datatype_qcint8, |
| 1628 | /*scale=*/w101_scale.data(), |
| 1629 | w101_dims.size(), 0, w101_dims.data(), |
| 1630 | /*data=*/w101_data.data(), |
| 1631 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w101); |
| 1632 | if (status != xnn_status_success) { |
| 1633 | std::cerr << "failed to create tensor w101" << std::endl; |
| 1634 | return nullptr; |
| 1635 | } |
| 1636 | |
| 1637 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(32, int32_t)> w102_data; |
| 1638 | uint32_t w102 = XNN_INVALID_VALUE_ID; |
| 1639 | std::array<size_t, 1> w102_dims = {{32}}; |
| 1640 | static std::array<float, 32> w102_scale; |
| 1641 | { |
| 1642 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1643 | std::generate(w102_scale.begin(), w102_scale.end(), std::ref(scalerng)); |
| 1644 | } |
| 1645 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1646 | subgraph, xnn_datatype_qcint32, |
| 1647 | /*scale=*/w102_scale.data(), |
| 1648 | w102_dims.size(), 0, w102_dims.data(), |
| 1649 | /*data=*/w102_data.data(), |
| 1650 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w102); |
| 1651 | if (status != xnn_status_success) { |
| 1652 | std::cerr << "failed to create tensor w102" << std::endl; |
| 1653 | return nullptr; |
| 1654 | } |
| 1655 | |
| 1656 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(6144, int8_t)> w103_data; |
| 1657 | uint32_t w103 = XNN_INVALID_VALUE_ID; |
| 1658 | std::array<size_t, 4> w103_dims = {{192, 1, 1, 32}}; |
| 1659 | static std::array<float, 192> w103_scale; |
| 1660 | { |
| 1661 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1662 | std::generate(w103_scale.begin(), w103_scale.end(), std::ref(scalerng)); |
| 1663 | } |
| 1664 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1665 | subgraph, xnn_datatype_qcint8, |
| 1666 | /*scale=*/w103_scale.data(), |
| 1667 | w103_dims.size(), 0, w103_dims.data(), |
| 1668 | /*data=*/w103_data.data(), |
| 1669 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w103); |
| 1670 | if (status != xnn_status_success) { |
| 1671 | std::cerr << "failed to create tensor w103" << std::endl; |
| 1672 | return nullptr; |
| 1673 | } |
| 1674 | |
| 1675 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w104_data; |
| 1676 | uint32_t w104 = XNN_INVALID_VALUE_ID; |
| 1677 | std::array<size_t, 1> w104_dims = {{192}}; |
| 1678 | static std::array<float, 192> w104_scale; |
| 1679 | { |
| 1680 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1681 | std::generate(w104_scale.begin(), w104_scale.end(), std::ref(scalerng)); |
| 1682 | } |
| 1683 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1684 | subgraph, xnn_datatype_qcint32, |
| 1685 | /*scale=*/w104_scale.data(), |
| 1686 | w104_dims.size(), 0, w104_dims.data(), |
| 1687 | /*data=*/w104_data.data(), |
| 1688 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w104); |
| 1689 | if (status != xnn_status_success) { |
| 1690 | std::cerr << "failed to create tensor w104" << std::endl; |
| 1691 | return nullptr; |
| 1692 | } |
| 1693 | |
| 1694 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1728, int8_t)> w105_data; |
| 1695 | uint32_t w105 = XNN_INVALID_VALUE_ID; |
| 1696 | std::array<size_t, 4> w105_dims = {{1, 3, 3, 192}}; |
| 1697 | static std::array<float, 192> w105_scale; |
| 1698 | { |
| 1699 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1700 | std::generate(w105_scale.begin(), w105_scale.end(), std::ref(scalerng)); |
| 1701 | } |
| 1702 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1703 | subgraph, xnn_datatype_qcint8, |
| 1704 | /*scale=*/w105_scale.data(), |
| 1705 | w105_dims.size(), 3, w105_dims.data(), |
| 1706 | /*data=*/w105_data.data(), |
| 1707 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w105); |
| 1708 | if (status != xnn_status_success) { |
| 1709 | std::cerr << "failed to create tensor w105" << std::endl; |
| 1710 | return nullptr; |
| 1711 | } |
| 1712 | |
| 1713 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(192, int32_t)> w106_data; |
| 1714 | uint32_t w106 = XNN_INVALID_VALUE_ID; |
| 1715 | std::array<size_t, 1> w106_dims = {{192}}; |
| 1716 | static std::array<float, 192> w106_scale; |
| 1717 | { |
| 1718 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1719 | std::generate(w106_scale.begin(), w106_scale.end(), std::ref(scalerng)); |
| 1720 | } |
| 1721 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1722 | subgraph, xnn_datatype_qcint32, |
| 1723 | /*scale=*/w106_scale.data(), |
| 1724 | w106_dims.size(), 0, w106_dims.data(), |
| 1725 | /*data=*/w106_data.data(), |
| 1726 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w106); |
| 1727 | if (status != xnn_status_success) { |
| 1728 | std::cerr << "failed to create tensor w106" << std::endl; |
| 1729 | return nullptr; |
| 1730 | } |
| 1731 | |
| 1732 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(12288, int8_t)> w107_data; |
| 1733 | uint32_t w107 = XNN_INVALID_VALUE_ID; |
| 1734 | std::array<size_t, 4> w107_dims = {{64, 1, 1, 192}}; |
| 1735 | static std::array<float, 64> w107_scale; |
| 1736 | { |
| 1737 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1738 | std::generate(w107_scale.begin(), w107_scale.end(), std::ref(scalerng)); |
| 1739 | } |
| 1740 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1741 | subgraph, xnn_datatype_qcint8, |
| 1742 | /*scale=*/w107_scale.data(), |
| 1743 | w107_dims.size(), 0, w107_dims.data(), |
| 1744 | /*data=*/w107_data.data(), |
| 1745 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w107); |
| 1746 | if (status != xnn_status_success) { |
| 1747 | std::cerr << "failed to create tensor w107" << std::endl; |
| 1748 | return nullptr; |
| 1749 | } |
| 1750 | |
| 1751 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(64, int32_t)> w108_data; |
| 1752 | uint32_t w108 = XNN_INVALID_VALUE_ID; |
| 1753 | std::array<size_t, 1> w108_dims = {{64}}; |
| 1754 | static std::array<float, 64> w108_scale; |
| 1755 | { |
| 1756 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1757 | std::generate(w108_scale.begin(), w108_scale.end(), std::ref(scalerng)); |
| 1758 | } |
| 1759 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1760 | subgraph, xnn_datatype_qcint32, |
| 1761 | /*scale=*/w108_scale.data(), |
| 1762 | w108_dims.size(), 0, w108_dims.data(), |
| 1763 | /*data=*/w108_data.data(), |
| 1764 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w108); |
| 1765 | if (status != xnn_status_success) { |
| 1766 | std::cerr << "failed to create tensor w108" << std::endl; |
| 1767 | return nullptr; |
| 1768 | } |
| 1769 | |
| 1770 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w109_data; |
| 1771 | uint32_t w109 = XNN_INVALID_VALUE_ID; |
| 1772 | std::array<size_t, 4> w109_dims = {{384, 1, 1, 64}}; |
| 1773 | static std::array<float, 384> w109_scale; |
| 1774 | { |
| 1775 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1776 | std::generate(w109_scale.begin(), w109_scale.end(), std::ref(scalerng)); |
| 1777 | } |
| 1778 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1779 | subgraph, xnn_datatype_qcint8, |
| 1780 | /*scale=*/w109_scale.data(), |
| 1781 | w109_dims.size(), 0, w109_dims.data(), |
| 1782 | /*data=*/w109_data.data(), |
| 1783 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w109); |
| 1784 | if (status != xnn_status_success) { |
| 1785 | std::cerr << "failed to create tensor w109" << std::endl; |
| 1786 | return nullptr; |
| 1787 | } |
| 1788 | |
| 1789 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w110_data; |
| 1790 | uint32_t w110 = XNN_INVALID_VALUE_ID; |
| 1791 | std::array<size_t, 1> w110_dims = {{384}}; |
| 1792 | static std::array<float, 384> w110_scale; |
| 1793 | { |
| 1794 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1795 | std::generate(w110_scale.begin(), w110_scale.end(), std::ref(scalerng)); |
| 1796 | } |
| 1797 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1798 | subgraph, xnn_datatype_qcint32, |
| 1799 | /*scale=*/w110_scale.data(), |
| 1800 | w110_dims.size(), 0, w110_dims.data(), |
| 1801 | /*data=*/w110_data.data(), |
| 1802 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w110); |
| 1803 | if (status != xnn_status_success) { |
| 1804 | std::cerr << "failed to create tensor w110" << std::endl; |
| 1805 | return nullptr; |
| 1806 | } |
| 1807 | |
| 1808 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w111_data; |
| 1809 | uint32_t w111 = XNN_INVALID_VALUE_ID; |
| 1810 | std::array<size_t, 4> w111_dims = {{1, 3, 3, 384}}; |
| 1811 | static std::array<float, 384> w111_scale; |
| 1812 | { |
| 1813 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1814 | std::generate(w111_scale.begin(), w111_scale.end(), std::ref(scalerng)); |
| 1815 | } |
| 1816 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1817 | subgraph, xnn_datatype_qcint8, |
| 1818 | /*scale=*/w111_scale.data(), |
| 1819 | w111_dims.size(), 3, w111_dims.data(), |
| 1820 | /*data=*/w111_data.data(), |
| 1821 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w111); |
| 1822 | if (status != xnn_status_success) { |
| 1823 | std::cerr << "failed to create tensor w111" << std::endl; |
| 1824 | return nullptr; |
| 1825 | } |
| 1826 | |
| 1827 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w112_data; |
| 1828 | uint32_t w112 = XNN_INVALID_VALUE_ID; |
| 1829 | std::array<size_t, 1> w112_dims = {{384}}; |
| 1830 | static std::array<float, 384> w112_scale; |
| 1831 | { |
| 1832 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1833 | std::generate(w112_scale.begin(), w112_scale.end(), std::ref(scalerng)); |
| 1834 | } |
| 1835 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1836 | subgraph, xnn_datatype_qcint32, |
| 1837 | /*scale=*/w112_scale.data(), |
| 1838 | w112_dims.size(), 0, w112_dims.data(), |
| 1839 | /*data=*/w112_data.data(), |
| 1840 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w112); |
| 1841 | if (status != xnn_status_success) { |
| 1842 | std::cerr << "failed to create tensor w112" << std::endl; |
| 1843 | return nullptr; |
| 1844 | } |
| 1845 | |
| 1846 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w113_data; |
| 1847 | uint32_t w113 = XNN_INVALID_VALUE_ID; |
| 1848 | std::array<size_t, 4> w113_dims = {{64, 1, 1, 384}}; |
| 1849 | static std::array<float, 64> w113_scale; |
| 1850 | { |
| 1851 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1852 | std::generate(w113_scale.begin(), w113_scale.end(), std::ref(scalerng)); |
| 1853 | } |
| 1854 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1855 | subgraph, xnn_datatype_qcint8, |
| 1856 | /*scale=*/w113_scale.data(), |
| 1857 | w113_dims.size(), 0, w113_dims.data(), |
| 1858 | /*data=*/w113_data.data(), |
| 1859 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w113); |
| 1860 | if (status != xnn_status_success) { |
| 1861 | std::cerr << "failed to create tensor w113" << std::endl; |
| 1862 | return nullptr; |
| 1863 | } |
| 1864 | |
| 1865 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(64, int32_t)> w114_data; |
| 1866 | uint32_t w114 = XNN_INVALID_VALUE_ID; |
| 1867 | std::array<size_t, 1> w114_dims = {{64}}; |
| 1868 | static std::array<float, 64> w114_scale; |
| 1869 | { |
| 1870 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1871 | std::generate(w114_scale.begin(), w114_scale.end(), std::ref(scalerng)); |
| 1872 | } |
| 1873 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1874 | subgraph, xnn_datatype_qcint32, |
| 1875 | /*scale=*/w114_scale.data(), |
| 1876 | w114_dims.size(), 0, w114_dims.data(), |
| 1877 | /*data=*/w114_data.data(), |
| 1878 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w114); |
| 1879 | if (status != xnn_status_success) { |
| 1880 | std::cerr << "failed to create tensor w114" << std::endl; |
| 1881 | return nullptr; |
| 1882 | } |
| 1883 | |
| 1884 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w115_data; |
| 1885 | uint32_t w115 = XNN_INVALID_VALUE_ID; |
| 1886 | std::array<size_t, 4> w115_dims = {{384, 1, 1, 64}}; |
| 1887 | static std::array<float, 384> w115_scale; |
| 1888 | { |
| 1889 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1890 | std::generate(w115_scale.begin(), w115_scale.end(), std::ref(scalerng)); |
| 1891 | } |
| 1892 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1893 | subgraph, xnn_datatype_qcint8, |
| 1894 | /*scale=*/w115_scale.data(), |
| 1895 | w115_dims.size(), 0, w115_dims.data(), |
| 1896 | /*data=*/w115_data.data(), |
| 1897 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w115); |
| 1898 | if (status != xnn_status_success) { |
| 1899 | std::cerr << "failed to create tensor w115" << std::endl; |
| 1900 | return nullptr; |
| 1901 | } |
| 1902 | |
| 1903 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w116_data; |
| 1904 | uint32_t w116 = XNN_INVALID_VALUE_ID; |
| 1905 | std::array<size_t, 1> w116_dims = {{384}}; |
| 1906 | static std::array<float, 384> w116_scale; |
| 1907 | { |
| 1908 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1909 | std::generate(w116_scale.begin(), w116_scale.end(), std::ref(scalerng)); |
| 1910 | } |
| 1911 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1912 | subgraph, xnn_datatype_qcint32, |
| 1913 | /*scale=*/w116_scale.data(), |
| 1914 | w116_dims.size(), 0, w116_dims.data(), |
| 1915 | /*data=*/w116_data.data(), |
| 1916 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w116); |
| 1917 | if (status != xnn_status_success) { |
| 1918 | std::cerr << "failed to create tensor w116" << std::endl; |
| 1919 | return nullptr; |
| 1920 | } |
| 1921 | |
| 1922 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w117_data; |
| 1923 | uint32_t w117 = XNN_INVALID_VALUE_ID; |
| 1924 | std::array<size_t, 4> w117_dims = {{1, 3, 3, 384}}; |
| 1925 | static std::array<float, 384> w117_scale; |
| 1926 | { |
| 1927 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1928 | std::generate(w117_scale.begin(), w117_scale.end(), std::ref(scalerng)); |
| 1929 | } |
| 1930 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1931 | subgraph, xnn_datatype_qcint8, |
| 1932 | /*scale=*/w117_scale.data(), |
| 1933 | w117_dims.size(), 3, w117_dims.data(), |
| 1934 | /*data=*/w117_data.data(), |
| 1935 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w117); |
| 1936 | if (status != xnn_status_success) { |
| 1937 | std::cerr << "failed to create tensor w117" << std::endl; |
| 1938 | return nullptr; |
| 1939 | } |
| 1940 | |
| 1941 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w118_data; |
| 1942 | uint32_t w118 = XNN_INVALID_VALUE_ID; |
| 1943 | std::array<size_t, 1> w118_dims = {{384}}; |
| 1944 | static std::array<float, 384> w118_scale; |
| 1945 | { |
| 1946 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1947 | std::generate(w118_scale.begin(), w118_scale.end(), std::ref(scalerng)); |
| 1948 | } |
| 1949 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1950 | subgraph, xnn_datatype_qcint32, |
| 1951 | /*scale=*/w118_scale.data(), |
| 1952 | w118_dims.size(), 0, w118_dims.data(), |
| 1953 | /*data=*/w118_data.data(), |
| 1954 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w118); |
| 1955 | if (status != xnn_status_success) { |
| 1956 | std::cerr << "failed to create tensor w118" << std::endl; |
| 1957 | return nullptr; |
| 1958 | } |
| 1959 | |
| 1960 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w119_data; |
| 1961 | uint32_t w119 = XNN_INVALID_VALUE_ID; |
| 1962 | std::array<size_t, 4> w119_dims = {{64, 1, 1, 384}}; |
| 1963 | static std::array<float, 64> w119_scale; |
| 1964 | { |
| 1965 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1966 | std::generate(w119_scale.begin(), w119_scale.end(), std::ref(scalerng)); |
| 1967 | } |
| 1968 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1969 | subgraph, xnn_datatype_qcint8, |
| 1970 | /*scale=*/w119_scale.data(), |
| 1971 | w119_dims.size(), 0, w119_dims.data(), |
| 1972 | /*data=*/w119_data.data(), |
| 1973 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w119); |
| 1974 | if (status != xnn_status_success) { |
| 1975 | std::cerr << "failed to create tensor w119" << std::endl; |
| 1976 | return nullptr; |
| 1977 | } |
| 1978 | |
| 1979 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(64, int32_t)> w120_data; |
| 1980 | uint32_t w120 = XNN_INVALID_VALUE_ID; |
| 1981 | std::array<size_t, 1> w120_dims = {{64}}; |
| 1982 | static std::array<float, 64> w120_scale; |
| 1983 | { |
| 1984 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 1985 | std::generate(w120_scale.begin(), w120_scale.end(), std::ref(scalerng)); |
| 1986 | } |
| 1987 | status = xnn_define_channelwise_quantized_tensor_value( |
| 1988 | subgraph, xnn_datatype_qcint32, |
| 1989 | /*scale=*/w120_scale.data(), |
| 1990 | w120_dims.size(), 0, w120_dims.data(), |
| 1991 | /*data=*/w120_data.data(), |
| 1992 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w120); |
| 1993 | if (status != xnn_status_success) { |
| 1994 | std::cerr << "failed to create tensor w120" << std::endl; |
| 1995 | return nullptr; |
| 1996 | } |
| 1997 | |
| 1998 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w121_data; |
| 1999 | uint32_t w121 = XNN_INVALID_VALUE_ID; |
| 2000 | std::array<size_t, 4> w121_dims = {{384, 1, 1, 64}}; |
| 2001 | static std::array<float, 384> w121_scale; |
| 2002 | { |
| 2003 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2004 | std::generate(w121_scale.begin(), w121_scale.end(), std::ref(scalerng)); |
| 2005 | } |
| 2006 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2007 | subgraph, xnn_datatype_qcint8, |
| 2008 | /*scale=*/w121_scale.data(), |
| 2009 | w121_dims.size(), 0, w121_dims.data(), |
| 2010 | /*data=*/w121_data.data(), |
| 2011 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w121); |
| 2012 | if (status != xnn_status_success) { |
| 2013 | std::cerr << "failed to create tensor w121" << std::endl; |
| 2014 | return nullptr; |
| 2015 | } |
| 2016 | |
| 2017 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w122_data; |
| 2018 | uint32_t w122 = XNN_INVALID_VALUE_ID; |
| 2019 | std::array<size_t, 1> w122_dims = {{384}}; |
| 2020 | static std::array<float, 384> w122_scale; |
| 2021 | { |
| 2022 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2023 | std::generate(w122_scale.begin(), w122_scale.end(), std::ref(scalerng)); |
| 2024 | } |
| 2025 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2026 | subgraph, xnn_datatype_qcint32, |
| 2027 | /*scale=*/w122_scale.data(), |
| 2028 | w122_dims.size(), 0, w122_dims.data(), |
| 2029 | /*data=*/w122_data.data(), |
| 2030 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w122); |
| 2031 | if (status != xnn_status_success) { |
| 2032 | std::cerr << "failed to create tensor w122" << std::endl; |
| 2033 | return nullptr; |
| 2034 | } |
| 2035 | |
| 2036 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w123_data; |
| 2037 | uint32_t w123 = XNN_INVALID_VALUE_ID; |
| 2038 | std::array<size_t, 4> w123_dims = {{1, 3, 3, 384}}; |
| 2039 | static std::array<float, 384> w123_scale; |
| 2040 | { |
| 2041 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2042 | std::generate(w123_scale.begin(), w123_scale.end(), std::ref(scalerng)); |
| 2043 | } |
| 2044 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2045 | subgraph, xnn_datatype_qcint8, |
| 2046 | /*scale=*/w123_scale.data(), |
| 2047 | w123_dims.size(), 3, w123_dims.data(), |
| 2048 | /*data=*/w123_data.data(), |
| 2049 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w123); |
| 2050 | if (status != xnn_status_success) { |
| 2051 | std::cerr << "failed to create tensor w123" << std::endl; |
| 2052 | return nullptr; |
| 2053 | } |
| 2054 | |
| 2055 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w124_data; |
| 2056 | uint32_t w124 = XNN_INVALID_VALUE_ID; |
| 2057 | std::array<size_t, 1> w124_dims = {{384}}; |
| 2058 | static std::array<float, 384> w124_scale; |
| 2059 | { |
| 2060 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2061 | std::generate(w124_scale.begin(), w124_scale.end(), std::ref(scalerng)); |
| 2062 | } |
| 2063 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2064 | subgraph, xnn_datatype_qcint32, |
| 2065 | /*scale=*/w124_scale.data(), |
| 2066 | w124_dims.size(), 0, w124_dims.data(), |
| 2067 | /*data=*/w124_data.data(), |
| 2068 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w124); |
| 2069 | if (status != xnn_status_success) { |
| 2070 | std::cerr << "failed to create tensor w124" << std::endl; |
| 2071 | return nullptr; |
| 2072 | } |
| 2073 | |
| 2074 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w125_data; |
| 2075 | uint32_t w125 = XNN_INVALID_VALUE_ID; |
| 2076 | std::array<size_t, 4> w125_dims = {{64, 1, 1, 384}}; |
| 2077 | static std::array<float, 64> w125_scale; |
| 2078 | { |
| 2079 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2080 | std::generate(w125_scale.begin(), w125_scale.end(), std::ref(scalerng)); |
| 2081 | } |
| 2082 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2083 | subgraph, xnn_datatype_qcint8, |
| 2084 | /*scale=*/w125_scale.data(), |
| 2085 | w125_dims.size(), 0, w125_dims.data(), |
| 2086 | /*data=*/w125_data.data(), |
| 2087 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w125); |
| 2088 | if (status != xnn_status_success) { |
| 2089 | std::cerr << "failed to create tensor w125" << std::endl; |
| 2090 | return nullptr; |
| 2091 | } |
| 2092 | |
| 2093 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(64, int32_t)> w126_data; |
| 2094 | uint32_t w126 = XNN_INVALID_VALUE_ID; |
| 2095 | std::array<size_t, 1> w126_dims = {{64}}; |
| 2096 | static std::array<float, 64> w126_scale; |
| 2097 | { |
| 2098 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2099 | std::generate(w126_scale.begin(), w126_scale.end(), std::ref(scalerng)); |
| 2100 | } |
| 2101 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2102 | subgraph, xnn_datatype_qcint32, |
| 2103 | /*scale=*/w126_scale.data(), |
| 2104 | w126_dims.size(), 0, w126_dims.data(), |
| 2105 | /*data=*/w126_data.data(), |
| 2106 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w126); |
| 2107 | if (status != xnn_status_success) { |
| 2108 | std::cerr << "failed to create tensor w126" << std::endl; |
| 2109 | return nullptr; |
| 2110 | } |
| 2111 | |
| 2112 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(24576, int8_t)> w127_data; |
| 2113 | uint32_t w127 = XNN_INVALID_VALUE_ID; |
| 2114 | std::array<size_t, 4> w127_dims = {{384, 1, 1, 64}}; |
| 2115 | static std::array<float, 384> w127_scale; |
| 2116 | { |
| 2117 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2118 | std::generate(w127_scale.begin(), w127_scale.end(), std::ref(scalerng)); |
| 2119 | } |
| 2120 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2121 | subgraph, xnn_datatype_qcint8, |
| 2122 | /*scale=*/w127_scale.data(), |
| 2123 | w127_dims.size(), 0, w127_dims.data(), |
| 2124 | /*data=*/w127_data.data(), |
| 2125 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w127); |
| 2126 | if (status != xnn_status_success) { |
| 2127 | std::cerr << "failed to create tensor w127" << std::endl; |
| 2128 | return nullptr; |
| 2129 | } |
| 2130 | |
| 2131 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w128_data; |
| 2132 | uint32_t w128 = XNN_INVALID_VALUE_ID; |
| 2133 | std::array<size_t, 1> w128_dims = {{384}}; |
| 2134 | static std::array<float, 384> w128_scale; |
| 2135 | { |
| 2136 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2137 | std::generate(w128_scale.begin(), w128_scale.end(), std::ref(scalerng)); |
| 2138 | } |
| 2139 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2140 | subgraph, xnn_datatype_qcint32, |
| 2141 | /*scale=*/w128_scale.data(), |
| 2142 | w128_dims.size(), 0, w128_dims.data(), |
| 2143 | /*data=*/w128_data.data(), |
| 2144 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w128); |
| 2145 | if (status != xnn_status_success) { |
| 2146 | std::cerr << "failed to create tensor w128" << std::endl; |
| 2147 | return nullptr; |
| 2148 | } |
| 2149 | |
| 2150 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(3456, int8_t)> w129_data; |
| 2151 | uint32_t w129 = XNN_INVALID_VALUE_ID; |
| 2152 | std::array<size_t, 4> w129_dims = {{1, 3, 3, 384}}; |
| 2153 | static std::array<float, 384> w129_scale; |
| 2154 | { |
| 2155 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2156 | std::generate(w129_scale.begin(), w129_scale.end(), std::ref(scalerng)); |
| 2157 | } |
| 2158 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2159 | subgraph, xnn_datatype_qcint8, |
| 2160 | /*scale=*/w129_scale.data(), |
| 2161 | w129_dims.size(), 3, w129_dims.data(), |
| 2162 | /*data=*/w129_data.data(), |
| 2163 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w129); |
| 2164 | if (status != xnn_status_success) { |
| 2165 | std::cerr << "failed to create tensor w129" << std::endl; |
| 2166 | return nullptr; |
| 2167 | } |
| 2168 | |
| 2169 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(384, int32_t)> w130_data; |
| 2170 | uint32_t w130 = XNN_INVALID_VALUE_ID; |
| 2171 | std::array<size_t, 1> w130_dims = {{384}}; |
| 2172 | static std::array<float, 384> w130_scale; |
| 2173 | { |
| 2174 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2175 | std::generate(w130_scale.begin(), w130_scale.end(), std::ref(scalerng)); |
| 2176 | } |
| 2177 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2178 | subgraph, xnn_datatype_qcint32, |
| 2179 | /*scale=*/w130_scale.data(), |
| 2180 | w130_dims.size(), 0, w130_dims.data(), |
| 2181 | /*data=*/w130_data.data(), |
| 2182 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w130); |
| 2183 | if (status != xnn_status_success) { |
| 2184 | std::cerr << "failed to create tensor w130" << std::endl; |
| 2185 | return nullptr; |
| 2186 | } |
| 2187 | |
| 2188 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(36864, int8_t)> w131_data; |
| 2189 | uint32_t w131 = XNN_INVALID_VALUE_ID; |
| 2190 | std::array<size_t, 4> w131_dims = {{96, 1, 1, 384}}; |
| 2191 | static std::array<float, 96> w131_scale; |
| 2192 | { |
| 2193 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2194 | std::generate(w131_scale.begin(), w131_scale.end(), std::ref(scalerng)); |
| 2195 | } |
| 2196 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2197 | subgraph, xnn_datatype_qcint8, |
| 2198 | /*scale=*/w131_scale.data(), |
| 2199 | w131_dims.size(), 0, w131_dims.data(), |
| 2200 | /*data=*/w131_data.data(), |
| 2201 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w131); |
| 2202 | if (status != xnn_status_success) { |
| 2203 | std::cerr << "failed to create tensor w131" << std::endl; |
| 2204 | return nullptr; |
| 2205 | } |
| 2206 | |
| 2207 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(96, int32_t)> w132_data; |
| 2208 | uint32_t w132 = XNN_INVALID_VALUE_ID; |
| 2209 | std::array<size_t, 1> w132_dims = {{96}}; |
| 2210 | static std::array<float, 96> w132_scale; |
| 2211 | { |
| 2212 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2213 | std::generate(w132_scale.begin(), w132_scale.end(), std::ref(scalerng)); |
| 2214 | } |
| 2215 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2216 | subgraph, xnn_datatype_qcint32, |
| 2217 | /*scale=*/w132_scale.data(), |
| 2218 | w132_dims.size(), 0, w132_dims.data(), |
| 2219 | /*data=*/w132_data.data(), |
| 2220 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w132); |
| 2221 | if (status != xnn_status_success) { |
| 2222 | std::cerr << "failed to create tensor w132" << std::endl; |
| 2223 | return nullptr; |
| 2224 | } |
| 2225 | |
| 2226 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(55296, int8_t)> w133_data; |
| 2227 | uint32_t w133 = XNN_INVALID_VALUE_ID; |
| 2228 | std::array<size_t, 4> w133_dims = {{576, 1, 1, 96}}; |
| 2229 | static std::array<float, 576> w133_scale; |
| 2230 | { |
| 2231 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2232 | std::generate(w133_scale.begin(), w133_scale.end(), std::ref(scalerng)); |
| 2233 | } |
| 2234 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2235 | subgraph, xnn_datatype_qcint8, |
| 2236 | /*scale=*/w133_scale.data(), |
| 2237 | w133_dims.size(), 0, w133_dims.data(), |
| 2238 | /*data=*/w133_data.data(), |
| 2239 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w133); |
| 2240 | if (status != xnn_status_success) { |
| 2241 | std::cerr << "failed to create tensor w133" << std::endl; |
| 2242 | return nullptr; |
| 2243 | } |
| 2244 | |
| 2245 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w134_data; |
| 2246 | uint32_t w134 = XNN_INVALID_VALUE_ID; |
| 2247 | std::array<size_t, 1> w134_dims = {{576}}; |
| 2248 | static std::array<float, 576> w134_scale; |
| 2249 | { |
| 2250 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2251 | std::generate(w134_scale.begin(), w134_scale.end(), std::ref(scalerng)); |
| 2252 | } |
| 2253 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2254 | subgraph, xnn_datatype_qcint32, |
| 2255 | /*scale=*/w134_scale.data(), |
| 2256 | w134_dims.size(), 0, w134_dims.data(), |
| 2257 | /*data=*/w134_data.data(), |
| 2258 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w134); |
| 2259 | if (status != xnn_status_success) { |
| 2260 | std::cerr << "failed to create tensor w134" << std::endl; |
| 2261 | return nullptr; |
| 2262 | } |
| 2263 | |
| 2264 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(5184, int8_t)> w135_data; |
| 2265 | uint32_t w135 = XNN_INVALID_VALUE_ID; |
| 2266 | std::array<size_t, 4> w135_dims = {{1, 3, 3, 576}}; |
| 2267 | static std::array<float, 576> w135_scale; |
| 2268 | { |
| 2269 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2270 | std::generate(w135_scale.begin(), w135_scale.end(), std::ref(scalerng)); |
| 2271 | } |
| 2272 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2273 | subgraph, xnn_datatype_qcint8, |
| 2274 | /*scale=*/w135_scale.data(), |
| 2275 | w135_dims.size(), 3, w135_dims.data(), |
| 2276 | /*data=*/w135_data.data(), |
| 2277 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w135); |
| 2278 | if (status != xnn_status_success) { |
| 2279 | std::cerr << "failed to create tensor w135" << std::endl; |
| 2280 | return nullptr; |
| 2281 | } |
| 2282 | |
| 2283 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w136_data; |
| 2284 | uint32_t w136 = XNN_INVALID_VALUE_ID; |
| 2285 | std::array<size_t, 1> w136_dims = {{576}}; |
| 2286 | static std::array<float, 576> w136_scale; |
| 2287 | { |
| 2288 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2289 | std::generate(w136_scale.begin(), w136_scale.end(), std::ref(scalerng)); |
| 2290 | } |
| 2291 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2292 | subgraph, xnn_datatype_qcint32, |
| 2293 | /*scale=*/w136_scale.data(), |
| 2294 | w136_dims.size(), 0, w136_dims.data(), |
| 2295 | /*data=*/w136_data.data(), |
| 2296 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w136); |
| 2297 | if (status != xnn_status_success) { |
| 2298 | std::cerr << "failed to create tensor w136" << std::endl; |
| 2299 | return nullptr; |
| 2300 | } |
| 2301 | |
| 2302 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(55296, int8_t)> w137_data; |
| 2303 | uint32_t w137 = XNN_INVALID_VALUE_ID; |
| 2304 | std::array<size_t, 4> w137_dims = {{96, 1, 1, 576}}; |
| 2305 | static std::array<float, 96> w137_scale; |
| 2306 | { |
| 2307 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2308 | std::generate(w137_scale.begin(), w137_scale.end(), std::ref(scalerng)); |
| 2309 | } |
| 2310 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2311 | subgraph, xnn_datatype_qcint8, |
| 2312 | /*scale=*/w137_scale.data(), |
| 2313 | w137_dims.size(), 0, w137_dims.data(), |
| 2314 | /*data=*/w137_data.data(), |
| 2315 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w137); |
| 2316 | if (status != xnn_status_success) { |
| 2317 | std::cerr << "failed to create tensor w137" << std::endl; |
| 2318 | return nullptr; |
| 2319 | } |
| 2320 | |
| 2321 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(96, int32_t)> w138_data; |
| 2322 | uint32_t w138 = XNN_INVALID_VALUE_ID; |
| 2323 | std::array<size_t, 1> w138_dims = {{96}}; |
| 2324 | static std::array<float, 96> w138_scale; |
| 2325 | { |
| 2326 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2327 | std::generate(w138_scale.begin(), w138_scale.end(), std::ref(scalerng)); |
| 2328 | } |
| 2329 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2330 | subgraph, xnn_datatype_qcint32, |
| 2331 | /*scale=*/w138_scale.data(), |
| 2332 | w138_dims.size(), 0, w138_dims.data(), |
| 2333 | /*data=*/w138_data.data(), |
| 2334 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w138); |
| 2335 | if (status != xnn_status_success) { |
| 2336 | std::cerr << "failed to create tensor w138" << std::endl; |
| 2337 | return nullptr; |
| 2338 | } |
| 2339 | |
| 2340 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(55296, int8_t)> w139_data; |
| 2341 | uint32_t w139 = XNN_INVALID_VALUE_ID; |
| 2342 | std::array<size_t, 4> w139_dims = {{576, 1, 1, 96}}; |
| 2343 | static std::array<float, 576> w139_scale; |
| 2344 | { |
| 2345 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2346 | std::generate(w139_scale.begin(), w139_scale.end(), std::ref(scalerng)); |
| 2347 | } |
| 2348 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2349 | subgraph, xnn_datatype_qcint8, |
| 2350 | /*scale=*/w139_scale.data(), |
| 2351 | w139_dims.size(), 0, w139_dims.data(), |
| 2352 | /*data=*/w139_data.data(), |
| 2353 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w139); |
| 2354 | if (status != xnn_status_success) { |
| 2355 | std::cerr << "failed to create tensor w139" << std::endl; |
| 2356 | return nullptr; |
| 2357 | } |
| 2358 | |
| 2359 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w140_data; |
| 2360 | uint32_t w140 = XNN_INVALID_VALUE_ID; |
| 2361 | std::array<size_t, 1> w140_dims = {{576}}; |
| 2362 | static std::array<float, 576> w140_scale; |
| 2363 | { |
| 2364 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2365 | std::generate(w140_scale.begin(), w140_scale.end(), std::ref(scalerng)); |
| 2366 | } |
| 2367 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2368 | subgraph, xnn_datatype_qcint32, |
| 2369 | /*scale=*/w140_scale.data(), |
| 2370 | w140_dims.size(), 0, w140_dims.data(), |
| 2371 | /*data=*/w140_data.data(), |
| 2372 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w140); |
| 2373 | if (status != xnn_status_success) { |
| 2374 | std::cerr << "failed to create tensor w140" << std::endl; |
| 2375 | return nullptr; |
| 2376 | } |
| 2377 | |
| 2378 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(5184, int8_t)> w141_data; |
| 2379 | uint32_t w141 = XNN_INVALID_VALUE_ID; |
| 2380 | std::array<size_t, 4> w141_dims = {{1, 3, 3, 576}}; |
| 2381 | static std::array<float, 576> w141_scale; |
| 2382 | { |
| 2383 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2384 | std::generate(w141_scale.begin(), w141_scale.end(), std::ref(scalerng)); |
| 2385 | } |
| 2386 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2387 | subgraph, xnn_datatype_qcint8, |
| 2388 | /*scale=*/w141_scale.data(), |
| 2389 | w141_dims.size(), 3, w141_dims.data(), |
| 2390 | /*data=*/w141_data.data(), |
| 2391 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w141); |
| 2392 | if (status != xnn_status_success) { |
| 2393 | std::cerr << "failed to create tensor w141" << std::endl; |
| 2394 | return nullptr; |
| 2395 | } |
| 2396 | |
| 2397 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w142_data; |
| 2398 | uint32_t w142 = XNN_INVALID_VALUE_ID; |
| 2399 | std::array<size_t, 1> w142_dims = {{576}}; |
| 2400 | static std::array<float, 576> w142_scale; |
| 2401 | { |
| 2402 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2403 | std::generate(w142_scale.begin(), w142_scale.end(), std::ref(scalerng)); |
| 2404 | } |
| 2405 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2406 | subgraph, xnn_datatype_qcint32, |
| 2407 | /*scale=*/w142_scale.data(), |
| 2408 | w142_dims.size(), 0, w142_dims.data(), |
| 2409 | /*data=*/w142_data.data(), |
| 2410 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w142); |
| 2411 | if (status != xnn_status_success) { |
| 2412 | std::cerr << "failed to create tensor w142" << std::endl; |
| 2413 | return nullptr; |
| 2414 | } |
| 2415 | |
| 2416 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(55296, int8_t)> w143_data; |
| 2417 | uint32_t w143 = XNN_INVALID_VALUE_ID; |
| 2418 | std::array<size_t, 4> w143_dims = {{96, 1, 1, 576}}; |
| 2419 | static std::array<float, 96> w143_scale; |
| 2420 | { |
| 2421 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2422 | std::generate(w143_scale.begin(), w143_scale.end(), std::ref(scalerng)); |
| 2423 | } |
| 2424 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2425 | subgraph, xnn_datatype_qcint8, |
| 2426 | /*scale=*/w143_scale.data(), |
| 2427 | w143_dims.size(), 0, w143_dims.data(), |
| 2428 | /*data=*/w143_data.data(), |
| 2429 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w143); |
| 2430 | if (status != xnn_status_success) { |
| 2431 | std::cerr << "failed to create tensor w143" << std::endl; |
| 2432 | return nullptr; |
| 2433 | } |
| 2434 | |
| 2435 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(96, int32_t)> w144_data; |
| 2436 | uint32_t w144 = XNN_INVALID_VALUE_ID; |
| 2437 | std::array<size_t, 1> w144_dims = {{96}}; |
| 2438 | static std::array<float, 96> w144_scale; |
| 2439 | { |
| 2440 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2441 | std::generate(w144_scale.begin(), w144_scale.end(), std::ref(scalerng)); |
| 2442 | } |
| 2443 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2444 | subgraph, xnn_datatype_qcint32, |
| 2445 | /*scale=*/w144_scale.data(), |
| 2446 | w144_dims.size(), 0, w144_dims.data(), |
| 2447 | /*data=*/w144_data.data(), |
| 2448 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w144); |
| 2449 | if (status != xnn_status_success) { |
| 2450 | std::cerr << "failed to create tensor w144" << std::endl; |
| 2451 | return nullptr; |
| 2452 | } |
| 2453 | |
| 2454 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(55296, int8_t)> w145_data; |
| 2455 | uint32_t w145 = XNN_INVALID_VALUE_ID; |
| 2456 | std::array<size_t, 4> w145_dims = {{576, 1, 1, 96}}; |
| 2457 | static std::array<float, 576> w145_scale; |
| 2458 | { |
| 2459 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2460 | std::generate(w145_scale.begin(), w145_scale.end(), std::ref(scalerng)); |
| 2461 | } |
| 2462 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2463 | subgraph, xnn_datatype_qcint8, |
| 2464 | /*scale=*/w145_scale.data(), |
| 2465 | w145_dims.size(), 0, w145_dims.data(), |
| 2466 | /*data=*/w145_data.data(), |
| 2467 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w145); |
| 2468 | if (status != xnn_status_success) { |
| 2469 | std::cerr << "failed to create tensor w145" << std::endl; |
| 2470 | return nullptr; |
| 2471 | } |
| 2472 | |
| 2473 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w146_data; |
| 2474 | uint32_t w146 = XNN_INVALID_VALUE_ID; |
| 2475 | std::array<size_t, 1> w146_dims = {{576}}; |
| 2476 | static std::array<float, 576> w146_scale; |
| 2477 | { |
| 2478 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2479 | std::generate(w146_scale.begin(), w146_scale.end(), std::ref(scalerng)); |
| 2480 | } |
| 2481 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2482 | subgraph, xnn_datatype_qcint32, |
| 2483 | /*scale=*/w146_scale.data(), |
| 2484 | w146_dims.size(), 0, w146_dims.data(), |
| 2485 | /*data=*/w146_data.data(), |
| 2486 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w146); |
| 2487 | if (status != xnn_status_success) { |
| 2488 | std::cerr << "failed to create tensor w146" << std::endl; |
| 2489 | return nullptr; |
| 2490 | } |
| 2491 | |
| 2492 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(5184, int8_t)> w147_data; |
| 2493 | uint32_t w147 = XNN_INVALID_VALUE_ID; |
| 2494 | std::array<size_t, 4> w147_dims = {{1, 3, 3, 576}}; |
| 2495 | static std::array<float, 576> w147_scale; |
| 2496 | { |
| 2497 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2498 | std::generate(w147_scale.begin(), w147_scale.end(), std::ref(scalerng)); |
| 2499 | } |
| 2500 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2501 | subgraph, xnn_datatype_qcint8, |
| 2502 | /*scale=*/w147_scale.data(), |
| 2503 | w147_dims.size(), 3, w147_dims.data(), |
| 2504 | /*data=*/w147_data.data(), |
| 2505 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w147); |
| 2506 | if (status != xnn_status_success) { |
| 2507 | std::cerr << "failed to create tensor w147" << std::endl; |
| 2508 | return nullptr; |
| 2509 | } |
| 2510 | |
| 2511 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(576, int32_t)> w148_data; |
| 2512 | uint32_t w148 = XNN_INVALID_VALUE_ID; |
| 2513 | std::array<size_t, 1> w148_dims = {{576}}; |
| 2514 | static std::array<float, 576> w148_scale; |
| 2515 | { |
| 2516 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2517 | std::generate(w148_scale.begin(), w148_scale.end(), std::ref(scalerng)); |
| 2518 | } |
| 2519 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2520 | subgraph, xnn_datatype_qcint32, |
| 2521 | /*scale=*/w148_scale.data(), |
| 2522 | w148_dims.size(), 0, w148_dims.data(), |
| 2523 | /*data=*/w148_data.data(), |
| 2524 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w148); |
| 2525 | if (status != xnn_status_success) { |
| 2526 | std::cerr << "failed to create tensor w148" << std::endl; |
| 2527 | return nullptr; |
| 2528 | } |
| 2529 | |
| 2530 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(92160, int8_t)> w149_data; |
| 2531 | uint32_t w149 = XNN_INVALID_VALUE_ID; |
| 2532 | std::array<size_t, 4> w149_dims = {{160, 1, 1, 576}}; |
| 2533 | static std::array<float, 160> w149_scale; |
| 2534 | { |
| 2535 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2536 | std::generate(w149_scale.begin(), w149_scale.end(), std::ref(scalerng)); |
| 2537 | } |
| 2538 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2539 | subgraph, xnn_datatype_qcint8, |
| 2540 | /*scale=*/w149_scale.data(), |
| 2541 | w149_dims.size(), 0, w149_dims.data(), |
| 2542 | /*data=*/w149_data.data(), |
| 2543 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w149); |
| 2544 | if (status != xnn_status_success) { |
| 2545 | std::cerr << "failed to create tensor w149" << std::endl; |
| 2546 | return nullptr; |
| 2547 | } |
| 2548 | |
| 2549 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(160, int32_t)> w150_data; |
| 2550 | uint32_t w150 = XNN_INVALID_VALUE_ID; |
| 2551 | std::array<size_t, 1> w150_dims = {{160}}; |
| 2552 | static std::array<float, 160> w150_scale; |
| 2553 | { |
| 2554 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2555 | std::generate(w150_scale.begin(), w150_scale.end(), std::ref(scalerng)); |
| 2556 | } |
| 2557 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2558 | subgraph, xnn_datatype_qcint32, |
| 2559 | /*scale=*/w150_scale.data(), |
| 2560 | w150_dims.size(), 0, w150_dims.data(), |
| 2561 | /*data=*/w150_data.data(), |
| 2562 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w150); |
| 2563 | if (status != xnn_status_success) { |
| 2564 | std::cerr << "failed to create tensor w150" << std::endl; |
| 2565 | return nullptr; |
| 2566 | } |
| 2567 | |
| 2568 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(153600, int8_t)> w151_data; |
| 2569 | uint32_t w151 = XNN_INVALID_VALUE_ID; |
| 2570 | std::array<size_t, 4> w151_dims = {{960, 1, 1, 160}}; |
| 2571 | static std::array<float, 960> w151_scale; |
| 2572 | { |
| 2573 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2574 | std::generate(w151_scale.begin(), w151_scale.end(), std::ref(scalerng)); |
| 2575 | } |
| 2576 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2577 | subgraph, xnn_datatype_qcint8, |
| 2578 | /*scale=*/w151_scale.data(), |
| 2579 | w151_dims.size(), 0, w151_dims.data(), |
| 2580 | /*data=*/w151_data.data(), |
| 2581 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w151); |
| 2582 | if (status != xnn_status_success) { |
| 2583 | std::cerr << "failed to create tensor w151" << std::endl; |
| 2584 | return nullptr; |
| 2585 | } |
| 2586 | |
| 2587 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w152_data; |
| 2588 | uint32_t w152 = XNN_INVALID_VALUE_ID; |
| 2589 | std::array<size_t, 1> w152_dims = {{960}}; |
| 2590 | static std::array<float, 960> w152_scale; |
| 2591 | { |
| 2592 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2593 | std::generate(w152_scale.begin(), w152_scale.end(), std::ref(scalerng)); |
| 2594 | } |
| 2595 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2596 | subgraph, xnn_datatype_qcint32, |
| 2597 | /*scale=*/w152_scale.data(), |
| 2598 | w152_dims.size(), 0, w152_dims.data(), |
| 2599 | /*data=*/w152_data.data(), |
| 2600 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w152); |
| 2601 | if (status != xnn_status_success) { |
| 2602 | std::cerr << "failed to create tensor w152" << std::endl; |
| 2603 | return nullptr; |
| 2604 | } |
| 2605 | |
| 2606 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(8640, int8_t)> w153_data; |
| 2607 | uint32_t w153 = XNN_INVALID_VALUE_ID; |
| 2608 | std::array<size_t, 4> w153_dims = {{1, 3, 3, 960}}; |
| 2609 | static std::array<float, 960> w153_scale; |
| 2610 | { |
| 2611 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2612 | std::generate(w153_scale.begin(), w153_scale.end(), std::ref(scalerng)); |
| 2613 | } |
| 2614 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2615 | subgraph, xnn_datatype_qcint8, |
| 2616 | /*scale=*/w153_scale.data(), |
| 2617 | w153_dims.size(), 3, w153_dims.data(), |
| 2618 | /*data=*/w153_data.data(), |
| 2619 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w153); |
| 2620 | if (status != xnn_status_success) { |
| 2621 | std::cerr << "failed to create tensor w153" << std::endl; |
| 2622 | return nullptr; |
| 2623 | } |
| 2624 | |
| 2625 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w154_data; |
| 2626 | uint32_t w154 = XNN_INVALID_VALUE_ID; |
| 2627 | std::array<size_t, 1> w154_dims = {{960}}; |
| 2628 | static std::array<float, 960> w154_scale; |
| 2629 | { |
| 2630 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2631 | std::generate(w154_scale.begin(), w154_scale.end(), std::ref(scalerng)); |
| 2632 | } |
| 2633 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2634 | subgraph, xnn_datatype_qcint32, |
| 2635 | /*scale=*/w154_scale.data(), |
| 2636 | w154_dims.size(), 0, w154_dims.data(), |
| 2637 | /*data=*/w154_data.data(), |
| 2638 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w154); |
| 2639 | if (status != xnn_status_success) { |
| 2640 | std::cerr << "failed to create tensor w154" << std::endl; |
| 2641 | return nullptr; |
| 2642 | } |
| 2643 | |
| 2644 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(153600, int8_t)> w155_data; |
| 2645 | uint32_t w155 = XNN_INVALID_VALUE_ID; |
| 2646 | std::array<size_t, 4> w155_dims = {{160, 1, 1, 960}}; |
| 2647 | static std::array<float, 160> w155_scale; |
| 2648 | { |
| 2649 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2650 | std::generate(w155_scale.begin(), w155_scale.end(), std::ref(scalerng)); |
| 2651 | } |
| 2652 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2653 | subgraph, xnn_datatype_qcint8, |
| 2654 | /*scale=*/w155_scale.data(), |
| 2655 | w155_dims.size(), 0, w155_dims.data(), |
| 2656 | /*data=*/w155_data.data(), |
| 2657 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w155); |
| 2658 | if (status != xnn_status_success) { |
| 2659 | std::cerr << "failed to create tensor w155" << std::endl; |
| 2660 | return nullptr; |
| 2661 | } |
| 2662 | |
| 2663 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(160, int32_t)> w156_data; |
| 2664 | uint32_t w156 = XNN_INVALID_VALUE_ID; |
| 2665 | std::array<size_t, 1> w156_dims = {{160}}; |
| 2666 | static std::array<float, 160> w156_scale; |
| 2667 | { |
| 2668 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2669 | std::generate(w156_scale.begin(), w156_scale.end(), std::ref(scalerng)); |
| 2670 | } |
| 2671 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2672 | subgraph, xnn_datatype_qcint32, |
| 2673 | /*scale=*/w156_scale.data(), |
| 2674 | w156_dims.size(), 0, w156_dims.data(), |
| 2675 | /*data=*/w156_data.data(), |
| 2676 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w156); |
| 2677 | if (status != xnn_status_success) { |
| 2678 | std::cerr << "failed to create tensor w156" << std::endl; |
| 2679 | return nullptr; |
| 2680 | } |
| 2681 | |
| 2682 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(153600, int8_t)> w157_data; |
| 2683 | uint32_t w157 = XNN_INVALID_VALUE_ID; |
| 2684 | std::array<size_t, 4> w157_dims = {{960, 1, 1, 160}}; |
| 2685 | static std::array<float, 960> w157_scale; |
| 2686 | { |
| 2687 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2688 | std::generate(w157_scale.begin(), w157_scale.end(), std::ref(scalerng)); |
| 2689 | } |
| 2690 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2691 | subgraph, xnn_datatype_qcint8, |
| 2692 | /*scale=*/w157_scale.data(), |
| 2693 | w157_dims.size(), 0, w157_dims.data(), |
| 2694 | /*data=*/w157_data.data(), |
| 2695 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w157); |
| 2696 | if (status != xnn_status_success) { |
| 2697 | std::cerr << "failed to create tensor w157" << std::endl; |
| 2698 | return nullptr; |
| 2699 | } |
| 2700 | |
| 2701 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w158_data; |
| 2702 | uint32_t w158 = XNN_INVALID_VALUE_ID; |
| 2703 | std::array<size_t, 1> w158_dims = {{960}}; |
| 2704 | static std::array<float, 960> w158_scale; |
| 2705 | { |
| 2706 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2707 | std::generate(w158_scale.begin(), w158_scale.end(), std::ref(scalerng)); |
| 2708 | } |
| 2709 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2710 | subgraph, xnn_datatype_qcint32, |
| 2711 | /*scale=*/w158_scale.data(), |
| 2712 | w158_dims.size(), 0, w158_dims.data(), |
| 2713 | /*data=*/w158_data.data(), |
| 2714 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w158); |
| 2715 | if (status != xnn_status_success) { |
| 2716 | std::cerr << "failed to create tensor w158" << std::endl; |
| 2717 | return nullptr; |
| 2718 | } |
| 2719 | |
| 2720 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(8640, int8_t)> w159_data; |
| 2721 | uint32_t w159 = XNN_INVALID_VALUE_ID; |
| 2722 | std::array<size_t, 4> w159_dims = {{1, 3, 3, 960}}; |
| 2723 | static std::array<float, 960> w159_scale; |
| 2724 | { |
| 2725 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2726 | std::generate(w159_scale.begin(), w159_scale.end(), std::ref(scalerng)); |
| 2727 | } |
| 2728 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2729 | subgraph, xnn_datatype_qcint8, |
| 2730 | /*scale=*/w159_scale.data(), |
| 2731 | w159_dims.size(), 3, w159_dims.data(), |
| 2732 | /*data=*/w159_data.data(), |
| 2733 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w159); |
| 2734 | if (status != xnn_status_success) { |
| 2735 | std::cerr << "failed to create tensor w159" << std::endl; |
| 2736 | return nullptr; |
| 2737 | } |
| 2738 | |
| 2739 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w160_data; |
| 2740 | uint32_t w160 = XNN_INVALID_VALUE_ID; |
| 2741 | std::array<size_t, 1> w160_dims = {{960}}; |
| 2742 | static std::array<float, 960> w160_scale; |
| 2743 | { |
| 2744 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2745 | std::generate(w160_scale.begin(), w160_scale.end(), std::ref(scalerng)); |
| 2746 | } |
| 2747 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2748 | subgraph, xnn_datatype_qcint32, |
| 2749 | /*scale=*/w160_scale.data(), |
| 2750 | w160_dims.size(), 0, w160_dims.data(), |
| 2751 | /*data=*/w160_data.data(), |
| 2752 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w160); |
| 2753 | if (status != xnn_status_success) { |
| 2754 | std::cerr << "failed to create tensor w160" << std::endl; |
| 2755 | return nullptr; |
| 2756 | } |
| 2757 | |
| 2758 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(153600, int8_t)> w161_data; |
| 2759 | uint32_t w161 = XNN_INVALID_VALUE_ID; |
| 2760 | std::array<size_t, 4> w161_dims = {{160, 1, 1, 960}}; |
| 2761 | static std::array<float, 160> w161_scale; |
| 2762 | { |
| 2763 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2764 | std::generate(w161_scale.begin(), w161_scale.end(), std::ref(scalerng)); |
| 2765 | } |
| 2766 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2767 | subgraph, xnn_datatype_qcint8, |
| 2768 | /*scale=*/w161_scale.data(), |
| 2769 | w161_dims.size(), 0, w161_dims.data(), |
| 2770 | /*data=*/w161_data.data(), |
| 2771 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w161); |
| 2772 | if (status != xnn_status_success) { |
| 2773 | std::cerr << "failed to create tensor w161" << std::endl; |
| 2774 | return nullptr; |
| 2775 | } |
| 2776 | |
| 2777 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(160, int32_t)> w162_data; |
| 2778 | uint32_t w162 = XNN_INVALID_VALUE_ID; |
| 2779 | std::array<size_t, 1> w162_dims = {{160}}; |
| 2780 | static std::array<float, 160> w162_scale; |
| 2781 | { |
| 2782 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2783 | std::generate(w162_scale.begin(), w162_scale.end(), std::ref(scalerng)); |
| 2784 | } |
| 2785 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2786 | subgraph, xnn_datatype_qcint32, |
| 2787 | /*scale=*/w162_scale.data(), |
| 2788 | w162_dims.size(), 0, w162_dims.data(), |
| 2789 | /*data=*/w162_data.data(), |
| 2790 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w162); |
| 2791 | if (status != xnn_status_success) { |
| 2792 | std::cerr << "failed to create tensor w162" << std::endl; |
| 2793 | return nullptr; |
| 2794 | } |
| 2795 | |
| 2796 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(153600, int8_t)> w163_data; |
| 2797 | uint32_t w163 = XNN_INVALID_VALUE_ID; |
| 2798 | std::array<size_t, 4> w163_dims = {{960, 1, 1, 160}}; |
| 2799 | static std::array<float, 960> w163_scale; |
| 2800 | { |
| 2801 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2802 | std::generate(w163_scale.begin(), w163_scale.end(), std::ref(scalerng)); |
| 2803 | } |
| 2804 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2805 | subgraph, xnn_datatype_qcint8, |
| 2806 | /*scale=*/w163_scale.data(), |
| 2807 | w163_dims.size(), 0, w163_dims.data(), |
| 2808 | /*data=*/w163_data.data(), |
| 2809 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w163); |
| 2810 | if (status != xnn_status_success) { |
| 2811 | std::cerr << "failed to create tensor w163" << std::endl; |
| 2812 | return nullptr; |
| 2813 | } |
| 2814 | |
| 2815 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w164_data; |
| 2816 | uint32_t w164 = XNN_INVALID_VALUE_ID; |
| 2817 | std::array<size_t, 1> w164_dims = {{960}}; |
| 2818 | static std::array<float, 960> w164_scale; |
| 2819 | { |
| 2820 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2821 | std::generate(w164_scale.begin(), w164_scale.end(), std::ref(scalerng)); |
| 2822 | } |
| 2823 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2824 | subgraph, xnn_datatype_qcint32, |
| 2825 | /*scale=*/w164_scale.data(), |
| 2826 | w164_dims.size(), 0, w164_dims.data(), |
| 2827 | /*data=*/w164_data.data(), |
| 2828 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w164); |
| 2829 | if (status != xnn_status_success) { |
| 2830 | std::cerr << "failed to create tensor w164" << std::endl; |
| 2831 | return nullptr; |
| 2832 | } |
| 2833 | |
| 2834 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(8640, int8_t)> w165_data; |
| 2835 | uint32_t w165 = XNN_INVALID_VALUE_ID; |
| 2836 | std::array<size_t, 4> w165_dims = {{1, 3, 3, 960}}; |
| 2837 | static std::array<float, 960> w165_scale; |
| 2838 | { |
| 2839 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2840 | std::generate(w165_scale.begin(), w165_scale.end(), std::ref(scalerng)); |
| 2841 | } |
| 2842 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2843 | subgraph, xnn_datatype_qcint8, |
| 2844 | /*scale=*/w165_scale.data(), |
| 2845 | w165_dims.size(), 3, w165_dims.data(), |
| 2846 | /*data=*/w165_data.data(), |
| 2847 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w165); |
| 2848 | if (status != xnn_status_success) { |
| 2849 | std::cerr << "failed to create tensor w165" << std::endl; |
| 2850 | return nullptr; |
| 2851 | } |
| 2852 | |
| 2853 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(960, int32_t)> w166_data; |
| 2854 | uint32_t w166 = XNN_INVALID_VALUE_ID; |
| 2855 | std::array<size_t, 1> w166_dims = {{960}}; |
| 2856 | static std::array<float, 960> w166_scale; |
| 2857 | { |
| 2858 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2859 | std::generate(w166_scale.begin(), w166_scale.end(), std::ref(scalerng)); |
| 2860 | } |
| 2861 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2862 | subgraph, xnn_datatype_qcint32, |
| 2863 | /*scale=*/w166_scale.data(), |
| 2864 | w166_dims.size(), 0, w166_dims.data(), |
| 2865 | /*data=*/w166_data.data(), |
| 2866 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w166); |
| 2867 | if (status != xnn_status_success) { |
| 2868 | std::cerr << "failed to create tensor w166" << std::endl; |
| 2869 | return nullptr; |
| 2870 | } |
| 2871 | |
| 2872 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(307200, int8_t)> w167_data; |
| 2873 | uint32_t w167 = XNN_INVALID_VALUE_ID; |
| 2874 | std::array<size_t, 4> w167_dims = {{320, 1, 1, 960}}; |
| 2875 | static std::array<float, 320> w167_scale; |
| 2876 | { |
| 2877 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2878 | std::generate(w167_scale.begin(), w167_scale.end(), std::ref(scalerng)); |
| 2879 | } |
| 2880 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2881 | subgraph, xnn_datatype_qcint8, |
| 2882 | /*scale=*/w167_scale.data(), |
| 2883 | w167_dims.size(), 0, w167_dims.data(), |
| 2884 | /*data=*/w167_data.data(), |
| 2885 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w167); |
| 2886 | if (status != xnn_status_success) { |
| 2887 | std::cerr << "failed to create tensor w167" << std::endl; |
| 2888 | return nullptr; |
| 2889 | } |
| 2890 | |
| 2891 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(320, int32_t)> w168_data; |
| 2892 | uint32_t w168 = XNN_INVALID_VALUE_ID; |
| 2893 | std::array<size_t, 1> w168_dims = {{320}}; |
| 2894 | static std::array<float, 320> w168_scale; |
| 2895 | { |
| 2896 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2897 | std::generate(w168_scale.begin(), w168_scale.end(), std::ref(scalerng)); |
| 2898 | } |
| 2899 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2900 | subgraph, xnn_datatype_qcint32, |
| 2901 | /*scale=*/w168_scale.data(), |
| 2902 | w168_dims.size(), 0, w168_dims.data(), |
| 2903 | /*data=*/w168_data.data(), |
| 2904 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w168); |
| 2905 | if (status != xnn_status_success) { |
| 2906 | std::cerr << "failed to create tensor w168" << std::endl; |
| 2907 | return nullptr; |
| 2908 | } |
| 2909 | |
| 2910 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(409600, int8_t)> w169_data; |
| 2911 | uint32_t w169 = XNN_INVALID_VALUE_ID; |
| 2912 | std::array<size_t, 4> w169_dims = {{1280, 1, 1, 320}}; |
| 2913 | static std::array<float, 1280> w169_scale; |
| 2914 | { |
| 2915 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2916 | std::generate(w169_scale.begin(), w169_scale.end(), std::ref(scalerng)); |
| 2917 | } |
| 2918 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2919 | subgraph, xnn_datatype_qcint8, |
| 2920 | /*scale=*/w169_scale.data(), |
| 2921 | w169_dims.size(), 0, w169_dims.data(), |
| 2922 | /*data=*/w169_data.data(), |
| 2923 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w169); |
| 2924 | if (status != xnn_status_success) { |
| 2925 | std::cerr << "failed to create tensor w169" << std::endl; |
| 2926 | return nullptr; |
| 2927 | } |
| 2928 | |
| 2929 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(1280, int32_t)> w170_data; |
| 2930 | uint32_t w170 = XNN_INVALID_VALUE_ID; |
| 2931 | std::array<size_t, 1> w170_dims = {{1280}}; |
| 2932 | static std::array<float, 1280> w170_scale; |
| 2933 | { |
| 2934 | auto scalerng = std::bind(std::uniform_real_distribution<float>(0.01f, 1.0f), std::ref(rng)); |
| 2935 | std::generate(w170_scale.begin(), w170_scale.end(), std::ref(scalerng)); |
| 2936 | } |
| 2937 | status = xnn_define_channelwise_quantized_tensor_value( |
| 2938 | subgraph, xnn_datatype_qcint32, |
| 2939 | /*scale=*/w170_scale.data(), |
| 2940 | w170_dims.size(), 0, w170_dims.data(), |
| 2941 | /*data=*/w170_data.data(), |
| 2942 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w170); |
| 2943 | if (status != xnn_status_success) { |
| 2944 | std::cerr << "failed to create tensor w170" << std::endl; |
| 2945 | return nullptr; |
| 2946 | } |
| 2947 | |
| 2948 | alignas(16) static std::array<int8_t, XNN_PAD_EXTRA_BYTES(1281280, int8_t)> w171_data; |
| 2949 | uint32_t w171 = XNN_INVALID_VALUE_ID; |
| 2950 | std::array<size_t, 2> w171_dims = {{1001, 1280}}; |
| 2951 | status = xnn_define_quantized_tensor_value( |
| 2952 | subgraph, xnn_datatype_qint8, |
| 2953 | /*zero_point=*/0, |
| 2954 | /*scale=*/0.004167426843196154f, |
| 2955 | w171_dims.size(), w171_dims.data(), |
| 2956 | /*data=*/w171_data.data(), |
| 2957 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w171); |
| 2958 | if (status != xnn_status_success) { |
| 2959 | std::cerr << "failed to create tensor w171" << std::endl; |
| 2960 | return nullptr; |
| 2961 | } |
| 2962 | |
| 2963 | alignas(16) static std::array<int32_t, XNN_PAD_EXTRA_BYTES(1001, int32_t)> w172_data; |
| 2964 | uint32_t w172 = XNN_INVALID_VALUE_ID; |
| 2965 | std::array<size_t, 1> w172_dims = {{1001}}; |
| 2966 | status = xnn_define_quantized_tensor_value( |
| 2967 | subgraph, xnn_datatype_qint32, |
| 2968 | /*zero_point=*/0, |
| 2969 | /*scale=*/7.704259769525379e-05f, |
| 2970 | w172_dims.size(), w172_dims.data(), |
| 2971 | /*data=*/w172_data.data(), |
| 2972 | XNN_INVALID_VALUE_ID, /*flags=*/0, &w172); |
| 2973 | if (status != xnn_status_success) { |
| 2974 | std::cerr << "failed to create tensor w172" << std::endl; |
| 2975 | return nullptr; |
| 2976 | } |
| 2977 | |
| 2978 | auto qs8rng = std::bind(std::uniform_int_distribution<int>(std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max()), std::ref(rng)); |
| 2979 | auto qc8rng = std::bind(std::uniform_int_distribution<int>(std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max()), std::ref(rng)); |
| 2980 | auto qs32rng = std::bind(std::uniform_int_distribution<int>(-10000, 10000), std::ref(rng)); |
| 2981 | auto qc32rng = std::bind(std::uniform_int_distribution<int>(-10000, 10000), std::ref(rng)); |
| 2982 | std::generate(w67_data.begin(), w67_data.end(), std::ref(qc8rng)); |
| 2983 | std::generate(w68_data.begin(), w68_data.end(), std::ref(qc32rng)); |
| 2984 | std::generate(w69_data.begin(), w69_data.end(), std::ref(qc8rng)); |
| 2985 | std::generate(w70_data.begin(), w70_data.end(), std::ref(qc32rng)); |
| 2986 | std::generate(w71_data.begin(), w71_data.end(), std::ref(qc8rng)); |
| 2987 | std::generate(w72_data.begin(), w72_data.end(), std::ref(qc32rng)); |
| 2988 | std::generate(w73_data.begin(), w73_data.end(), std::ref(qc8rng)); |
| 2989 | std::generate(w74_data.begin(), w74_data.end(), std::ref(qc32rng)); |
| 2990 | std::generate(w75_data.begin(), w75_data.end(), std::ref(qc8rng)); |
| 2991 | std::generate(w76_data.begin(), w76_data.end(), std::ref(qc32rng)); |
| 2992 | std::generate(w77_data.begin(), w77_data.end(), std::ref(qc8rng)); |
| 2993 | std::generate(w78_data.begin(), w78_data.end(), std::ref(qc32rng)); |
| 2994 | std::generate(w79_data.begin(), w79_data.end(), std::ref(qc8rng)); |
| 2995 | std::generate(w80_data.begin(), w80_data.end(), std::ref(qc32rng)); |
| 2996 | std::generate(w81_data.begin(), w81_data.end(), std::ref(qc8rng)); |
| 2997 | std::generate(w82_data.begin(), w82_data.end(), std::ref(qc32rng)); |
| 2998 | std::generate(w83_data.begin(), w83_data.end(), std::ref(qc8rng)); |
| 2999 | std::generate(w84_data.begin(), w84_data.end(), std::ref(qc32rng)); |
| 3000 | std::generate(w85_data.begin(), w85_data.end(), std::ref(qc8rng)); |
| 3001 | std::generate(w86_data.begin(), w86_data.end(), std::ref(qc32rng)); |
| 3002 | std::generate(w87_data.begin(), w87_data.end(), std::ref(qc8rng)); |
| 3003 | std::generate(w88_data.begin(), w88_data.end(), std::ref(qc32rng)); |
| 3004 | std::generate(w89_data.begin(), w89_data.end(), std::ref(qc8rng)); |
| 3005 | std::generate(w90_data.begin(), w90_data.end(), std::ref(qc32rng)); |
| 3006 | std::generate(w91_data.begin(), w91_data.end(), std::ref(qc8rng)); |
| 3007 | std::generate(w92_data.begin(), w92_data.end(), std::ref(qc32rng)); |
| 3008 | std::generate(w93_data.begin(), w93_data.end(), std::ref(qc8rng)); |
| 3009 | std::generate(w94_data.begin(), w94_data.end(), std::ref(qc32rng)); |
| 3010 | std::generate(w95_data.begin(), w95_data.end(), std::ref(qc8rng)); |
| 3011 | std::generate(w96_data.begin(), w96_data.end(), std::ref(qc32rng)); |
| 3012 | std::generate(w97_data.begin(), w97_data.end(), std::ref(qc8rng)); |
| 3013 | std::generate(w98_data.begin(), w98_data.end(), std::ref(qc32rng)); |
| 3014 | std::generate(w99_data.begin(), w99_data.end(), std::ref(qc8rng)); |
| 3015 | std::generate(w100_data.begin(), w100_data.end(), std::ref(qc32rng)); |
| 3016 | std::generate(w101_data.begin(), w101_data.end(), std::ref(qc8rng)); |
| 3017 | std::generate(w102_data.begin(), w102_data.end(), std::ref(qc32rng)); |
| 3018 | std::generate(w103_data.begin(), w103_data.end(), std::ref(qc8rng)); |
| 3019 | std::generate(w104_data.begin(), w104_data.end(), std::ref(qc32rng)); |
| 3020 | std::generate(w105_data.begin(), w105_data.end(), std::ref(qc8rng)); |
| 3021 | std::generate(w106_data.begin(), w106_data.end(), std::ref(qc32rng)); |
| 3022 | std::generate(w107_data.begin(), w107_data.end(), std::ref(qc8rng)); |
| 3023 | std::generate(w108_data.begin(), w108_data.end(), std::ref(qc32rng)); |
| 3024 | std::generate(w109_data.begin(), w109_data.end(), std::ref(qc8rng)); |
| 3025 | std::generate(w110_data.begin(), w110_data.end(), std::ref(qc32rng)); |
| 3026 | std::generate(w111_data.begin(), w111_data.end(), std::ref(qc8rng)); |
| 3027 | std::generate(w112_data.begin(), w112_data.end(), std::ref(qc32rng)); |
| 3028 | std::generate(w113_data.begin(), w113_data.end(), std::ref(qc8rng)); |
| 3029 | std::generate(w114_data.begin(), w114_data.end(), std::ref(qc32rng)); |
| 3030 | std::generate(w115_data.begin(), w115_data.end(), std::ref(qc8rng)); |
| 3031 | std::generate(w116_data.begin(), w116_data.end(), std::ref(qc32rng)); |
| 3032 | std::generate(w117_data.begin(), w117_data.end(), std::ref(qc8rng)); |
| 3033 | std::generate(w118_data.begin(), w118_data.end(), std::ref(qc32rng)); |
| 3034 | std::generate(w119_data.begin(), w119_data.end(), std::ref(qc8rng)); |
| 3035 | std::generate(w120_data.begin(), w120_data.end(), std::ref(qc32rng)); |
| 3036 | std::generate(w121_data.begin(), w121_data.end(), std::ref(qc8rng)); |
| 3037 | std::generate(w122_data.begin(), w122_data.end(), std::ref(qc32rng)); |
| 3038 | std::generate(w123_data.begin(), w123_data.end(), std::ref(qc8rng)); |
| 3039 | std::generate(w124_data.begin(), w124_data.end(), std::ref(qc32rng)); |
| 3040 | std::generate(w125_data.begin(), w125_data.end(), std::ref(qc8rng)); |
| 3041 | std::generate(w126_data.begin(), w126_data.end(), std::ref(qc32rng)); |
| 3042 | std::generate(w127_data.begin(), w127_data.end(), std::ref(qc8rng)); |
| 3043 | std::generate(w128_data.begin(), w128_data.end(), std::ref(qc32rng)); |
| 3044 | std::generate(w129_data.begin(), w129_data.end(), std::ref(qc8rng)); |
| 3045 | std::generate(w130_data.begin(), w130_data.end(), std::ref(qc32rng)); |
| 3046 | std::generate(w131_data.begin(), w131_data.end(), std::ref(qc8rng)); |
| 3047 | std::generate(w132_data.begin(), w132_data.end(), std::ref(qc32rng)); |
| 3048 | std::generate(w133_data.begin(), w133_data.end(), std::ref(qc8rng)); |
| 3049 | std::generate(w134_data.begin(), w134_data.end(), std::ref(qc32rng)); |
| 3050 | std::generate(w135_data.begin(), w135_data.end(), std::ref(qc8rng)); |
| 3051 | std::generate(w136_data.begin(), w136_data.end(), std::ref(qc32rng)); |
| 3052 | std::generate(w137_data.begin(), w137_data.end(), std::ref(qc8rng)); |
| 3053 | std::generate(w138_data.begin(), w138_data.end(), std::ref(qc32rng)); |
| 3054 | std::generate(w139_data.begin(), w139_data.end(), std::ref(qc8rng)); |
| 3055 | std::generate(w140_data.begin(), w140_data.end(), std::ref(qc32rng)); |
| 3056 | std::generate(w141_data.begin(), w141_data.end(), std::ref(qc8rng)); |
| 3057 | std::generate(w142_data.begin(), w142_data.end(), std::ref(qc32rng)); |
| 3058 | std::generate(w143_data.begin(), w143_data.end(), std::ref(qc8rng)); |
| 3059 | std::generate(w144_data.begin(), w144_data.end(), std::ref(qc32rng)); |
| 3060 | std::generate(w145_data.begin(), w145_data.end(), std::ref(qc8rng)); |
| 3061 | std::generate(w146_data.begin(), w146_data.end(), std::ref(qc32rng)); |
| 3062 | std::generate(w147_data.begin(), w147_data.end(), std::ref(qc8rng)); |
| 3063 | std::generate(w148_data.begin(), w148_data.end(), std::ref(qc32rng)); |
| 3064 | std::generate(w149_data.begin(), w149_data.end(), std::ref(qc8rng)); |
| 3065 | std::generate(w150_data.begin(), w150_data.end(), std::ref(qc32rng)); |
| 3066 | std::generate(w151_data.begin(), w151_data.end(), std::ref(qc8rng)); |
| 3067 | std::generate(w152_data.begin(), w152_data.end(), std::ref(qc32rng)); |
| 3068 | std::generate(w153_data.begin(), w153_data.end(), std::ref(qc8rng)); |
| 3069 | std::generate(w154_data.begin(), w154_data.end(), std::ref(qc32rng)); |
| 3070 | std::generate(w155_data.begin(), w155_data.end(), std::ref(qc8rng)); |
| 3071 | std::generate(w156_data.begin(), w156_data.end(), std::ref(qc32rng)); |
| 3072 | std::generate(w157_data.begin(), w157_data.end(), std::ref(qc8rng)); |
| 3073 | std::generate(w158_data.begin(), w158_data.end(), std::ref(qc32rng)); |
| 3074 | std::generate(w159_data.begin(), w159_data.end(), std::ref(qc8rng)); |
| 3075 | std::generate(w160_data.begin(), w160_data.end(), std::ref(qc32rng)); |
| 3076 | std::generate(w161_data.begin(), w161_data.end(), std::ref(qc8rng)); |
| 3077 | std::generate(w162_data.begin(), w162_data.end(), std::ref(qc32rng)); |
| 3078 | std::generate(w163_data.begin(), w163_data.end(), std::ref(qc8rng)); |
| 3079 | std::generate(w164_data.begin(), w164_data.end(), std::ref(qc32rng)); |
| 3080 | std::generate(w165_data.begin(), w165_data.end(), std::ref(qc8rng)); |
| 3081 | std::generate(w166_data.begin(), w166_data.end(), std::ref(qc32rng)); |
| 3082 | std::generate(w167_data.begin(), w167_data.end(), std::ref(qc8rng)); |
| 3083 | std::generate(w168_data.begin(), w168_data.end(), std::ref(qc32rng)); |
| 3084 | std::generate(w169_data.begin(), w169_data.end(), std::ref(qc8rng)); |
| 3085 | std::generate(w170_data.begin(), w170_data.end(), std::ref(qc32rng)); |
| 3086 | std::generate(w171_data.begin(), w171_data.end(), std::ref(qs8rng)); |
| 3087 | std::generate(w172_data.begin(), w172_data.end(), std::ref(qs32rng)); |
| 3088 | |
| 3089 | status = xnn_define_unary( |
| 3090 | subgraph, |
| 3091 | xnn_unary_convert, |
| 3092 | /*params=*/nullptr, |
| 3093 | v0, |
| 3094 | v1, |
| 3095 | 0); |
| 3096 | if (status != xnn_status_success) { |
| 3097 | std::cerr << "failed to create node #0" << std::endl; |
| 3098 | return nullptr; |
| 3099 | } |
| 3100 | |
| 3101 | status = xnn_define_convolution_2d( |
| 3102 | subgraph, |
| 3103 | /*padding_top=*/0, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/0, |
| 3104 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3105 | /*subsampling_height=*/2, /*subsampling_width=*/2, |
| 3106 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3107 | /*groups=*/1, |
| 3108 | /*group_input_channels=*/3, |
| 3109 | /*group_output_channels=*/32, |
| 3110 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3111 | v1, |
| 3112 | w67, |
| 3113 | w68, |
| 3114 | v2, |
| 3115 | /*flags=*/0); |
| 3116 | if (status != xnn_status_success) { |
| 3117 | std::cerr << "failed to create node #1" << std::endl; |
| 3118 | return nullptr; |
| 3119 | } |
| 3120 | |
| 3121 | status = xnn_define_depthwise_convolution_2d( |
| 3122 | subgraph, |
| 3123 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3124 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3125 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3126 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3127 | /*depth_multiplier=*/1, |
| 3128 | /*input_channels=*/32, |
| 3129 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3130 | v2, |
| 3131 | w69, |
| 3132 | w70, |
| 3133 | v3, |
| 3134 | /*flags=*/0); |
| 3135 | if (status != xnn_status_success) { |
| 3136 | std::cerr << "failed to create node #2" << std::endl; |
| 3137 | return nullptr; |
| 3138 | } |
| 3139 | |
| 3140 | status = xnn_define_convolution_2d( |
| 3141 | subgraph, |
| 3142 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3143 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3144 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3145 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3146 | /*groups=*/1, |
| 3147 | /*group_input_channels=*/32, |
| 3148 | /*group_output_channels=*/16, |
| 3149 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3150 | v3, |
| 3151 | w71, |
| 3152 | w72, |
| 3153 | v4, |
| 3154 | /*flags=*/0); |
| 3155 | if (status != xnn_status_success) { |
| 3156 | std::cerr << "failed to create node #3" << std::endl; |
| 3157 | return nullptr; |
| 3158 | } |
| 3159 | |
| 3160 | status = xnn_define_convolution_2d( |
| 3161 | subgraph, |
| 3162 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3163 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3164 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3165 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3166 | /*groups=*/1, |
| 3167 | /*group_input_channels=*/16, |
| 3168 | /*group_output_channels=*/96, |
| 3169 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3170 | v4, |
| 3171 | w73, |
| 3172 | w74, |
| 3173 | v5, |
| 3174 | /*flags=*/0); |
| 3175 | if (status != xnn_status_success) { |
| 3176 | std::cerr << "failed to create node #4" << std::endl; |
| 3177 | return nullptr; |
| 3178 | } |
| 3179 | |
| 3180 | status = xnn_define_depthwise_convolution_2d( |
| 3181 | subgraph, |
| 3182 | /*padding_top=*/0, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/0, |
| 3183 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3184 | /*subsampling_height=*/2, /*subsampling_width=*/2, |
| 3185 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3186 | /*depth_multiplier=*/1, |
| 3187 | /*input_channels=*/96, |
| 3188 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3189 | v5, |
| 3190 | w75, |
| 3191 | w76, |
| 3192 | v6, |
| 3193 | /*flags=*/0); |
| 3194 | if (status != xnn_status_success) { |
| 3195 | std::cerr << "failed to create node #5" << std::endl; |
| 3196 | return nullptr; |
| 3197 | } |
| 3198 | |
| 3199 | status = xnn_define_convolution_2d( |
| 3200 | subgraph, |
| 3201 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3202 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3203 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3204 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3205 | /*groups=*/1, |
| 3206 | /*group_input_channels=*/96, |
| 3207 | /*group_output_channels=*/24, |
| 3208 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3209 | v6, |
| 3210 | w77, |
| 3211 | w78, |
| 3212 | v7, |
| 3213 | /*flags=*/0); |
| 3214 | if (status != xnn_status_success) { |
| 3215 | std::cerr << "failed to create node #6" << std::endl; |
| 3216 | return nullptr; |
| 3217 | } |
| 3218 | |
| 3219 | status = xnn_define_convolution_2d( |
| 3220 | subgraph, |
| 3221 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3222 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3223 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3224 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3225 | /*groups=*/1, |
| 3226 | /*group_input_channels=*/24, |
| 3227 | /*group_output_channels=*/144, |
| 3228 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3229 | v7, |
| 3230 | w79, |
| 3231 | w80, |
| 3232 | v8, |
| 3233 | /*flags=*/0); |
| 3234 | if (status != xnn_status_success) { |
| 3235 | std::cerr << "failed to create node #7" << std::endl; |
| 3236 | return nullptr; |
| 3237 | } |
| 3238 | |
| 3239 | status = xnn_define_depthwise_convolution_2d( |
| 3240 | subgraph, |
| 3241 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3242 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3243 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3244 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3245 | /*depth_multiplier=*/1, |
| 3246 | /*input_channels=*/144, |
| 3247 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3248 | v8, |
| 3249 | w81, |
| 3250 | w82, |
| 3251 | v9, |
| 3252 | /*flags=*/0); |
| 3253 | if (status != xnn_status_success) { |
| 3254 | std::cerr << "failed to create node #8" << std::endl; |
| 3255 | return nullptr; |
| 3256 | } |
| 3257 | |
| 3258 | status = xnn_define_convolution_2d( |
| 3259 | subgraph, |
| 3260 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3261 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3262 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3263 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3264 | /*groups=*/1, |
| 3265 | /*group_input_channels=*/144, |
| 3266 | /*group_output_channels=*/24, |
| 3267 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3268 | v9, |
| 3269 | w83, |
| 3270 | w84, |
| 3271 | v10, |
| 3272 | /*flags=*/0); |
| 3273 | if (status != xnn_status_success) { |
| 3274 | std::cerr << "failed to create node #9" << std::endl; |
| 3275 | return nullptr; |
| 3276 | } |
| 3277 | |
| 3278 | xnn_binary_params v11_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3279 | status = xnn_define_binary( |
| 3280 | subgraph, |
| 3281 | xnn_binary_add, |
| 3282 | &v11_params, |
| 3283 | v10, |
| 3284 | v7, |
| 3285 | v11, |
| 3286 | /*flags=*/0); |
| 3287 | if (status != xnn_status_success) { |
| 3288 | std::cerr << "failed to create node #10" << std::endl; |
| 3289 | return nullptr; |
| 3290 | } |
| 3291 | |
| 3292 | status = xnn_define_convolution_2d( |
| 3293 | subgraph, |
| 3294 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3295 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3296 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3297 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3298 | /*groups=*/1, |
| 3299 | /*group_input_channels=*/24, |
| 3300 | /*group_output_channels=*/144, |
| 3301 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3302 | v11, |
| 3303 | w85, |
| 3304 | w86, |
| 3305 | v12, |
| 3306 | /*flags=*/0); |
| 3307 | if (status != xnn_status_success) { |
| 3308 | std::cerr << "failed to create node #11" << std::endl; |
| 3309 | return nullptr; |
| 3310 | } |
| 3311 | |
| 3312 | status = xnn_define_depthwise_convolution_2d( |
| 3313 | subgraph, |
| 3314 | /*padding_top=*/0, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/0, |
| 3315 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3316 | /*subsampling_height=*/2, /*subsampling_width=*/2, |
| 3317 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3318 | /*depth_multiplier=*/1, |
| 3319 | /*input_channels=*/144, |
| 3320 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3321 | v12, |
| 3322 | w87, |
| 3323 | w88, |
| 3324 | v13, |
| 3325 | /*flags=*/0); |
| 3326 | if (status != xnn_status_success) { |
| 3327 | std::cerr << "failed to create node #12" << std::endl; |
| 3328 | return nullptr; |
| 3329 | } |
| 3330 | |
| 3331 | status = xnn_define_convolution_2d( |
| 3332 | subgraph, |
| 3333 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3334 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3335 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3336 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3337 | /*groups=*/1, |
| 3338 | /*group_input_channels=*/144, |
| 3339 | /*group_output_channels=*/32, |
| 3340 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3341 | v13, |
| 3342 | w89, |
| 3343 | w90, |
| 3344 | v14, |
| 3345 | /*flags=*/0); |
| 3346 | if (status != xnn_status_success) { |
| 3347 | std::cerr << "failed to create node #13" << std::endl; |
| 3348 | return nullptr; |
| 3349 | } |
| 3350 | |
| 3351 | status = xnn_define_convolution_2d( |
| 3352 | subgraph, |
| 3353 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3354 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3355 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3356 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3357 | /*groups=*/1, |
| 3358 | /*group_input_channels=*/32, |
| 3359 | /*group_output_channels=*/192, |
| 3360 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3361 | v14, |
| 3362 | w91, |
| 3363 | w92, |
| 3364 | v15, |
| 3365 | /*flags=*/0); |
| 3366 | if (status != xnn_status_success) { |
| 3367 | std::cerr << "failed to create node #14" << std::endl; |
| 3368 | return nullptr; |
| 3369 | } |
| 3370 | |
| 3371 | status = xnn_define_depthwise_convolution_2d( |
| 3372 | subgraph, |
| 3373 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3374 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3375 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3376 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3377 | /*depth_multiplier=*/1, |
| 3378 | /*input_channels=*/192, |
| 3379 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3380 | v15, |
| 3381 | w93, |
| 3382 | w94, |
| 3383 | v16, |
| 3384 | /*flags=*/0); |
| 3385 | if (status != xnn_status_success) { |
| 3386 | std::cerr << "failed to create node #15" << std::endl; |
| 3387 | return nullptr; |
| 3388 | } |
| 3389 | |
| 3390 | status = xnn_define_convolution_2d( |
| 3391 | subgraph, |
| 3392 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3393 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3394 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3395 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3396 | /*groups=*/1, |
| 3397 | /*group_input_channels=*/192, |
| 3398 | /*group_output_channels=*/32, |
| 3399 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3400 | v16, |
| 3401 | w95, |
| 3402 | w96, |
| 3403 | v17, |
| 3404 | /*flags=*/0); |
| 3405 | if (status != xnn_status_success) { |
| 3406 | std::cerr << "failed to create node #16" << std::endl; |
| 3407 | return nullptr; |
| 3408 | } |
| 3409 | |
| 3410 | xnn_binary_params v18_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3411 | status = xnn_define_binary( |
| 3412 | subgraph, |
| 3413 | xnn_binary_add, |
| 3414 | &v18_params, |
| 3415 | v17, |
| 3416 | v14, |
| 3417 | v18, |
| 3418 | /*flags=*/0); |
| 3419 | if (status != xnn_status_success) { |
| 3420 | std::cerr << "failed to create node #17" << std::endl; |
| 3421 | return nullptr; |
| 3422 | } |
| 3423 | |
| 3424 | status = xnn_define_convolution_2d( |
| 3425 | subgraph, |
| 3426 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3427 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3428 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3429 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3430 | /*groups=*/1, |
| 3431 | /*group_input_channels=*/32, |
| 3432 | /*group_output_channels=*/192, |
| 3433 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3434 | v18, |
| 3435 | w97, |
| 3436 | w98, |
| 3437 | v19, |
| 3438 | /*flags=*/0); |
| 3439 | if (status != xnn_status_success) { |
| 3440 | std::cerr << "failed to create node #18" << std::endl; |
| 3441 | return nullptr; |
| 3442 | } |
| 3443 | |
| 3444 | status = xnn_define_depthwise_convolution_2d( |
| 3445 | subgraph, |
| 3446 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3447 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3448 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3449 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3450 | /*depth_multiplier=*/1, |
| 3451 | /*input_channels=*/192, |
| 3452 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3453 | v19, |
| 3454 | w99, |
| 3455 | w100, |
| 3456 | v20, |
| 3457 | /*flags=*/0); |
| 3458 | if (status != xnn_status_success) { |
| 3459 | std::cerr << "failed to create node #19" << std::endl; |
| 3460 | return nullptr; |
| 3461 | } |
| 3462 | |
| 3463 | status = xnn_define_convolution_2d( |
| 3464 | subgraph, |
| 3465 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3466 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3467 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3468 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3469 | /*groups=*/1, |
| 3470 | /*group_input_channels=*/192, |
| 3471 | /*group_output_channels=*/32, |
| 3472 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3473 | v20, |
| 3474 | w101, |
| 3475 | w102, |
| 3476 | v21, |
| 3477 | /*flags=*/0); |
| 3478 | if (status != xnn_status_success) { |
| 3479 | std::cerr << "failed to create node #20" << std::endl; |
| 3480 | return nullptr; |
| 3481 | } |
| 3482 | |
| 3483 | xnn_binary_params v22_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3484 | status = xnn_define_binary( |
| 3485 | subgraph, |
| 3486 | xnn_binary_add, |
| 3487 | &v22_params, |
| 3488 | v21, |
| 3489 | v18, |
| 3490 | v22, |
| 3491 | /*flags=*/0); |
| 3492 | if (status != xnn_status_success) { |
| 3493 | std::cerr << "failed to create node #21" << std::endl; |
| 3494 | return nullptr; |
| 3495 | } |
| 3496 | |
| 3497 | status = xnn_define_convolution_2d( |
| 3498 | subgraph, |
| 3499 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3500 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3501 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3502 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3503 | /*groups=*/1, |
| 3504 | /*group_input_channels=*/32, |
| 3505 | /*group_output_channels=*/192, |
| 3506 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3507 | v22, |
| 3508 | w103, |
| 3509 | w104, |
| 3510 | v23, |
| 3511 | /*flags=*/0); |
| 3512 | if (status != xnn_status_success) { |
| 3513 | std::cerr << "failed to create node #22" << std::endl; |
| 3514 | return nullptr; |
| 3515 | } |
| 3516 | |
| 3517 | status = xnn_define_depthwise_convolution_2d( |
| 3518 | subgraph, |
| 3519 | /*padding_top=*/0, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/0, |
| 3520 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3521 | /*subsampling_height=*/2, /*subsampling_width=*/2, |
| 3522 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3523 | /*depth_multiplier=*/1, |
| 3524 | /*input_channels=*/192, |
| 3525 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3526 | v23, |
| 3527 | w105, |
| 3528 | w106, |
| 3529 | v24, |
| 3530 | /*flags=*/0); |
| 3531 | if (status != xnn_status_success) { |
| 3532 | std::cerr << "failed to create node #23" << std::endl; |
| 3533 | return nullptr; |
| 3534 | } |
| 3535 | |
| 3536 | status = xnn_define_convolution_2d( |
| 3537 | subgraph, |
| 3538 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3539 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3540 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3541 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3542 | /*groups=*/1, |
| 3543 | /*group_input_channels=*/192, |
| 3544 | /*group_output_channels=*/64, |
| 3545 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3546 | v24, |
| 3547 | w107, |
| 3548 | w108, |
| 3549 | v25, |
| 3550 | /*flags=*/0); |
| 3551 | if (status != xnn_status_success) { |
| 3552 | std::cerr << "failed to create node #24" << std::endl; |
| 3553 | return nullptr; |
| 3554 | } |
| 3555 | |
| 3556 | status = xnn_define_convolution_2d( |
| 3557 | subgraph, |
| 3558 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3559 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3560 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3561 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3562 | /*groups=*/1, |
| 3563 | /*group_input_channels=*/64, |
| 3564 | /*group_output_channels=*/384, |
| 3565 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3566 | v25, |
| 3567 | w109, |
| 3568 | w110, |
| 3569 | v26, |
| 3570 | /*flags=*/0); |
| 3571 | if (status != xnn_status_success) { |
| 3572 | std::cerr << "failed to create node #25" << std::endl; |
| 3573 | return nullptr; |
| 3574 | } |
| 3575 | |
| 3576 | status = xnn_define_depthwise_convolution_2d( |
| 3577 | subgraph, |
| 3578 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3579 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3580 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3581 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3582 | /*depth_multiplier=*/1, |
| 3583 | /*input_channels=*/384, |
| 3584 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3585 | v26, |
| 3586 | w111, |
| 3587 | w112, |
| 3588 | v27, |
| 3589 | /*flags=*/0); |
| 3590 | if (status != xnn_status_success) { |
| 3591 | std::cerr << "failed to create node #26" << std::endl; |
| 3592 | return nullptr; |
| 3593 | } |
| 3594 | |
| 3595 | status = xnn_define_convolution_2d( |
| 3596 | subgraph, |
| 3597 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3598 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3599 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3600 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3601 | /*groups=*/1, |
| 3602 | /*group_input_channels=*/384, |
| 3603 | /*group_output_channels=*/64, |
| 3604 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3605 | v27, |
| 3606 | w113, |
| 3607 | w114, |
| 3608 | v28, |
| 3609 | /*flags=*/0); |
| 3610 | if (status != xnn_status_success) { |
| 3611 | std::cerr << "failed to create node #27" << std::endl; |
| 3612 | return nullptr; |
| 3613 | } |
| 3614 | |
| 3615 | xnn_binary_params v29_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3616 | status = xnn_define_binary( |
| 3617 | subgraph, |
| 3618 | xnn_binary_add, |
| 3619 | &v29_params, |
| 3620 | v28, |
| 3621 | v25, |
| 3622 | v29, |
| 3623 | /*flags=*/0); |
| 3624 | if (status != xnn_status_success) { |
| 3625 | std::cerr << "failed to create node #28" << std::endl; |
| 3626 | return nullptr; |
| 3627 | } |
| 3628 | |
| 3629 | status = xnn_define_convolution_2d( |
| 3630 | subgraph, |
| 3631 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3632 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3633 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3634 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3635 | /*groups=*/1, |
| 3636 | /*group_input_channels=*/64, |
| 3637 | /*group_output_channels=*/384, |
| 3638 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3639 | v29, |
| 3640 | w115, |
| 3641 | w116, |
| 3642 | v30, |
| 3643 | /*flags=*/0); |
| 3644 | if (status != xnn_status_success) { |
| 3645 | std::cerr << "failed to create node #29" << std::endl; |
| 3646 | return nullptr; |
| 3647 | } |
| 3648 | |
| 3649 | status = xnn_define_depthwise_convolution_2d( |
| 3650 | subgraph, |
| 3651 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3652 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3653 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3654 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3655 | /*depth_multiplier=*/1, |
| 3656 | /*input_channels=*/384, |
| 3657 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3658 | v30, |
| 3659 | w117, |
| 3660 | w118, |
| 3661 | v31, |
| 3662 | /*flags=*/0); |
| 3663 | if (status != xnn_status_success) { |
| 3664 | std::cerr << "failed to create node #30" << std::endl; |
| 3665 | return nullptr; |
| 3666 | } |
| 3667 | |
| 3668 | status = xnn_define_convolution_2d( |
| 3669 | subgraph, |
| 3670 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3671 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3672 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3673 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3674 | /*groups=*/1, |
| 3675 | /*group_input_channels=*/384, |
| 3676 | /*group_output_channels=*/64, |
| 3677 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3678 | v31, |
| 3679 | w119, |
| 3680 | w120, |
| 3681 | v32, |
| 3682 | /*flags=*/0); |
| 3683 | if (status != xnn_status_success) { |
| 3684 | std::cerr << "failed to create node #31" << std::endl; |
| 3685 | return nullptr; |
| 3686 | } |
| 3687 | |
| 3688 | xnn_binary_params v33_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3689 | status = xnn_define_binary( |
| 3690 | subgraph, |
| 3691 | xnn_binary_add, |
| 3692 | &v33_params, |
| 3693 | v32, |
| 3694 | v29, |
| 3695 | v33, |
| 3696 | /*flags=*/0); |
| 3697 | if (status != xnn_status_success) { |
| 3698 | std::cerr << "failed to create node #32" << std::endl; |
| 3699 | return nullptr; |
| 3700 | } |
| 3701 | |
| 3702 | status = xnn_define_convolution_2d( |
| 3703 | subgraph, |
| 3704 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3705 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3706 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3707 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3708 | /*groups=*/1, |
| 3709 | /*group_input_channels=*/64, |
| 3710 | /*group_output_channels=*/384, |
| 3711 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3712 | v33, |
| 3713 | w121, |
| 3714 | w122, |
| 3715 | v34, |
| 3716 | /*flags=*/0); |
| 3717 | if (status != xnn_status_success) { |
| 3718 | std::cerr << "failed to create node #33" << std::endl; |
| 3719 | return nullptr; |
| 3720 | } |
| 3721 | |
| 3722 | status = xnn_define_depthwise_convolution_2d( |
| 3723 | subgraph, |
| 3724 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3725 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3726 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3727 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3728 | /*depth_multiplier=*/1, |
| 3729 | /*input_channels=*/384, |
| 3730 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3731 | v34, |
| 3732 | w123, |
| 3733 | w124, |
| 3734 | v35, |
| 3735 | /*flags=*/0); |
| 3736 | if (status != xnn_status_success) { |
| 3737 | std::cerr << "failed to create node #34" << std::endl; |
| 3738 | return nullptr; |
| 3739 | } |
| 3740 | |
| 3741 | status = xnn_define_convolution_2d( |
| 3742 | subgraph, |
| 3743 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3744 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3745 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3746 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3747 | /*groups=*/1, |
| 3748 | /*group_input_channels=*/384, |
| 3749 | /*group_output_channels=*/64, |
| 3750 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3751 | v35, |
| 3752 | w125, |
| 3753 | w126, |
| 3754 | v36, |
| 3755 | /*flags=*/0); |
| 3756 | if (status != xnn_status_success) { |
| 3757 | std::cerr << "failed to create node #35" << std::endl; |
| 3758 | return nullptr; |
| 3759 | } |
| 3760 | |
| 3761 | xnn_binary_params v37_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3762 | status = xnn_define_binary( |
| 3763 | subgraph, |
| 3764 | xnn_binary_add, |
| 3765 | &v37_params, |
| 3766 | v36, |
| 3767 | v33, |
| 3768 | v37, |
| 3769 | /*flags=*/0); |
| 3770 | if (status != xnn_status_success) { |
| 3771 | std::cerr << "failed to create node #36" << std::endl; |
| 3772 | return nullptr; |
| 3773 | } |
| 3774 | |
| 3775 | status = xnn_define_convolution_2d( |
| 3776 | subgraph, |
| 3777 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3778 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3779 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3780 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3781 | /*groups=*/1, |
| 3782 | /*group_input_channels=*/64, |
| 3783 | /*group_output_channels=*/384, |
| 3784 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3785 | v37, |
| 3786 | w127, |
| 3787 | w128, |
| 3788 | v38, |
| 3789 | /*flags=*/0); |
| 3790 | if (status != xnn_status_success) { |
| 3791 | std::cerr << "failed to create node #37" << std::endl; |
| 3792 | return nullptr; |
| 3793 | } |
| 3794 | |
| 3795 | status = xnn_define_depthwise_convolution_2d( |
| 3796 | subgraph, |
| 3797 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3798 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3799 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3800 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3801 | /*depth_multiplier=*/1, |
| 3802 | /*input_channels=*/384, |
| 3803 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3804 | v38, |
| 3805 | w129, |
| 3806 | w130, |
| 3807 | v39, |
| 3808 | /*flags=*/0); |
| 3809 | if (status != xnn_status_success) { |
| 3810 | std::cerr << "failed to create node #38" << std::endl; |
| 3811 | return nullptr; |
| 3812 | } |
| 3813 | |
| 3814 | status = xnn_define_convolution_2d( |
| 3815 | subgraph, |
| 3816 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3817 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3818 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3819 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3820 | /*groups=*/1, |
| 3821 | /*group_input_channels=*/384, |
| 3822 | /*group_output_channels=*/96, |
| 3823 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3824 | v39, |
| 3825 | w131, |
| 3826 | w132, |
| 3827 | v40, |
| 3828 | /*flags=*/0); |
| 3829 | if (status != xnn_status_success) { |
| 3830 | std::cerr << "failed to create node #39" << std::endl; |
| 3831 | return nullptr; |
| 3832 | } |
| 3833 | |
| 3834 | status = xnn_define_convolution_2d( |
| 3835 | subgraph, |
| 3836 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3837 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3838 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3839 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3840 | /*groups=*/1, |
| 3841 | /*group_input_channels=*/96, |
| 3842 | /*group_output_channels=*/576, |
| 3843 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3844 | v40, |
| 3845 | w133, |
| 3846 | w134, |
| 3847 | v41, |
| 3848 | /*flags=*/0); |
| 3849 | if (status != xnn_status_success) { |
| 3850 | std::cerr << "failed to create node #40" << std::endl; |
| 3851 | return nullptr; |
| 3852 | } |
| 3853 | |
| 3854 | status = xnn_define_depthwise_convolution_2d( |
| 3855 | subgraph, |
| 3856 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3857 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3858 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3859 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3860 | /*depth_multiplier=*/1, |
| 3861 | /*input_channels=*/576, |
| 3862 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3863 | v41, |
| 3864 | w135, |
| 3865 | w136, |
| 3866 | v42, |
| 3867 | /*flags=*/0); |
| 3868 | if (status != xnn_status_success) { |
| 3869 | std::cerr << "failed to create node #41" << std::endl; |
| 3870 | return nullptr; |
| 3871 | } |
| 3872 | |
| 3873 | status = xnn_define_convolution_2d( |
| 3874 | subgraph, |
| 3875 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3876 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3877 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3878 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3879 | /*groups=*/1, |
| 3880 | /*group_input_channels=*/576, |
| 3881 | /*group_output_channels=*/96, |
| 3882 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3883 | v42, |
| 3884 | w137, |
| 3885 | w138, |
| 3886 | v43, |
| 3887 | /*flags=*/0); |
| 3888 | if (status != xnn_status_success) { |
| 3889 | std::cerr << "failed to create node #42" << std::endl; |
| 3890 | return nullptr; |
| 3891 | } |
| 3892 | |
| 3893 | xnn_binary_params v44_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3894 | status = xnn_define_binary( |
| 3895 | subgraph, |
| 3896 | xnn_binary_add, |
| 3897 | &v44_params, |
| 3898 | v43, |
| 3899 | v40, |
| 3900 | v44, |
| 3901 | /*flags=*/0); |
| 3902 | if (status != xnn_status_success) { |
| 3903 | std::cerr << "failed to create node #43" << std::endl; |
| 3904 | return nullptr; |
| 3905 | } |
| 3906 | |
| 3907 | status = xnn_define_convolution_2d( |
| 3908 | subgraph, |
| 3909 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3910 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3911 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3912 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3913 | /*groups=*/1, |
| 3914 | /*group_input_channels=*/96, |
| 3915 | /*group_output_channels=*/576, |
| 3916 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3917 | v44, |
| 3918 | w139, |
| 3919 | w140, |
| 3920 | v45, |
| 3921 | /*flags=*/0); |
| 3922 | if (status != xnn_status_success) { |
| 3923 | std::cerr << "failed to create node #44" << std::endl; |
| 3924 | return nullptr; |
| 3925 | } |
| 3926 | |
| 3927 | status = xnn_define_depthwise_convolution_2d( |
| 3928 | subgraph, |
| 3929 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 3930 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 3931 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3932 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3933 | /*depth_multiplier=*/1, |
| 3934 | /*input_channels=*/576, |
| 3935 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3936 | v45, |
| 3937 | w141, |
| 3938 | w142, |
| 3939 | v46, |
| 3940 | /*flags=*/0); |
| 3941 | if (status != xnn_status_success) { |
| 3942 | std::cerr << "failed to create node #45" << std::endl; |
| 3943 | return nullptr; |
| 3944 | } |
| 3945 | |
| 3946 | status = xnn_define_convolution_2d( |
| 3947 | subgraph, |
| 3948 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3949 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3950 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3951 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3952 | /*groups=*/1, |
| 3953 | /*group_input_channels=*/576, |
| 3954 | /*group_output_channels=*/96, |
| 3955 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 3956 | v46, |
| 3957 | w143, |
| 3958 | w144, |
| 3959 | v47, |
| 3960 | /*flags=*/0); |
| 3961 | if (status != xnn_status_success) { |
| 3962 | std::cerr << "failed to create node #46" << std::endl; |
| 3963 | return nullptr; |
| 3964 | } |
| 3965 | |
| 3966 | xnn_binary_params v48_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 3967 | status = xnn_define_binary( |
| 3968 | subgraph, |
| 3969 | xnn_binary_add, |
| 3970 | &v48_params, |
| 3971 | v47, |
| 3972 | v44, |
| 3973 | v48, |
| 3974 | /*flags=*/0); |
| 3975 | if (status != xnn_status_success) { |
| 3976 | std::cerr << "failed to create node #47" << std::endl; |
| 3977 | return nullptr; |
| 3978 | } |
| 3979 | |
| 3980 | status = xnn_define_convolution_2d( |
| 3981 | subgraph, |
| 3982 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 3983 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 3984 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 3985 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 3986 | /*groups=*/1, |
| 3987 | /*group_input_channels=*/96, |
| 3988 | /*group_output_channels=*/576, |
| 3989 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 3990 | v48, |
| 3991 | w145, |
| 3992 | w146, |
| 3993 | v49, |
| 3994 | /*flags=*/0); |
| 3995 | if (status != xnn_status_success) { |
| 3996 | std::cerr << "failed to create node #48" << std::endl; |
| 3997 | return nullptr; |
| 3998 | } |
| 3999 | |
| 4000 | status = xnn_define_depthwise_convolution_2d( |
| 4001 | subgraph, |
| 4002 | /*padding_top=*/0, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/0, |
| 4003 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 4004 | /*subsampling_height=*/2, /*subsampling_width=*/2, |
| 4005 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4006 | /*depth_multiplier=*/1, |
| 4007 | /*input_channels=*/576, |
| 4008 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4009 | v49, |
| 4010 | w147, |
| 4011 | w148, |
| 4012 | v50, |
| 4013 | /*flags=*/0); |
| 4014 | if (status != xnn_status_success) { |
| 4015 | std::cerr << "failed to create node #49" << std::endl; |
| 4016 | return nullptr; |
| 4017 | } |
| 4018 | |
| 4019 | status = xnn_define_convolution_2d( |
| 4020 | subgraph, |
| 4021 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4022 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4023 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4024 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4025 | /*groups=*/1, |
| 4026 | /*group_input_channels=*/576, |
| 4027 | /*group_output_channels=*/160, |
| 4028 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 4029 | v50, |
| 4030 | w149, |
| 4031 | w150, |
| 4032 | v51, |
| 4033 | /*flags=*/0); |
| 4034 | if (status != xnn_status_success) { |
| 4035 | std::cerr << "failed to create node #50" << std::endl; |
| 4036 | return nullptr; |
| 4037 | } |
| 4038 | |
| 4039 | status = xnn_define_convolution_2d( |
| 4040 | subgraph, |
| 4041 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4042 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4043 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4044 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4045 | /*groups=*/1, |
| 4046 | /*group_input_channels=*/160, |
| 4047 | /*group_output_channels=*/960, |
| 4048 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4049 | v51, |
| 4050 | w151, |
| 4051 | w152, |
| 4052 | v52, |
| 4053 | /*flags=*/0); |
| 4054 | if (status != xnn_status_success) { |
| 4055 | std::cerr << "failed to create node #51" << std::endl; |
| 4056 | return nullptr; |
| 4057 | } |
| 4058 | |
| 4059 | status = xnn_define_depthwise_convolution_2d( |
| 4060 | subgraph, |
| 4061 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 4062 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 4063 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4064 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4065 | /*depth_multiplier=*/1, |
| 4066 | /*input_channels=*/960, |
| 4067 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4068 | v52, |
| 4069 | w153, |
| 4070 | w154, |
| 4071 | v53, |
| 4072 | /*flags=*/0); |
| 4073 | if (status != xnn_status_success) { |
| 4074 | std::cerr << "failed to create node #52" << std::endl; |
| 4075 | return nullptr; |
| 4076 | } |
| 4077 | |
| 4078 | status = xnn_define_convolution_2d( |
| 4079 | subgraph, |
| 4080 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4081 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4082 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4083 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4084 | /*groups=*/1, |
| 4085 | /*group_input_channels=*/960, |
| 4086 | /*group_output_channels=*/160, |
| 4087 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 4088 | v53, |
| 4089 | w155, |
| 4090 | w156, |
| 4091 | v54, |
| 4092 | /*flags=*/0); |
| 4093 | if (status != xnn_status_success) { |
| 4094 | std::cerr << "failed to create node #53" << std::endl; |
| 4095 | return nullptr; |
| 4096 | } |
| 4097 | |
| 4098 | xnn_binary_params v55_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 4099 | status = xnn_define_binary( |
| 4100 | subgraph, |
| 4101 | xnn_binary_add, |
| 4102 | &v55_params, |
| 4103 | v54, |
| 4104 | v51, |
| 4105 | v55, |
| 4106 | /*flags=*/0); |
| 4107 | if (status != xnn_status_success) { |
| 4108 | std::cerr << "failed to create node #54" << std::endl; |
| 4109 | return nullptr; |
| 4110 | } |
| 4111 | |
| 4112 | status = xnn_define_convolution_2d( |
| 4113 | subgraph, |
| 4114 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4115 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4116 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4117 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4118 | /*groups=*/1, |
| 4119 | /*group_input_channels=*/160, |
| 4120 | /*group_output_channels=*/960, |
| 4121 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4122 | v55, |
| 4123 | w157, |
| 4124 | w158, |
| 4125 | v56, |
| 4126 | /*flags=*/0); |
| 4127 | if (status != xnn_status_success) { |
| 4128 | std::cerr << "failed to create node #55" << std::endl; |
| 4129 | return nullptr; |
| 4130 | } |
| 4131 | |
| 4132 | status = xnn_define_depthwise_convolution_2d( |
| 4133 | subgraph, |
| 4134 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 4135 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 4136 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4137 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4138 | /*depth_multiplier=*/1, |
| 4139 | /*input_channels=*/960, |
| 4140 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4141 | v56, |
| 4142 | w159, |
| 4143 | w160, |
| 4144 | v57, |
| 4145 | /*flags=*/0); |
| 4146 | if (status != xnn_status_success) { |
| 4147 | std::cerr << "failed to create node #56" << std::endl; |
| 4148 | return nullptr; |
| 4149 | } |
| 4150 | |
| 4151 | status = xnn_define_convolution_2d( |
| 4152 | subgraph, |
| 4153 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4154 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4155 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4156 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4157 | /*groups=*/1, |
| 4158 | /*group_input_channels=*/960, |
| 4159 | /*group_output_channels=*/160, |
| 4160 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 4161 | v57, |
| 4162 | w161, |
| 4163 | w162, |
| 4164 | v58, |
| 4165 | /*flags=*/0); |
| 4166 | if (status != xnn_status_success) { |
| 4167 | std::cerr << "failed to create node #57" << std::endl; |
| 4168 | return nullptr; |
| 4169 | } |
| 4170 | |
| 4171 | xnn_binary_params v59_params = { std::numeric_limits<int8_t>::min(), std::numeric_limits<int8_t>::max() }; |
| 4172 | status = xnn_define_binary( |
| 4173 | subgraph, |
| 4174 | xnn_binary_add, |
| 4175 | &v59_params, |
| 4176 | v58, |
| 4177 | v55, |
| 4178 | v59, |
| 4179 | /*flags=*/0); |
| 4180 | if (status != xnn_status_success) { |
| 4181 | std::cerr << "failed to create node #58" << std::endl; |
| 4182 | return nullptr; |
| 4183 | } |
| 4184 | |
| 4185 | status = xnn_define_convolution_2d( |
| 4186 | subgraph, |
| 4187 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4188 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4189 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4190 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4191 | /*groups=*/1, |
| 4192 | /*group_input_channels=*/160, |
| 4193 | /*group_output_channels=*/960, |
| 4194 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4195 | v59, |
| 4196 | w163, |
| 4197 | w164, |
| 4198 | v60, |
| 4199 | /*flags=*/0); |
| 4200 | if (status != xnn_status_success) { |
| 4201 | std::cerr << "failed to create node #59" << std::endl; |
| 4202 | return nullptr; |
| 4203 | } |
| 4204 | |
| 4205 | status = xnn_define_depthwise_convolution_2d( |
| 4206 | subgraph, |
| 4207 | /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, /*padding_left=*/1, |
| 4208 | /*kernel_height=*/3, /*kernel_width=*/3, |
| 4209 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4210 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4211 | /*depth_multiplier=*/1, |
| 4212 | /*input_channels=*/960, |
| 4213 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4214 | v60, |
| 4215 | w165, |
| 4216 | w166, |
| 4217 | v61, |
| 4218 | /*flags=*/0); |
| 4219 | if (status != xnn_status_success) { |
| 4220 | std::cerr << "failed to create node #60" << std::endl; |
| 4221 | return nullptr; |
| 4222 | } |
| 4223 | |
| 4224 | status = xnn_define_convolution_2d( |
| 4225 | subgraph, |
| 4226 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4227 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4228 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4229 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4230 | /*groups=*/1, |
| 4231 | /*group_input_channels=*/960, |
| 4232 | /*group_output_channels=*/320, |
| 4233 | /*output_min=*/-std::numeric_limits<float>::infinity(), /*output_max=*/std::numeric_limits<float>::infinity(), |
| 4234 | v61, |
| 4235 | w167, |
| 4236 | w168, |
| 4237 | v62, |
| 4238 | /*flags=*/0); |
| 4239 | if (status != xnn_status_success) { |
| 4240 | std::cerr << "failed to create node #61" << std::endl; |
| 4241 | return nullptr; |
| 4242 | } |
| 4243 | |
| 4244 | status = xnn_define_convolution_2d( |
| 4245 | subgraph, |
| 4246 | /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, /*padding_left=*/0, |
| 4247 | /*kernel_height=*/1, /*kernel_width=*/1, |
| 4248 | /*subsampling_height=*/1, /*subsampling_width=*/1, |
| 4249 | /*dilation_height=*/1, /*dilation_width=*/1, |
| 4250 | /*groups=*/1, |
| 4251 | /*group_input_channels=*/320, |
| 4252 | /*group_output_channels=*/1280, |
| 4253 | /*output_min=*/0.0f, /*output_max=*/6.0f, |
| 4254 | v62, |
| 4255 | w169, |
| 4256 | w170, |
| 4257 | v63, |
| 4258 | /*flags=*/0); |
| 4259 | if (status != xnn_status_success) { |
| 4260 | std::cerr << "failed to create node #62" << std::endl; |
| 4261 | return nullptr; |
| 4262 | } |
| 4263 | |
| 4264 | size_t reduction_axes_v64[2] = {1, 2}; |
| 4265 | status = xnn_define_static_reduce( |
| 4266 | subgraph, |
| 4267 | xnn_reduce_mean, |
| 4268 | 2, |
| 4269 | &reduction_axes_v64[0], |
| 4270 | v63, |
| 4271 | v64, |
| 4272 | /*flags=*/0); |
| 4273 | if (status != xnn_status_success) { |
| 4274 | std::cerr << "failed to create node #63" << std::endl; |
| 4275 | return nullptr; |
| 4276 | } |
| 4277 | |
| 4278 | status = xnn_define_fully_connected( |
| 4279 | subgraph, |
| 4280 | /*output_min=*/std::numeric_limits<int8_t>::min(), /*output_max=*/std::numeric_limits<int8_t>::max(), |
| 4281 | v64, |
| 4282 | w171, |
| 4283 | w172, |
| 4284 | v65, |
| 4285 | /*flags=*/0); |
| 4286 | if (status != xnn_status_success) { |
| 4287 | std::cerr << "failed to create node #64" << std::endl; |
| 4288 | return nullptr; |
| 4289 | } |
| 4290 | |
| 4291 | status = xnn_define_unary( |
| 4292 | subgraph, |
| 4293 | xnn_unary_convert, |
| 4294 | /*params=*/nullptr, |
| 4295 | v65, |
| 4296 | v66, |
| 4297 | 0); |
| 4298 | if (status != xnn_status_success) { |
| 4299 | std::cerr << "failed to create node #65" << std::endl; |
| 4300 | return nullptr; |
| 4301 | } |
| 4302 | |
| 4303 | return subgraph; |
| 4304 | } |
| 4305 | |
| 4306 | } // namespace models |