Kristofer Jonsson | b74492c | 2020-09-10 13:26:01 +0200 | [diff] [blame] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | |
| 4 | #ifndef FLATBUFFERS_GENERATED_SCHEMA_TFLITE_H_ |
| 5 | #define FLATBUFFERS_GENERATED_SCHEMA_TFLITE_H_ |
| 6 | |
| 7 | #include "flatbuffers/flatbuffers.h" |
| 8 | |
| 9 | namespace tflite { |
| 10 | |
| 11 | struct CustomQuantization; |
| 12 | struct CustomQuantizationBuilder; |
| 13 | |
| 14 | struct QuantizationParameters; |
| 15 | struct QuantizationParametersBuilder; |
| 16 | |
| 17 | struct Int32Vector; |
| 18 | struct Int32VectorBuilder; |
| 19 | |
| 20 | struct Uint16Vector; |
| 21 | struct Uint16VectorBuilder; |
| 22 | |
| 23 | struct Uint8Vector; |
| 24 | struct Uint8VectorBuilder; |
| 25 | |
| 26 | struct DimensionMetadata; |
| 27 | struct DimensionMetadataBuilder; |
| 28 | |
| 29 | struct SparsityParameters; |
| 30 | struct SparsityParametersBuilder; |
| 31 | |
| 32 | struct Tensor; |
| 33 | struct TensorBuilder; |
| 34 | |
| 35 | struct Conv2DOptions; |
| 36 | struct Conv2DOptionsBuilder; |
| 37 | |
| 38 | struct Pool2DOptions; |
| 39 | struct Pool2DOptionsBuilder; |
| 40 | |
| 41 | struct DepthwiseConv2DOptions; |
| 42 | struct DepthwiseConv2DOptionsBuilder; |
| 43 | |
| 44 | struct ConcatEmbeddingsOptions; |
| 45 | struct ConcatEmbeddingsOptionsBuilder; |
| 46 | |
| 47 | struct LSHProjectionOptions; |
| 48 | struct LSHProjectionOptionsBuilder; |
| 49 | |
| 50 | struct SVDFOptions; |
| 51 | struct SVDFOptionsBuilder; |
| 52 | |
| 53 | struct RNNOptions; |
| 54 | struct RNNOptionsBuilder; |
| 55 | |
| 56 | struct SequenceRNNOptions; |
| 57 | struct SequenceRNNOptionsBuilder; |
| 58 | |
| 59 | struct BidirectionalSequenceRNNOptions; |
| 60 | struct BidirectionalSequenceRNNOptionsBuilder; |
| 61 | |
| 62 | struct FullyConnectedOptions; |
| 63 | struct FullyConnectedOptionsBuilder; |
| 64 | |
| 65 | struct SoftmaxOptions; |
| 66 | struct SoftmaxOptionsBuilder; |
| 67 | |
| 68 | struct ConcatenationOptions; |
| 69 | struct ConcatenationOptionsBuilder; |
| 70 | |
| 71 | struct AddOptions; |
| 72 | struct AddOptionsBuilder; |
| 73 | |
| 74 | struct MulOptions; |
| 75 | struct MulOptionsBuilder; |
| 76 | |
| 77 | struct L2NormOptions; |
| 78 | struct L2NormOptionsBuilder; |
| 79 | |
| 80 | struct LocalResponseNormalizationOptions; |
| 81 | struct LocalResponseNormalizationOptionsBuilder; |
| 82 | |
| 83 | struct LSTMOptions; |
| 84 | struct LSTMOptionsBuilder; |
| 85 | |
| 86 | struct UnidirectionalSequenceLSTMOptions; |
| 87 | struct UnidirectionalSequenceLSTMOptionsBuilder; |
| 88 | |
| 89 | struct BidirectionalSequenceLSTMOptions; |
| 90 | struct BidirectionalSequenceLSTMOptionsBuilder; |
| 91 | |
| 92 | struct ResizeBilinearOptions; |
| 93 | struct ResizeBilinearOptionsBuilder; |
| 94 | |
| 95 | struct ResizeNearestNeighborOptions; |
| 96 | struct ResizeNearestNeighborOptionsBuilder; |
| 97 | |
| 98 | struct CallOptions; |
| 99 | struct CallOptionsBuilder; |
| 100 | |
| 101 | struct PadOptions; |
| 102 | struct PadOptionsBuilder; |
| 103 | |
| 104 | struct PadV2Options; |
| 105 | struct PadV2OptionsBuilder; |
| 106 | |
| 107 | struct ReshapeOptions; |
| 108 | struct ReshapeOptionsBuilder; |
| 109 | |
| 110 | struct SpaceToBatchNDOptions; |
| 111 | struct SpaceToBatchNDOptionsBuilder; |
| 112 | |
| 113 | struct BatchToSpaceNDOptions; |
| 114 | struct BatchToSpaceNDOptionsBuilder; |
| 115 | |
| 116 | struct SkipGramOptions; |
| 117 | struct SkipGramOptionsBuilder; |
| 118 | |
| 119 | struct SpaceToDepthOptions; |
| 120 | struct SpaceToDepthOptionsBuilder; |
| 121 | |
| 122 | struct DepthToSpaceOptions; |
| 123 | struct DepthToSpaceOptionsBuilder; |
| 124 | |
| 125 | struct SubOptions; |
| 126 | struct SubOptionsBuilder; |
| 127 | |
| 128 | struct DivOptions; |
| 129 | struct DivOptionsBuilder; |
| 130 | |
| 131 | struct TopKV2Options; |
| 132 | struct TopKV2OptionsBuilder; |
| 133 | |
| 134 | struct EmbeddingLookupSparseOptions; |
| 135 | struct EmbeddingLookupSparseOptionsBuilder; |
| 136 | |
| 137 | struct GatherOptions; |
| 138 | struct GatherOptionsBuilder; |
| 139 | |
| 140 | struct TransposeOptions; |
| 141 | struct TransposeOptionsBuilder; |
| 142 | |
| 143 | struct ExpOptions; |
| 144 | struct ExpOptionsBuilder; |
| 145 | |
| 146 | struct CosOptions; |
| 147 | struct CosOptionsBuilder; |
| 148 | |
| 149 | struct ReducerOptions; |
| 150 | struct ReducerOptionsBuilder; |
| 151 | |
| 152 | struct SqueezeOptions; |
| 153 | struct SqueezeOptionsBuilder; |
| 154 | |
| 155 | struct SplitOptions; |
| 156 | struct SplitOptionsBuilder; |
| 157 | |
| 158 | struct SplitVOptions; |
| 159 | struct SplitVOptionsBuilder; |
| 160 | |
| 161 | struct StridedSliceOptions; |
| 162 | struct StridedSliceOptionsBuilder; |
| 163 | |
| 164 | struct LogSoftmaxOptions; |
| 165 | struct LogSoftmaxOptionsBuilder; |
| 166 | |
| 167 | struct CastOptions; |
| 168 | struct CastOptionsBuilder; |
| 169 | |
| 170 | struct DequantizeOptions; |
| 171 | struct DequantizeOptionsBuilder; |
| 172 | |
| 173 | struct MaximumMinimumOptions; |
| 174 | struct MaximumMinimumOptionsBuilder; |
| 175 | |
| 176 | struct TileOptions; |
| 177 | struct TileOptionsBuilder; |
| 178 | |
| 179 | struct ArgMaxOptions; |
| 180 | struct ArgMaxOptionsBuilder; |
| 181 | |
| 182 | struct ArgMinOptions; |
| 183 | struct ArgMinOptionsBuilder; |
| 184 | |
| 185 | struct GreaterOptions; |
| 186 | struct GreaterOptionsBuilder; |
| 187 | |
| 188 | struct GreaterEqualOptions; |
| 189 | struct GreaterEqualOptionsBuilder; |
| 190 | |
| 191 | struct LessOptions; |
| 192 | struct LessOptionsBuilder; |
| 193 | |
| 194 | struct LessEqualOptions; |
| 195 | struct LessEqualOptionsBuilder; |
| 196 | |
| 197 | struct NegOptions; |
| 198 | struct NegOptionsBuilder; |
| 199 | |
| 200 | struct SelectOptions; |
| 201 | struct SelectOptionsBuilder; |
| 202 | |
| 203 | struct SliceOptions; |
| 204 | struct SliceOptionsBuilder; |
| 205 | |
| 206 | struct TransposeConvOptions; |
| 207 | struct TransposeConvOptionsBuilder; |
| 208 | |
| 209 | struct ExpandDimsOptions; |
| 210 | struct ExpandDimsOptionsBuilder; |
| 211 | |
| 212 | struct SparseToDenseOptions; |
| 213 | struct SparseToDenseOptionsBuilder; |
| 214 | |
| 215 | struct EqualOptions; |
| 216 | struct EqualOptionsBuilder; |
| 217 | |
| 218 | struct NotEqualOptions; |
| 219 | struct NotEqualOptionsBuilder; |
| 220 | |
| 221 | struct ShapeOptions; |
| 222 | struct ShapeOptionsBuilder; |
| 223 | |
| 224 | struct RankOptions; |
| 225 | struct RankOptionsBuilder; |
| 226 | |
| 227 | struct PowOptions; |
| 228 | struct PowOptionsBuilder; |
| 229 | |
| 230 | struct FakeQuantOptions; |
| 231 | struct FakeQuantOptionsBuilder; |
| 232 | |
| 233 | struct PackOptions; |
| 234 | struct PackOptionsBuilder; |
| 235 | |
| 236 | struct LogicalOrOptions; |
| 237 | struct LogicalOrOptionsBuilder; |
| 238 | |
| 239 | struct OneHotOptions; |
| 240 | struct OneHotOptionsBuilder; |
| 241 | |
| 242 | struct AbsOptions; |
| 243 | struct AbsOptionsBuilder; |
| 244 | |
| 245 | struct HardSwishOptions; |
| 246 | struct HardSwishOptionsBuilder; |
| 247 | |
| 248 | struct LogicalAndOptions; |
| 249 | struct LogicalAndOptionsBuilder; |
| 250 | |
| 251 | struct LogicalNotOptions; |
| 252 | struct LogicalNotOptionsBuilder; |
| 253 | |
| 254 | struct UnpackOptions; |
| 255 | struct UnpackOptionsBuilder; |
| 256 | |
| 257 | struct FloorDivOptions; |
| 258 | struct FloorDivOptionsBuilder; |
| 259 | |
| 260 | struct SquareOptions; |
| 261 | struct SquareOptionsBuilder; |
| 262 | |
| 263 | struct ZerosLikeOptions; |
| 264 | struct ZerosLikeOptionsBuilder; |
| 265 | |
| 266 | struct FillOptions; |
| 267 | struct FillOptionsBuilder; |
| 268 | |
| 269 | struct FloorModOptions; |
| 270 | struct FloorModOptionsBuilder; |
| 271 | |
| 272 | struct RangeOptions; |
| 273 | struct RangeOptionsBuilder; |
| 274 | |
| 275 | struct LeakyReluOptions; |
| 276 | struct LeakyReluOptionsBuilder; |
| 277 | |
| 278 | struct SquaredDifferenceOptions; |
| 279 | struct SquaredDifferenceOptionsBuilder; |
| 280 | |
| 281 | struct MirrorPadOptions; |
| 282 | struct MirrorPadOptionsBuilder; |
| 283 | |
| 284 | struct UniqueOptions; |
| 285 | struct UniqueOptionsBuilder; |
| 286 | |
| 287 | struct ReverseV2Options; |
| 288 | struct ReverseV2OptionsBuilder; |
| 289 | |
| 290 | struct AddNOptions; |
| 291 | struct AddNOptionsBuilder; |
| 292 | |
| 293 | struct GatherNdOptions; |
| 294 | struct GatherNdOptionsBuilder; |
| 295 | |
| 296 | struct WhereOptions; |
| 297 | struct WhereOptionsBuilder; |
| 298 | |
| 299 | struct ReverseSequenceOptions; |
| 300 | struct ReverseSequenceOptionsBuilder; |
| 301 | |
| 302 | struct MatrixDiagOptions; |
| 303 | struct MatrixDiagOptionsBuilder; |
| 304 | |
| 305 | struct QuantizeOptions; |
| 306 | struct QuantizeOptionsBuilder; |
| 307 | |
| 308 | struct MatrixSetDiagOptions; |
| 309 | struct MatrixSetDiagOptionsBuilder; |
| 310 | |
| 311 | struct IfOptions; |
| 312 | struct IfOptionsBuilder; |
| 313 | |
| 314 | struct WhileOptions; |
| 315 | struct WhileOptionsBuilder; |
| 316 | |
| 317 | struct NonMaxSuppressionV4Options; |
| 318 | struct NonMaxSuppressionV4OptionsBuilder; |
| 319 | |
| 320 | struct NonMaxSuppressionV5Options; |
| 321 | struct NonMaxSuppressionV5OptionsBuilder; |
| 322 | |
| 323 | struct ScatterNdOptions; |
| 324 | struct ScatterNdOptionsBuilder; |
| 325 | |
| 326 | struct SelectV2Options; |
| 327 | struct SelectV2OptionsBuilder; |
| 328 | |
| 329 | struct DensifyOptions; |
| 330 | struct DensifyOptionsBuilder; |
| 331 | |
| 332 | struct SegmentSumOptions; |
| 333 | struct SegmentSumOptionsBuilder; |
| 334 | |
| 335 | struct BatchMatMulOptions; |
| 336 | struct BatchMatMulOptionsBuilder; |
| 337 | |
| 338 | struct OperatorCode; |
| 339 | struct OperatorCodeBuilder; |
| 340 | |
| 341 | struct Operator; |
| 342 | struct OperatorBuilder; |
| 343 | |
| 344 | struct SubGraph; |
| 345 | struct SubGraphBuilder; |
| 346 | |
| 347 | struct Buffer; |
| 348 | struct BufferBuilder; |
| 349 | |
| 350 | struct Metadata; |
| 351 | struct MetadataBuilder; |
| 352 | |
| 353 | struct Model; |
| 354 | struct ModelBuilder; |
| 355 | |
| 356 | enum TensorType { |
| 357 | TensorType_FLOAT32 = 0, |
| 358 | TensorType_FLOAT16 = 1, |
| 359 | TensorType_INT32 = 2, |
| 360 | TensorType_UINT8 = 3, |
| 361 | TensorType_INT64 = 4, |
| 362 | TensorType_STRING = 5, |
| 363 | TensorType_BOOL = 6, |
| 364 | TensorType_INT16 = 7, |
| 365 | TensorType_COMPLEX64 = 8, |
| 366 | TensorType_INT8 = 9, |
| 367 | TensorType_FLOAT64 = 10, |
| 368 | TensorType_COMPLEX128 = 11, |
| 369 | TensorType_MIN = TensorType_FLOAT32, |
| 370 | TensorType_MAX = TensorType_COMPLEX128 |
| 371 | }; |
| 372 | |
| 373 | inline const TensorType (&EnumValuesTensorType())[12] { |
| 374 | static const TensorType values[] = { |
| 375 | TensorType_FLOAT32, |
| 376 | TensorType_FLOAT16, |
| 377 | TensorType_INT32, |
| 378 | TensorType_UINT8, |
| 379 | TensorType_INT64, |
| 380 | TensorType_STRING, |
| 381 | TensorType_BOOL, |
| 382 | TensorType_INT16, |
| 383 | TensorType_COMPLEX64, |
| 384 | TensorType_INT8, |
| 385 | TensorType_FLOAT64, |
| 386 | TensorType_COMPLEX128 |
| 387 | }; |
| 388 | return values; |
| 389 | } |
| 390 | |
| 391 | inline const char * const *EnumNamesTensorType() { |
| 392 | static const char * const names[13] = { |
| 393 | "FLOAT32", |
| 394 | "FLOAT16", |
| 395 | "INT32", |
| 396 | "UINT8", |
| 397 | "INT64", |
| 398 | "STRING", |
| 399 | "BOOL", |
| 400 | "INT16", |
| 401 | "COMPLEX64", |
| 402 | "INT8", |
| 403 | "FLOAT64", |
| 404 | "COMPLEX128", |
| 405 | nullptr |
| 406 | }; |
| 407 | return names; |
| 408 | } |
| 409 | |
| 410 | inline const char *EnumNameTensorType(TensorType e) { |
| 411 | if (flatbuffers::IsOutRange(e, TensorType_FLOAT32, TensorType_COMPLEX128)) return ""; |
| 412 | const size_t index = static_cast<size_t>(e); |
| 413 | return EnumNamesTensorType()[index]; |
| 414 | } |
| 415 | |
| 416 | enum QuantizationDetails { |
| 417 | QuantizationDetails_NONE = 0, |
| 418 | QuantizationDetails_CustomQuantization = 1, |
| 419 | QuantizationDetails_MIN = QuantizationDetails_NONE, |
| 420 | QuantizationDetails_MAX = QuantizationDetails_CustomQuantization |
| 421 | }; |
| 422 | |
| 423 | inline const QuantizationDetails (&EnumValuesQuantizationDetails())[2] { |
| 424 | static const QuantizationDetails values[] = { |
| 425 | QuantizationDetails_NONE, |
| 426 | QuantizationDetails_CustomQuantization |
| 427 | }; |
| 428 | return values; |
| 429 | } |
| 430 | |
| 431 | inline const char * const *EnumNamesQuantizationDetails() { |
| 432 | static const char * const names[3] = { |
| 433 | "NONE", |
| 434 | "CustomQuantization", |
| 435 | nullptr |
| 436 | }; |
| 437 | return names; |
| 438 | } |
| 439 | |
| 440 | inline const char *EnumNameQuantizationDetails(QuantizationDetails e) { |
| 441 | if (flatbuffers::IsOutRange(e, QuantizationDetails_NONE, QuantizationDetails_CustomQuantization)) return ""; |
| 442 | const size_t index = static_cast<size_t>(e); |
| 443 | return EnumNamesQuantizationDetails()[index]; |
| 444 | } |
| 445 | |
| 446 | template<typename T> struct QuantizationDetailsTraits { |
| 447 | static const QuantizationDetails enum_value = QuantizationDetails_NONE; |
| 448 | }; |
| 449 | |
| 450 | template<> struct QuantizationDetailsTraits<tflite::CustomQuantization> { |
| 451 | static const QuantizationDetails enum_value = QuantizationDetails_CustomQuantization; |
| 452 | }; |
| 453 | |
| 454 | bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, QuantizationDetails type); |
| 455 | bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types); |
| 456 | |
| 457 | enum DimensionType { |
| 458 | DimensionType_DENSE = 0, |
| 459 | DimensionType_SPARSE_CSR = 1, |
| 460 | DimensionType_MIN = DimensionType_DENSE, |
| 461 | DimensionType_MAX = DimensionType_SPARSE_CSR |
| 462 | }; |
| 463 | |
| 464 | inline const DimensionType (&EnumValuesDimensionType())[2] { |
| 465 | static const DimensionType values[] = { |
| 466 | DimensionType_DENSE, |
| 467 | DimensionType_SPARSE_CSR |
| 468 | }; |
| 469 | return values; |
| 470 | } |
| 471 | |
| 472 | inline const char * const *EnumNamesDimensionType() { |
| 473 | static const char * const names[3] = { |
| 474 | "DENSE", |
| 475 | "SPARSE_CSR", |
| 476 | nullptr |
| 477 | }; |
| 478 | return names; |
| 479 | } |
| 480 | |
| 481 | inline const char *EnumNameDimensionType(DimensionType e) { |
| 482 | if (flatbuffers::IsOutRange(e, DimensionType_DENSE, DimensionType_SPARSE_CSR)) return ""; |
| 483 | const size_t index = static_cast<size_t>(e); |
| 484 | return EnumNamesDimensionType()[index]; |
| 485 | } |
| 486 | |
| 487 | enum SparseIndexVector { |
| 488 | SparseIndexVector_NONE = 0, |
| 489 | SparseIndexVector_Int32Vector = 1, |
| 490 | SparseIndexVector_Uint16Vector = 2, |
| 491 | SparseIndexVector_Uint8Vector = 3, |
| 492 | SparseIndexVector_MIN = SparseIndexVector_NONE, |
| 493 | SparseIndexVector_MAX = SparseIndexVector_Uint8Vector |
| 494 | }; |
| 495 | |
| 496 | inline const SparseIndexVector (&EnumValuesSparseIndexVector())[4] { |
| 497 | static const SparseIndexVector values[] = { |
| 498 | SparseIndexVector_NONE, |
| 499 | SparseIndexVector_Int32Vector, |
| 500 | SparseIndexVector_Uint16Vector, |
| 501 | SparseIndexVector_Uint8Vector |
| 502 | }; |
| 503 | return values; |
| 504 | } |
| 505 | |
| 506 | inline const char * const *EnumNamesSparseIndexVector() { |
| 507 | static const char * const names[5] = { |
| 508 | "NONE", |
| 509 | "Int32Vector", |
| 510 | "Uint16Vector", |
| 511 | "Uint8Vector", |
| 512 | nullptr |
| 513 | }; |
| 514 | return names; |
| 515 | } |
| 516 | |
| 517 | inline const char *EnumNameSparseIndexVector(SparseIndexVector e) { |
| 518 | if (flatbuffers::IsOutRange(e, SparseIndexVector_NONE, SparseIndexVector_Uint8Vector)) return ""; |
| 519 | const size_t index = static_cast<size_t>(e); |
| 520 | return EnumNamesSparseIndexVector()[index]; |
| 521 | } |
| 522 | |
| 523 | template<typename T> struct SparseIndexVectorTraits { |
| 524 | static const SparseIndexVector enum_value = SparseIndexVector_NONE; |
| 525 | }; |
| 526 | |
| 527 | template<> struct SparseIndexVectorTraits<tflite::Int32Vector> { |
| 528 | static const SparseIndexVector enum_value = SparseIndexVector_Int32Vector; |
| 529 | }; |
| 530 | |
| 531 | template<> struct SparseIndexVectorTraits<tflite::Uint16Vector> { |
| 532 | static const SparseIndexVector enum_value = SparseIndexVector_Uint16Vector; |
| 533 | }; |
| 534 | |
| 535 | template<> struct SparseIndexVectorTraits<tflite::Uint8Vector> { |
| 536 | static const SparseIndexVector enum_value = SparseIndexVector_Uint8Vector; |
| 537 | }; |
| 538 | |
| 539 | bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, SparseIndexVector type); |
| 540 | bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types); |
| 541 | |
| 542 | enum BuiltinOperator { |
| 543 | BuiltinOperator_ADD = 0, |
| 544 | BuiltinOperator_AVERAGE_POOL_2D = 1, |
| 545 | BuiltinOperator_CONCATENATION = 2, |
| 546 | BuiltinOperator_CONV_2D = 3, |
| 547 | BuiltinOperator_DEPTHWISE_CONV_2D = 4, |
| 548 | BuiltinOperator_DEPTH_TO_SPACE = 5, |
| 549 | BuiltinOperator_DEQUANTIZE = 6, |
| 550 | BuiltinOperator_EMBEDDING_LOOKUP = 7, |
| 551 | BuiltinOperator_FLOOR = 8, |
| 552 | BuiltinOperator_FULLY_CONNECTED = 9, |
| 553 | BuiltinOperator_HASHTABLE_LOOKUP = 10, |
| 554 | BuiltinOperator_L2_NORMALIZATION = 11, |
| 555 | BuiltinOperator_L2_POOL_2D = 12, |
| 556 | BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION = 13, |
| 557 | BuiltinOperator_LOGISTIC = 14, |
| 558 | BuiltinOperator_LSH_PROJECTION = 15, |
| 559 | BuiltinOperator_LSTM = 16, |
| 560 | BuiltinOperator_MAX_POOL_2D = 17, |
| 561 | BuiltinOperator_MUL = 18, |
| 562 | BuiltinOperator_RELU = 19, |
| 563 | BuiltinOperator_RELU_N1_TO_1 = 20, |
| 564 | BuiltinOperator_RELU6 = 21, |
| 565 | BuiltinOperator_RESHAPE = 22, |
| 566 | BuiltinOperator_RESIZE_BILINEAR = 23, |
| 567 | BuiltinOperator_RNN = 24, |
| 568 | BuiltinOperator_SOFTMAX = 25, |
| 569 | BuiltinOperator_SPACE_TO_DEPTH = 26, |
| 570 | BuiltinOperator_SVDF = 27, |
| 571 | BuiltinOperator_TANH = 28, |
| 572 | BuiltinOperator_CONCAT_EMBEDDINGS = 29, |
| 573 | BuiltinOperator_SKIP_GRAM = 30, |
| 574 | BuiltinOperator_CALL = 31, |
| 575 | BuiltinOperator_CUSTOM = 32, |
| 576 | BuiltinOperator_EMBEDDING_LOOKUP_SPARSE = 33, |
| 577 | BuiltinOperator_PAD = 34, |
| 578 | BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_RNN = 35, |
| 579 | BuiltinOperator_GATHER = 36, |
| 580 | BuiltinOperator_BATCH_TO_SPACE_ND = 37, |
| 581 | BuiltinOperator_SPACE_TO_BATCH_ND = 38, |
| 582 | BuiltinOperator_TRANSPOSE = 39, |
| 583 | BuiltinOperator_MEAN = 40, |
| 584 | BuiltinOperator_SUB = 41, |
| 585 | BuiltinOperator_DIV = 42, |
| 586 | BuiltinOperator_SQUEEZE = 43, |
| 587 | BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM = 44, |
| 588 | BuiltinOperator_STRIDED_SLICE = 45, |
| 589 | BuiltinOperator_BIDIRECTIONAL_SEQUENCE_RNN = 46, |
| 590 | BuiltinOperator_EXP = 47, |
| 591 | BuiltinOperator_TOPK_V2 = 48, |
| 592 | BuiltinOperator_SPLIT = 49, |
| 593 | BuiltinOperator_LOG_SOFTMAX = 50, |
| 594 | BuiltinOperator_DELEGATE = 51, |
| 595 | BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM = 52, |
| 596 | BuiltinOperator_CAST = 53, |
| 597 | BuiltinOperator_PRELU = 54, |
| 598 | BuiltinOperator_MAXIMUM = 55, |
| 599 | BuiltinOperator_ARG_MAX = 56, |
| 600 | BuiltinOperator_MINIMUM = 57, |
| 601 | BuiltinOperator_LESS = 58, |
| 602 | BuiltinOperator_NEG = 59, |
| 603 | BuiltinOperator_PADV2 = 60, |
| 604 | BuiltinOperator_GREATER = 61, |
| 605 | BuiltinOperator_GREATER_EQUAL = 62, |
| 606 | BuiltinOperator_LESS_EQUAL = 63, |
| 607 | BuiltinOperator_SELECT = 64, |
| 608 | BuiltinOperator_SLICE = 65, |
| 609 | BuiltinOperator_SIN = 66, |
| 610 | BuiltinOperator_TRANSPOSE_CONV = 67, |
| 611 | BuiltinOperator_SPARSE_TO_DENSE = 68, |
| 612 | BuiltinOperator_TILE = 69, |
| 613 | BuiltinOperator_EXPAND_DIMS = 70, |
| 614 | BuiltinOperator_EQUAL = 71, |
| 615 | BuiltinOperator_NOT_EQUAL = 72, |
| 616 | BuiltinOperator_LOG = 73, |
| 617 | BuiltinOperator_SUM = 74, |
| 618 | BuiltinOperator_SQRT = 75, |
| 619 | BuiltinOperator_RSQRT = 76, |
| 620 | BuiltinOperator_SHAPE = 77, |
| 621 | BuiltinOperator_POW = 78, |
| 622 | BuiltinOperator_ARG_MIN = 79, |
| 623 | BuiltinOperator_FAKE_QUANT = 80, |
| 624 | BuiltinOperator_REDUCE_PROD = 81, |
| 625 | BuiltinOperator_REDUCE_MAX = 82, |
| 626 | BuiltinOperator_PACK = 83, |
| 627 | BuiltinOperator_LOGICAL_OR = 84, |
| 628 | BuiltinOperator_ONE_HOT = 85, |
| 629 | BuiltinOperator_LOGICAL_AND = 86, |
| 630 | BuiltinOperator_LOGICAL_NOT = 87, |
| 631 | BuiltinOperator_UNPACK = 88, |
| 632 | BuiltinOperator_REDUCE_MIN = 89, |
| 633 | BuiltinOperator_FLOOR_DIV = 90, |
| 634 | BuiltinOperator_REDUCE_ANY = 91, |
| 635 | BuiltinOperator_SQUARE = 92, |
| 636 | BuiltinOperator_ZEROS_LIKE = 93, |
| 637 | BuiltinOperator_FILL = 94, |
| 638 | BuiltinOperator_FLOOR_MOD = 95, |
| 639 | BuiltinOperator_RANGE = 96, |
| 640 | BuiltinOperator_RESIZE_NEAREST_NEIGHBOR = 97, |
| 641 | BuiltinOperator_LEAKY_RELU = 98, |
| 642 | BuiltinOperator_SQUARED_DIFFERENCE = 99, |
| 643 | BuiltinOperator_MIRROR_PAD = 100, |
| 644 | BuiltinOperator_ABS = 101, |
| 645 | BuiltinOperator_SPLIT_V = 102, |
| 646 | BuiltinOperator_UNIQUE = 103, |
| 647 | BuiltinOperator_CEIL = 104, |
| 648 | BuiltinOperator_REVERSE_V2 = 105, |
| 649 | BuiltinOperator_ADD_N = 106, |
| 650 | BuiltinOperator_GATHER_ND = 107, |
| 651 | BuiltinOperator_COS = 108, |
| 652 | BuiltinOperator_WHERE = 109, |
| 653 | BuiltinOperator_RANK = 110, |
| 654 | BuiltinOperator_ELU = 111, |
| 655 | BuiltinOperator_REVERSE_SEQUENCE = 112, |
| 656 | BuiltinOperator_MATRIX_DIAG = 113, |
| 657 | BuiltinOperator_QUANTIZE = 114, |
| 658 | BuiltinOperator_MATRIX_SET_DIAG = 115, |
| 659 | BuiltinOperator_ROUND = 116, |
| 660 | BuiltinOperator_HARD_SWISH = 117, |
| 661 | BuiltinOperator_IF = 118, |
| 662 | BuiltinOperator_WHILE = 119, |
| 663 | BuiltinOperator_NON_MAX_SUPPRESSION_V4 = 120, |
| 664 | BuiltinOperator_NON_MAX_SUPPRESSION_V5 = 121, |
| 665 | BuiltinOperator_SCATTER_ND = 122, |
| 666 | BuiltinOperator_SELECT_V2 = 123, |
| 667 | BuiltinOperator_DENSIFY = 124, |
| 668 | BuiltinOperator_SEGMENT_SUM = 125, |
| 669 | BuiltinOperator_BATCH_MATMUL = 126, |
| 670 | BuiltinOperator_MIN = BuiltinOperator_ADD, |
| 671 | BuiltinOperator_MAX = BuiltinOperator_BATCH_MATMUL |
| 672 | }; |
| 673 | |
| 674 | inline const BuiltinOperator (&EnumValuesBuiltinOperator())[127] { |
| 675 | static const BuiltinOperator values[] = { |
| 676 | BuiltinOperator_ADD, |
| 677 | BuiltinOperator_AVERAGE_POOL_2D, |
| 678 | BuiltinOperator_CONCATENATION, |
| 679 | BuiltinOperator_CONV_2D, |
| 680 | BuiltinOperator_DEPTHWISE_CONV_2D, |
| 681 | BuiltinOperator_DEPTH_TO_SPACE, |
| 682 | BuiltinOperator_DEQUANTIZE, |
| 683 | BuiltinOperator_EMBEDDING_LOOKUP, |
| 684 | BuiltinOperator_FLOOR, |
| 685 | BuiltinOperator_FULLY_CONNECTED, |
| 686 | BuiltinOperator_HASHTABLE_LOOKUP, |
| 687 | BuiltinOperator_L2_NORMALIZATION, |
| 688 | BuiltinOperator_L2_POOL_2D, |
| 689 | BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION, |
| 690 | BuiltinOperator_LOGISTIC, |
| 691 | BuiltinOperator_LSH_PROJECTION, |
| 692 | BuiltinOperator_LSTM, |
| 693 | BuiltinOperator_MAX_POOL_2D, |
| 694 | BuiltinOperator_MUL, |
| 695 | BuiltinOperator_RELU, |
| 696 | BuiltinOperator_RELU_N1_TO_1, |
| 697 | BuiltinOperator_RELU6, |
| 698 | BuiltinOperator_RESHAPE, |
| 699 | BuiltinOperator_RESIZE_BILINEAR, |
| 700 | BuiltinOperator_RNN, |
| 701 | BuiltinOperator_SOFTMAX, |
| 702 | BuiltinOperator_SPACE_TO_DEPTH, |
| 703 | BuiltinOperator_SVDF, |
| 704 | BuiltinOperator_TANH, |
| 705 | BuiltinOperator_CONCAT_EMBEDDINGS, |
| 706 | BuiltinOperator_SKIP_GRAM, |
| 707 | BuiltinOperator_CALL, |
| 708 | BuiltinOperator_CUSTOM, |
| 709 | BuiltinOperator_EMBEDDING_LOOKUP_SPARSE, |
| 710 | BuiltinOperator_PAD, |
| 711 | BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_RNN, |
| 712 | BuiltinOperator_GATHER, |
| 713 | BuiltinOperator_BATCH_TO_SPACE_ND, |
| 714 | BuiltinOperator_SPACE_TO_BATCH_ND, |
| 715 | BuiltinOperator_TRANSPOSE, |
| 716 | BuiltinOperator_MEAN, |
| 717 | BuiltinOperator_SUB, |
| 718 | BuiltinOperator_DIV, |
| 719 | BuiltinOperator_SQUEEZE, |
| 720 | BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM, |
| 721 | BuiltinOperator_STRIDED_SLICE, |
| 722 | BuiltinOperator_BIDIRECTIONAL_SEQUENCE_RNN, |
| 723 | BuiltinOperator_EXP, |
| 724 | BuiltinOperator_TOPK_V2, |
| 725 | BuiltinOperator_SPLIT, |
| 726 | BuiltinOperator_LOG_SOFTMAX, |
| 727 | BuiltinOperator_DELEGATE, |
| 728 | BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM, |
| 729 | BuiltinOperator_CAST, |
| 730 | BuiltinOperator_PRELU, |
| 731 | BuiltinOperator_MAXIMUM, |
| 732 | BuiltinOperator_ARG_MAX, |
| 733 | BuiltinOperator_MINIMUM, |
| 734 | BuiltinOperator_LESS, |
| 735 | BuiltinOperator_NEG, |
| 736 | BuiltinOperator_PADV2, |
| 737 | BuiltinOperator_GREATER, |
| 738 | BuiltinOperator_GREATER_EQUAL, |
| 739 | BuiltinOperator_LESS_EQUAL, |
| 740 | BuiltinOperator_SELECT, |
| 741 | BuiltinOperator_SLICE, |
| 742 | BuiltinOperator_SIN, |
| 743 | BuiltinOperator_TRANSPOSE_CONV, |
| 744 | BuiltinOperator_SPARSE_TO_DENSE, |
| 745 | BuiltinOperator_TILE, |
| 746 | BuiltinOperator_EXPAND_DIMS, |
| 747 | BuiltinOperator_EQUAL, |
| 748 | BuiltinOperator_NOT_EQUAL, |
| 749 | BuiltinOperator_LOG, |
| 750 | BuiltinOperator_SUM, |
| 751 | BuiltinOperator_SQRT, |
| 752 | BuiltinOperator_RSQRT, |
| 753 | BuiltinOperator_SHAPE, |
| 754 | BuiltinOperator_POW, |
| 755 | BuiltinOperator_ARG_MIN, |
| 756 | BuiltinOperator_FAKE_QUANT, |
| 757 | BuiltinOperator_REDUCE_PROD, |
| 758 | BuiltinOperator_REDUCE_MAX, |
| 759 | BuiltinOperator_PACK, |
| 760 | BuiltinOperator_LOGICAL_OR, |
| 761 | BuiltinOperator_ONE_HOT, |
| 762 | BuiltinOperator_LOGICAL_AND, |
| 763 | BuiltinOperator_LOGICAL_NOT, |
| 764 | BuiltinOperator_UNPACK, |
| 765 | BuiltinOperator_REDUCE_MIN, |
| 766 | BuiltinOperator_FLOOR_DIV, |
| 767 | BuiltinOperator_REDUCE_ANY, |
| 768 | BuiltinOperator_SQUARE, |
| 769 | BuiltinOperator_ZEROS_LIKE, |
| 770 | BuiltinOperator_FILL, |
| 771 | BuiltinOperator_FLOOR_MOD, |
| 772 | BuiltinOperator_RANGE, |
| 773 | BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, |
| 774 | BuiltinOperator_LEAKY_RELU, |
| 775 | BuiltinOperator_SQUARED_DIFFERENCE, |
| 776 | BuiltinOperator_MIRROR_PAD, |
| 777 | BuiltinOperator_ABS, |
| 778 | BuiltinOperator_SPLIT_V, |
| 779 | BuiltinOperator_UNIQUE, |
| 780 | BuiltinOperator_CEIL, |
| 781 | BuiltinOperator_REVERSE_V2, |
| 782 | BuiltinOperator_ADD_N, |
| 783 | BuiltinOperator_GATHER_ND, |
| 784 | BuiltinOperator_COS, |
| 785 | BuiltinOperator_WHERE, |
| 786 | BuiltinOperator_RANK, |
| 787 | BuiltinOperator_ELU, |
| 788 | BuiltinOperator_REVERSE_SEQUENCE, |
| 789 | BuiltinOperator_MATRIX_DIAG, |
| 790 | BuiltinOperator_QUANTIZE, |
| 791 | BuiltinOperator_MATRIX_SET_DIAG, |
| 792 | BuiltinOperator_ROUND, |
| 793 | BuiltinOperator_HARD_SWISH, |
| 794 | BuiltinOperator_IF, |
| 795 | BuiltinOperator_WHILE, |
| 796 | BuiltinOperator_NON_MAX_SUPPRESSION_V4, |
| 797 | BuiltinOperator_NON_MAX_SUPPRESSION_V5, |
| 798 | BuiltinOperator_SCATTER_ND, |
| 799 | BuiltinOperator_SELECT_V2, |
| 800 | BuiltinOperator_DENSIFY, |
| 801 | BuiltinOperator_SEGMENT_SUM, |
| 802 | BuiltinOperator_BATCH_MATMUL |
| 803 | }; |
| 804 | return values; |
| 805 | } |
| 806 | |
| 807 | inline const char * const *EnumNamesBuiltinOperator() { |
| 808 | static const char * const names[128] = { |
| 809 | "ADD", |
| 810 | "AVERAGE_POOL_2D", |
| 811 | "CONCATENATION", |
| 812 | "CONV_2D", |
| 813 | "DEPTHWISE_CONV_2D", |
| 814 | "DEPTH_TO_SPACE", |
| 815 | "DEQUANTIZE", |
| 816 | "EMBEDDING_LOOKUP", |
| 817 | "FLOOR", |
| 818 | "FULLY_CONNECTED", |
| 819 | "HASHTABLE_LOOKUP", |
| 820 | "L2_NORMALIZATION", |
| 821 | "L2_POOL_2D", |
| 822 | "LOCAL_RESPONSE_NORMALIZATION", |
| 823 | "LOGISTIC", |
| 824 | "LSH_PROJECTION", |
| 825 | "LSTM", |
| 826 | "MAX_POOL_2D", |
| 827 | "MUL", |
| 828 | "RELU", |
| 829 | "RELU_N1_TO_1", |
| 830 | "RELU6", |
| 831 | "RESHAPE", |
| 832 | "RESIZE_BILINEAR", |
| 833 | "RNN", |
| 834 | "SOFTMAX", |
| 835 | "SPACE_TO_DEPTH", |
| 836 | "SVDF", |
| 837 | "TANH", |
| 838 | "CONCAT_EMBEDDINGS", |
| 839 | "SKIP_GRAM", |
| 840 | "CALL", |
| 841 | "CUSTOM", |
| 842 | "EMBEDDING_LOOKUP_SPARSE", |
| 843 | "PAD", |
| 844 | "UNIDIRECTIONAL_SEQUENCE_RNN", |
| 845 | "GATHER", |
| 846 | "BATCH_TO_SPACE_ND", |
| 847 | "SPACE_TO_BATCH_ND", |
| 848 | "TRANSPOSE", |
| 849 | "MEAN", |
| 850 | "SUB", |
| 851 | "DIV", |
| 852 | "SQUEEZE", |
| 853 | "UNIDIRECTIONAL_SEQUENCE_LSTM", |
| 854 | "STRIDED_SLICE", |
| 855 | "BIDIRECTIONAL_SEQUENCE_RNN", |
| 856 | "EXP", |
| 857 | "TOPK_V2", |
| 858 | "SPLIT", |
| 859 | "LOG_SOFTMAX", |
| 860 | "DELEGATE", |
| 861 | "BIDIRECTIONAL_SEQUENCE_LSTM", |
| 862 | "CAST", |
| 863 | "PRELU", |
| 864 | "MAXIMUM", |
| 865 | "ARG_MAX", |
| 866 | "MINIMUM", |
| 867 | "LESS", |
| 868 | "NEG", |
| 869 | "PADV2", |
| 870 | "GREATER", |
| 871 | "GREATER_EQUAL", |
| 872 | "LESS_EQUAL", |
| 873 | "SELECT", |
| 874 | "SLICE", |
| 875 | "SIN", |
| 876 | "TRANSPOSE_CONV", |
| 877 | "SPARSE_TO_DENSE", |
| 878 | "TILE", |
| 879 | "EXPAND_DIMS", |
| 880 | "EQUAL", |
| 881 | "NOT_EQUAL", |
| 882 | "LOG", |
| 883 | "SUM", |
| 884 | "SQRT", |
| 885 | "RSQRT", |
| 886 | "SHAPE", |
| 887 | "POW", |
| 888 | "ARG_MIN", |
| 889 | "FAKE_QUANT", |
| 890 | "REDUCE_PROD", |
| 891 | "REDUCE_MAX", |
| 892 | "PACK", |
| 893 | "LOGICAL_OR", |
| 894 | "ONE_HOT", |
| 895 | "LOGICAL_AND", |
| 896 | "LOGICAL_NOT", |
| 897 | "UNPACK", |
| 898 | "REDUCE_MIN", |
| 899 | "FLOOR_DIV", |
| 900 | "REDUCE_ANY", |
| 901 | "SQUARE", |
| 902 | "ZEROS_LIKE", |
| 903 | "FILL", |
| 904 | "FLOOR_MOD", |
| 905 | "RANGE", |
| 906 | "RESIZE_NEAREST_NEIGHBOR", |
| 907 | "LEAKY_RELU", |
| 908 | "SQUARED_DIFFERENCE", |
| 909 | "MIRROR_PAD", |
| 910 | "ABS", |
| 911 | "SPLIT_V", |
| 912 | "UNIQUE", |
| 913 | "CEIL", |
| 914 | "REVERSE_V2", |
| 915 | "ADD_N", |
| 916 | "GATHER_ND", |
| 917 | "COS", |
| 918 | "WHERE", |
| 919 | "RANK", |
| 920 | "ELU", |
| 921 | "REVERSE_SEQUENCE", |
| 922 | "MATRIX_DIAG", |
| 923 | "QUANTIZE", |
| 924 | "MATRIX_SET_DIAG", |
| 925 | "ROUND", |
| 926 | "HARD_SWISH", |
| 927 | "IF", |
| 928 | "WHILE", |
| 929 | "NON_MAX_SUPPRESSION_V4", |
| 930 | "NON_MAX_SUPPRESSION_V5", |
| 931 | "SCATTER_ND", |
| 932 | "SELECT_V2", |
| 933 | "DENSIFY", |
| 934 | "SEGMENT_SUM", |
| 935 | "BATCH_MATMUL", |
| 936 | nullptr |
| 937 | }; |
| 938 | return names; |
| 939 | } |
| 940 | |
| 941 | inline const char *EnumNameBuiltinOperator(BuiltinOperator e) { |
| 942 | if (flatbuffers::IsOutRange(e, BuiltinOperator_ADD, BuiltinOperator_BATCH_MATMUL)) return ""; |
| 943 | const size_t index = static_cast<size_t>(e); |
| 944 | return EnumNamesBuiltinOperator()[index]; |
| 945 | } |
| 946 | |
| 947 | enum BuiltinOptions { |
| 948 | BuiltinOptions_NONE = 0, |
| 949 | BuiltinOptions_Conv2DOptions = 1, |
| 950 | BuiltinOptions_DepthwiseConv2DOptions = 2, |
| 951 | BuiltinOptions_ConcatEmbeddingsOptions = 3, |
| 952 | BuiltinOptions_LSHProjectionOptions = 4, |
| 953 | BuiltinOptions_Pool2DOptions = 5, |
| 954 | BuiltinOptions_SVDFOptions = 6, |
| 955 | BuiltinOptions_RNNOptions = 7, |
| 956 | BuiltinOptions_FullyConnectedOptions = 8, |
| 957 | BuiltinOptions_SoftmaxOptions = 9, |
| 958 | BuiltinOptions_ConcatenationOptions = 10, |
| 959 | BuiltinOptions_AddOptions = 11, |
| 960 | BuiltinOptions_L2NormOptions = 12, |
| 961 | BuiltinOptions_LocalResponseNormalizationOptions = 13, |
| 962 | BuiltinOptions_LSTMOptions = 14, |
| 963 | BuiltinOptions_ResizeBilinearOptions = 15, |
| 964 | BuiltinOptions_CallOptions = 16, |
| 965 | BuiltinOptions_ReshapeOptions = 17, |
| 966 | BuiltinOptions_SkipGramOptions = 18, |
| 967 | BuiltinOptions_SpaceToDepthOptions = 19, |
| 968 | BuiltinOptions_EmbeddingLookupSparseOptions = 20, |
| 969 | BuiltinOptions_MulOptions = 21, |
| 970 | BuiltinOptions_PadOptions = 22, |
| 971 | BuiltinOptions_GatherOptions = 23, |
| 972 | BuiltinOptions_BatchToSpaceNDOptions = 24, |
| 973 | BuiltinOptions_SpaceToBatchNDOptions = 25, |
| 974 | BuiltinOptions_TransposeOptions = 26, |
| 975 | BuiltinOptions_ReducerOptions = 27, |
| 976 | BuiltinOptions_SubOptions = 28, |
| 977 | BuiltinOptions_DivOptions = 29, |
| 978 | BuiltinOptions_SqueezeOptions = 30, |
| 979 | BuiltinOptions_SequenceRNNOptions = 31, |
| 980 | BuiltinOptions_StridedSliceOptions = 32, |
| 981 | BuiltinOptions_ExpOptions = 33, |
| 982 | BuiltinOptions_TopKV2Options = 34, |
| 983 | BuiltinOptions_SplitOptions = 35, |
| 984 | BuiltinOptions_LogSoftmaxOptions = 36, |
| 985 | BuiltinOptions_CastOptions = 37, |
| 986 | BuiltinOptions_DequantizeOptions = 38, |
| 987 | BuiltinOptions_MaximumMinimumOptions = 39, |
| 988 | BuiltinOptions_ArgMaxOptions = 40, |
| 989 | BuiltinOptions_LessOptions = 41, |
| 990 | BuiltinOptions_NegOptions = 42, |
| 991 | BuiltinOptions_PadV2Options = 43, |
| 992 | BuiltinOptions_GreaterOptions = 44, |
| 993 | BuiltinOptions_GreaterEqualOptions = 45, |
| 994 | BuiltinOptions_LessEqualOptions = 46, |
| 995 | BuiltinOptions_SelectOptions = 47, |
| 996 | BuiltinOptions_SliceOptions = 48, |
| 997 | BuiltinOptions_TransposeConvOptions = 49, |
| 998 | BuiltinOptions_SparseToDenseOptions = 50, |
| 999 | BuiltinOptions_TileOptions = 51, |
| 1000 | BuiltinOptions_ExpandDimsOptions = 52, |
| 1001 | BuiltinOptions_EqualOptions = 53, |
| 1002 | BuiltinOptions_NotEqualOptions = 54, |
| 1003 | BuiltinOptions_ShapeOptions = 55, |
| 1004 | BuiltinOptions_PowOptions = 56, |
| 1005 | BuiltinOptions_ArgMinOptions = 57, |
| 1006 | BuiltinOptions_FakeQuantOptions = 58, |
| 1007 | BuiltinOptions_PackOptions = 59, |
| 1008 | BuiltinOptions_LogicalOrOptions = 60, |
| 1009 | BuiltinOptions_OneHotOptions = 61, |
| 1010 | BuiltinOptions_LogicalAndOptions = 62, |
| 1011 | BuiltinOptions_LogicalNotOptions = 63, |
| 1012 | BuiltinOptions_UnpackOptions = 64, |
| 1013 | BuiltinOptions_FloorDivOptions = 65, |
| 1014 | BuiltinOptions_SquareOptions = 66, |
| 1015 | BuiltinOptions_ZerosLikeOptions = 67, |
| 1016 | BuiltinOptions_FillOptions = 68, |
| 1017 | BuiltinOptions_BidirectionalSequenceLSTMOptions = 69, |
| 1018 | BuiltinOptions_BidirectionalSequenceRNNOptions = 70, |
| 1019 | BuiltinOptions_UnidirectionalSequenceLSTMOptions = 71, |
| 1020 | BuiltinOptions_FloorModOptions = 72, |
| 1021 | BuiltinOptions_RangeOptions = 73, |
| 1022 | BuiltinOptions_ResizeNearestNeighborOptions = 74, |
| 1023 | BuiltinOptions_LeakyReluOptions = 75, |
| 1024 | BuiltinOptions_SquaredDifferenceOptions = 76, |
| 1025 | BuiltinOptions_MirrorPadOptions = 77, |
| 1026 | BuiltinOptions_AbsOptions = 78, |
| 1027 | BuiltinOptions_SplitVOptions = 79, |
| 1028 | BuiltinOptions_UniqueOptions = 80, |
| 1029 | BuiltinOptions_ReverseV2Options = 81, |
| 1030 | BuiltinOptions_AddNOptions = 82, |
| 1031 | BuiltinOptions_GatherNdOptions = 83, |
| 1032 | BuiltinOptions_CosOptions = 84, |
| 1033 | BuiltinOptions_WhereOptions = 85, |
| 1034 | BuiltinOptions_RankOptions = 86, |
| 1035 | BuiltinOptions_ReverseSequenceOptions = 87, |
| 1036 | BuiltinOptions_MatrixDiagOptions = 88, |
| 1037 | BuiltinOptions_QuantizeOptions = 89, |
| 1038 | BuiltinOptions_MatrixSetDiagOptions = 90, |
| 1039 | BuiltinOptions_HardSwishOptions = 91, |
| 1040 | BuiltinOptions_IfOptions = 92, |
| 1041 | BuiltinOptions_WhileOptions = 93, |
| 1042 | BuiltinOptions_DepthToSpaceOptions = 94, |
| 1043 | BuiltinOptions_NonMaxSuppressionV4Options = 95, |
| 1044 | BuiltinOptions_NonMaxSuppressionV5Options = 96, |
| 1045 | BuiltinOptions_ScatterNdOptions = 97, |
| 1046 | BuiltinOptions_SelectV2Options = 98, |
| 1047 | BuiltinOptions_DensifyOptions = 99, |
| 1048 | BuiltinOptions_SegmentSumOptions = 100, |
| 1049 | BuiltinOptions_BatchMatMulOptions = 101, |
| 1050 | BuiltinOptions_MIN = BuiltinOptions_NONE, |
| 1051 | BuiltinOptions_MAX = BuiltinOptions_BatchMatMulOptions |
| 1052 | }; |
| 1053 | |
| 1054 | inline const BuiltinOptions (&EnumValuesBuiltinOptions())[102] { |
| 1055 | static const BuiltinOptions values[] = { |
| 1056 | BuiltinOptions_NONE, |
| 1057 | BuiltinOptions_Conv2DOptions, |
| 1058 | BuiltinOptions_DepthwiseConv2DOptions, |
| 1059 | BuiltinOptions_ConcatEmbeddingsOptions, |
| 1060 | BuiltinOptions_LSHProjectionOptions, |
| 1061 | BuiltinOptions_Pool2DOptions, |
| 1062 | BuiltinOptions_SVDFOptions, |
| 1063 | BuiltinOptions_RNNOptions, |
| 1064 | BuiltinOptions_FullyConnectedOptions, |
| 1065 | BuiltinOptions_SoftmaxOptions, |
| 1066 | BuiltinOptions_ConcatenationOptions, |
| 1067 | BuiltinOptions_AddOptions, |
| 1068 | BuiltinOptions_L2NormOptions, |
| 1069 | BuiltinOptions_LocalResponseNormalizationOptions, |
| 1070 | BuiltinOptions_LSTMOptions, |
| 1071 | BuiltinOptions_ResizeBilinearOptions, |
| 1072 | BuiltinOptions_CallOptions, |
| 1073 | BuiltinOptions_ReshapeOptions, |
| 1074 | BuiltinOptions_SkipGramOptions, |
| 1075 | BuiltinOptions_SpaceToDepthOptions, |
| 1076 | BuiltinOptions_EmbeddingLookupSparseOptions, |
| 1077 | BuiltinOptions_MulOptions, |
| 1078 | BuiltinOptions_PadOptions, |
| 1079 | BuiltinOptions_GatherOptions, |
| 1080 | BuiltinOptions_BatchToSpaceNDOptions, |
| 1081 | BuiltinOptions_SpaceToBatchNDOptions, |
| 1082 | BuiltinOptions_TransposeOptions, |
| 1083 | BuiltinOptions_ReducerOptions, |
| 1084 | BuiltinOptions_SubOptions, |
| 1085 | BuiltinOptions_DivOptions, |
| 1086 | BuiltinOptions_SqueezeOptions, |
| 1087 | BuiltinOptions_SequenceRNNOptions, |
| 1088 | BuiltinOptions_StridedSliceOptions, |
| 1089 | BuiltinOptions_ExpOptions, |
| 1090 | BuiltinOptions_TopKV2Options, |
| 1091 | BuiltinOptions_SplitOptions, |
| 1092 | BuiltinOptions_LogSoftmaxOptions, |
| 1093 | BuiltinOptions_CastOptions, |
| 1094 | BuiltinOptions_DequantizeOptions, |
| 1095 | BuiltinOptions_MaximumMinimumOptions, |
| 1096 | BuiltinOptions_ArgMaxOptions, |
| 1097 | BuiltinOptions_LessOptions, |
| 1098 | BuiltinOptions_NegOptions, |
| 1099 | BuiltinOptions_PadV2Options, |
| 1100 | BuiltinOptions_GreaterOptions, |
| 1101 | BuiltinOptions_GreaterEqualOptions, |
| 1102 | BuiltinOptions_LessEqualOptions, |
| 1103 | BuiltinOptions_SelectOptions, |
| 1104 | BuiltinOptions_SliceOptions, |
| 1105 | BuiltinOptions_TransposeConvOptions, |
| 1106 | BuiltinOptions_SparseToDenseOptions, |
| 1107 | BuiltinOptions_TileOptions, |
| 1108 | BuiltinOptions_ExpandDimsOptions, |
| 1109 | BuiltinOptions_EqualOptions, |
| 1110 | BuiltinOptions_NotEqualOptions, |
| 1111 | BuiltinOptions_ShapeOptions, |
| 1112 | BuiltinOptions_PowOptions, |
| 1113 | BuiltinOptions_ArgMinOptions, |
| 1114 | BuiltinOptions_FakeQuantOptions, |
| 1115 | BuiltinOptions_PackOptions, |
| 1116 | BuiltinOptions_LogicalOrOptions, |
| 1117 | BuiltinOptions_OneHotOptions, |
| 1118 | BuiltinOptions_LogicalAndOptions, |
| 1119 | BuiltinOptions_LogicalNotOptions, |
| 1120 | BuiltinOptions_UnpackOptions, |
| 1121 | BuiltinOptions_FloorDivOptions, |
| 1122 | BuiltinOptions_SquareOptions, |
| 1123 | BuiltinOptions_ZerosLikeOptions, |
| 1124 | BuiltinOptions_FillOptions, |
| 1125 | BuiltinOptions_BidirectionalSequenceLSTMOptions, |
| 1126 | BuiltinOptions_BidirectionalSequenceRNNOptions, |
| 1127 | BuiltinOptions_UnidirectionalSequenceLSTMOptions, |
| 1128 | BuiltinOptions_FloorModOptions, |
| 1129 | BuiltinOptions_RangeOptions, |
| 1130 | BuiltinOptions_ResizeNearestNeighborOptions, |
| 1131 | BuiltinOptions_LeakyReluOptions, |
| 1132 | BuiltinOptions_SquaredDifferenceOptions, |
| 1133 | BuiltinOptions_MirrorPadOptions, |
| 1134 | BuiltinOptions_AbsOptions, |
| 1135 | BuiltinOptions_SplitVOptions, |
| 1136 | BuiltinOptions_UniqueOptions, |
| 1137 | BuiltinOptions_ReverseV2Options, |
| 1138 | BuiltinOptions_AddNOptions, |
| 1139 | BuiltinOptions_GatherNdOptions, |
| 1140 | BuiltinOptions_CosOptions, |
| 1141 | BuiltinOptions_WhereOptions, |
| 1142 | BuiltinOptions_RankOptions, |
| 1143 | BuiltinOptions_ReverseSequenceOptions, |
| 1144 | BuiltinOptions_MatrixDiagOptions, |
| 1145 | BuiltinOptions_QuantizeOptions, |
| 1146 | BuiltinOptions_MatrixSetDiagOptions, |
| 1147 | BuiltinOptions_HardSwishOptions, |
| 1148 | BuiltinOptions_IfOptions, |
| 1149 | BuiltinOptions_WhileOptions, |
| 1150 | BuiltinOptions_DepthToSpaceOptions, |
| 1151 | BuiltinOptions_NonMaxSuppressionV4Options, |
| 1152 | BuiltinOptions_NonMaxSuppressionV5Options, |
| 1153 | BuiltinOptions_ScatterNdOptions, |
| 1154 | BuiltinOptions_SelectV2Options, |
| 1155 | BuiltinOptions_DensifyOptions, |
| 1156 | BuiltinOptions_SegmentSumOptions, |
| 1157 | BuiltinOptions_BatchMatMulOptions |
| 1158 | }; |
| 1159 | return values; |
| 1160 | } |
| 1161 | |
| 1162 | inline const char * const *EnumNamesBuiltinOptions() { |
| 1163 | static const char * const names[103] = { |
| 1164 | "NONE", |
| 1165 | "Conv2DOptions", |
| 1166 | "DepthwiseConv2DOptions", |
| 1167 | "ConcatEmbeddingsOptions", |
| 1168 | "LSHProjectionOptions", |
| 1169 | "Pool2DOptions", |
| 1170 | "SVDFOptions", |
| 1171 | "RNNOptions", |
| 1172 | "FullyConnectedOptions", |
| 1173 | "SoftmaxOptions", |
| 1174 | "ConcatenationOptions", |
| 1175 | "AddOptions", |
| 1176 | "L2NormOptions", |
| 1177 | "LocalResponseNormalizationOptions", |
| 1178 | "LSTMOptions", |
| 1179 | "ResizeBilinearOptions", |
| 1180 | "CallOptions", |
| 1181 | "ReshapeOptions", |
| 1182 | "SkipGramOptions", |
| 1183 | "SpaceToDepthOptions", |
| 1184 | "EmbeddingLookupSparseOptions", |
| 1185 | "MulOptions", |
| 1186 | "PadOptions", |
| 1187 | "GatherOptions", |
| 1188 | "BatchToSpaceNDOptions", |
| 1189 | "SpaceToBatchNDOptions", |
| 1190 | "TransposeOptions", |
| 1191 | "ReducerOptions", |
| 1192 | "SubOptions", |
| 1193 | "DivOptions", |
| 1194 | "SqueezeOptions", |
| 1195 | "SequenceRNNOptions", |
| 1196 | "StridedSliceOptions", |
| 1197 | "ExpOptions", |
| 1198 | "TopKV2Options", |
| 1199 | "SplitOptions", |
| 1200 | "LogSoftmaxOptions", |
| 1201 | "CastOptions", |
| 1202 | "DequantizeOptions", |
| 1203 | "MaximumMinimumOptions", |
| 1204 | "ArgMaxOptions", |
| 1205 | "LessOptions", |
| 1206 | "NegOptions", |
| 1207 | "PadV2Options", |
| 1208 | "GreaterOptions", |
| 1209 | "GreaterEqualOptions", |
| 1210 | "LessEqualOptions", |
| 1211 | "SelectOptions", |
| 1212 | "SliceOptions", |
| 1213 | "TransposeConvOptions", |
| 1214 | "SparseToDenseOptions", |
| 1215 | "TileOptions", |
| 1216 | "ExpandDimsOptions", |
| 1217 | "EqualOptions", |
| 1218 | "NotEqualOptions", |
| 1219 | "ShapeOptions", |
| 1220 | "PowOptions", |
| 1221 | "ArgMinOptions", |
| 1222 | "FakeQuantOptions", |
| 1223 | "PackOptions", |
| 1224 | "LogicalOrOptions", |
| 1225 | "OneHotOptions", |
| 1226 | "LogicalAndOptions", |
| 1227 | "LogicalNotOptions", |
| 1228 | "UnpackOptions", |
| 1229 | "FloorDivOptions", |
| 1230 | "SquareOptions", |
| 1231 | "ZerosLikeOptions", |
| 1232 | "FillOptions", |
| 1233 | "BidirectionalSequenceLSTMOptions", |
| 1234 | "BidirectionalSequenceRNNOptions", |
| 1235 | "UnidirectionalSequenceLSTMOptions", |
| 1236 | "FloorModOptions", |
| 1237 | "RangeOptions", |
| 1238 | "ResizeNearestNeighborOptions", |
| 1239 | "LeakyReluOptions", |
| 1240 | "SquaredDifferenceOptions", |
| 1241 | "MirrorPadOptions", |
| 1242 | "AbsOptions", |
| 1243 | "SplitVOptions", |
| 1244 | "UniqueOptions", |
| 1245 | "ReverseV2Options", |
| 1246 | "AddNOptions", |
| 1247 | "GatherNdOptions", |
| 1248 | "CosOptions", |
| 1249 | "WhereOptions", |
| 1250 | "RankOptions", |
| 1251 | "ReverseSequenceOptions", |
| 1252 | "MatrixDiagOptions", |
| 1253 | "QuantizeOptions", |
| 1254 | "MatrixSetDiagOptions", |
| 1255 | "HardSwishOptions", |
| 1256 | "IfOptions", |
| 1257 | "WhileOptions", |
| 1258 | "DepthToSpaceOptions", |
| 1259 | "NonMaxSuppressionV4Options", |
| 1260 | "NonMaxSuppressionV5Options", |
| 1261 | "ScatterNdOptions", |
| 1262 | "SelectV2Options", |
| 1263 | "DensifyOptions", |
| 1264 | "SegmentSumOptions", |
| 1265 | "BatchMatMulOptions", |
| 1266 | nullptr |
| 1267 | }; |
| 1268 | return names; |
| 1269 | } |
| 1270 | |
| 1271 | inline const char *EnumNameBuiltinOptions(BuiltinOptions e) { |
| 1272 | if (flatbuffers::IsOutRange(e, BuiltinOptions_NONE, BuiltinOptions_BatchMatMulOptions)) return ""; |
| 1273 | const size_t index = static_cast<size_t>(e); |
| 1274 | return EnumNamesBuiltinOptions()[index]; |
| 1275 | } |
| 1276 | |
| 1277 | template<typename T> struct BuiltinOptionsTraits { |
| 1278 | static const BuiltinOptions enum_value = BuiltinOptions_NONE; |
| 1279 | }; |
| 1280 | |
| 1281 | template<> struct BuiltinOptionsTraits<tflite::Conv2DOptions> { |
| 1282 | static const BuiltinOptions enum_value = BuiltinOptions_Conv2DOptions; |
| 1283 | }; |
| 1284 | |
| 1285 | template<> struct BuiltinOptionsTraits<tflite::DepthwiseConv2DOptions> { |
| 1286 | static const BuiltinOptions enum_value = BuiltinOptions_DepthwiseConv2DOptions; |
| 1287 | }; |
| 1288 | |
| 1289 | template<> struct BuiltinOptionsTraits<tflite::ConcatEmbeddingsOptions> { |
| 1290 | static const BuiltinOptions enum_value = BuiltinOptions_ConcatEmbeddingsOptions; |
| 1291 | }; |
| 1292 | |
| 1293 | template<> struct BuiltinOptionsTraits<tflite::LSHProjectionOptions> { |
| 1294 | static const BuiltinOptions enum_value = BuiltinOptions_LSHProjectionOptions; |
| 1295 | }; |
| 1296 | |
| 1297 | template<> struct BuiltinOptionsTraits<tflite::Pool2DOptions> { |
| 1298 | static const BuiltinOptions enum_value = BuiltinOptions_Pool2DOptions; |
| 1299 | }; |
| 1300 | |
| 1301 | template<> struct BuiltinOptionsTraits<tflite::SVDFOptions> { |
| 1302 | static const BuiltinOptions enum_value = BuiltinOptions_SVDFOptions; |
| 1303 | }; |
| 1304 | |
| 1305 | template<> struct BuiltinOptionsTraits<tflite::RNNOptions> { |
| 1306 | static const BuiltinOptions enum_value = BuiltinOptions_RNNOptions; |
| 1307 | }; |
| 1308 | |
| 1309 | template<> struct BuiltinOptionsTraits<tflite::FullyConnectedOptions> { |
| 1310 | static const BuiltinOptions enum_value = BuiltinOptions_FullyConnectedOptions; |
| 1311 | }; |
| 1312 | |
| 1313 | template<> struct BuiltinOptionsTraits<tflite::SoftmaxOptions> { |
| 1314 | static const BuiltinOptions enum_value = BuiltinOptions_SoftmaxOptions; |
| 1315 | }; |
| 1316 | |
| 1317 | template<> struct BuiltinOptionsTraits<tflite::ConcatenationOptions> { |
| 1318 | static const BuiltinOptions enum_value = BuiltinOptions_ConcatenationOptions; |
| 1319 | }; |
| 1320 | |
| 1321 | template<> struct BuiltinOptionsTraits<tflite::AddOptions> { |
| 1322 | static const BuiltinOptions enum_value = BuiltinOptions_AddOptions; |
| 1323 | }; |
| 1324 | |
| 1325 | template<> struct BuiltinOptionsTraits<tflite::L2NormOptions> { |
| 1326 | static const BuiltinOptions enum_value = BuiltinOptions_L2NormOptions; |
| 1327 | }; |
| 1328 | |
| 1329 | template<> struct BuiltinOptionsTraits<tflite::LocalResponseNormalizationOptions> { |
| 1330 | static const BuiltinOptions enum_value = BuiltinOptions_LocalResponseNormalizationOptions; |
| 1331 | }; |
| 1332 | |
| 1333 | template<> struct BuiltinOptionsTraits<tflite::LSTMOptions> { |
| 1334 | static const BuiltinOptions enum_value = BuiltinOptions_LSTMOptions; |
| 1335 | }; |
| 1336 | |
| 1337 | template<> struct BuiltinOptionsTraits<tflite::ResizeBilinearOptions> { |
| 1338 | static const BuiltinOptions enum_value = BuiltinOptions_ResizeBilinearOptions; |
| 1339 | }; |
| 1340 | |
| 1341 | template<> struct BuiltinOptionsTraits<tflite::CallOptions> { |
| 1342 | static const BuiltinOptions enum_value = BuiltinOptions_CallOptions; |
| 1343 | }; |
| 1344 | |
| 1345 | template<> struct BuiltinOptionsTraits<tflite::ReshapeOptions> { |
| 1346 | static const BuiltinOptions enum_value = BuiltinOptions_ReshapeOptions; |
| 1347 | }; |
| 1348 | |
| 1349 | template<> struct BuiltinOptionsTraits<tflite::SkipGramOptions> { |
| 1350 | static const BuiltinOptions enum_value = BuiltinOptions_SkipGramOptions; |
| 1351 | }; |
| 1352 | |
| 1353 | template<> struct BuiltinOptionsTraits<tflite::SpaceToDepthOptions> { |
| 1354 | static const BuiltinOptions enum_value = BuiltinOptions_SpaceToDepthOptions; |
| 1355 | }; |
| 1356 | |
| 1357 | template<> struct BuiltinOptionsTraits<tflite::EmbeddingLookupSparseOptions> { |
| 1358 | static const BuiltinOptions enum_value = BuiltinOptions_EmbeddingLookupSparseOptions; |
| 1359 | }; |
| 1360 | |
| 1361 | template<> struct BuiltinOptionsTraits<tflite::MulOptions> { |
| 1362 | static const BuiltinOptions enum_value = BuiltinOptions_MulOptions; |
| 1363 | }; |
| 1364 | |
| 1365 | template<> struct BuiltinOptionsTraits<tflite::PadOptions> { |
| 1366 | static const BuiltinOptions enum_value = BuiltinOptions_PadOptions; |
| 1367 | }; |
| 1368 | |
| 1369 | template<> struct BuiltinOptionsTraits<tflite::GatherOptions> { |
| 1370 | static const BuiltinOptions enum_value = BuiltinOptions_GatherOptions; |
| 1371 | }; |
| 1372 | |
| 1373 | template<> struct BuiltinOptionsTraits<tflite::BatchToSpaceNDOptions> { |
| 1374 | static const BuiltinOptions enum_value = BuiltinOptions_BatchToSpaceNDOptions; |
| 1375 | }; |
| 1376 | |
| 1377 | template<> struct BuiltinOptionsTraits<tflite::SpaceToBatchNDOptions> { |
| 1378 | static const BuiltinOptions enum_value = BuiltinOptions_SpaceToBatchNDOptions; |
| 1379 | }; |
| 1380 | |
| 1381 | template<> struct BuiltinOptionsTraits<tflite::TransposeOptions> { |
| 1382 | static const BuiltinOptions enum_value = BuiltinOptions_TransposeOptions; |
| 1383 | }; |
| 1384 | |
| 1385 | template<> struct BuiltinOptionsTraits<tflite::ReducerOptions> { |
| 1386 | static const BuiltinOptions enum_value = BuiltinOptions_ReducerOptions; |
| 1387 | }; |
| 1388 | |
| 1389 | template<> struct BuiltinOptionsTraits<tflite::SubOptions> { |
| 1390 | static const BuiltinOptions enum_value = BuiltinOptions_SubOptions; |
| 1391 | }; |
| 1392 | |
| 1393 | template<> struct BuiltinOptionsTraits<tflite::DivOptions> { |
| 1394 | static const BuiltinOptions enum_value = BuiltinOptions_DivOptions; |
| 1395 | }; |
| 1396 | |
| 1397 | template<> struct BuiltinOptionsTraits<tflite::SqueezeOptions> { |
| 1398 | static const BuiltinOptions enum_value = BuiltinOptions_SqueezeOptions; |
| 1399 | }; |
| 1400 | |
| 1401 | template<> struct BuiltinOptionsTraits<tflite::SequenceRNNOptions> { |
| 1402 | static const BuiltinOptions enum_value = BuiltinOptions_SequenceRNNOptions; |
| 1403 | }; |
| 1404 | |
| 1405 | template<> struct BuiltinOptionsTraits<tflite::StridedSliceOptions> { |
| 1406 | static const BuiltinOptions enum_value = BuiltinOptions_StridedSliceOptions; |
| 1407 | }; |
| 1408 | |
| 1409 | template<> struct BuiltinOptionsTraits<tflite::ExpOptions> { |
| 1410 | static const BuiltinOptions enum_value = BuiltinOptions_ExpOptions; |
| 1411 | }; |
| 1412 | |
| 1413 | template<> struct BuiltinOptionsTraits<tflite::TopKV2Options> { |
| 1414 | static const BuiltinOptions enum_value = BuiltinOptions_TopKV2Options; |
| 1415 | }; |
| 1416 | |
| 1417 | template<> struct BuiltinOptionsTraits<tflite::SplitOptions> { |
| 1418 | static const BuiltinOptions enum_value = BuiltinOptions_SplitOptions; |
| 1419 | }; |
| 1420 | |
| 1421 | template<> struct BuiltinOptionsTraits<tflite::LogSoftmaxOptions> { |
| 1422 | static const BuiltinOptions enum_value = BuiltinOptions_LogSoftmaxOptions; |
| 1423 | }; |
| 1424 | |
| 1425 | template<> struct BuiltinOptionsTraits<tflite::CastOptions> { |
| 1426 | static const BuiltinOptions enum_value = BuiltinOptions_CastOptions; |
| 1427 | }; |
| 1428 | |
| 1429 | template<> struct BuiltinOptionsTraits<tflite::DequantizeOptions> { |
| 1430 | static const BuiltinOptions enum_value = BuiltinOptions_DequantizeOptions; |
| 1431 | }; |
| 1432 | |
| 1433 | template<> struct BuiltinOptionsTraits<tflite::MaximumMinimumOptions> { |
| 1434 | static const BuiltinOptions enum_value = BuiltinOptions_MaximumMinimumOptions; |
| 1435 | }; |
| 1436 | |
| 1437 | template<> struct BuiltinOptionsTraits<tflite::ArgMaxOptions> { |
| 1438 | static const BuiltinOptions enum_value = BuiltinOptions_ArgMaxOptions; |
| 1439 | }; |
| 1440 | |
| 1441 | template<> struct BuiltinOptionsTraits<tflite::LessOptions> { |
| 1442 | static const BuiltinOptions enum_value = BuiltinOptions_LessOptions; |
| 1443 | }; |
| 1444 | |
| 1445 | template<> struct BuiltinOptionsTraits<tflite::NegOptions> { |
| 1446 | static const BuiltinOptions enum_value = BuiltinOptions_NegOptions; |
| 1447 | }; |
| 1448 | |
| 1449 | template<> struct BuiltinOptionsTraits<tflite::PadV2Options> { |
| 1450 | static const BuiltinOptions enum_value = BuiltinOptions_PadV2Options; |
| 1451 | }; |
| 1452 | |
| 1453 | template<> struct BuiltinOptionsTraits<tflite::GreaterOptions> { |
| 1454 | static const BuiltinOptions enum_value = BuiltinOptions_GreaterOptions; |
| 1455 | }; |
| 1456 | |
| 1457 | template<> struct BuiltinOptionsTraits<tflite::GreaterEqualOptions> { |
| 1458 | static const BuiltinOptions enum_value = BuiltinOptions_GreaterEqualOptions; |
| 1459 | }; |
| 1460 | |
| 1461 | template<> struct BuiltinOptionsTraits<tflite::LessEqualOptions> { |
| 1462 | static const BuiltinOptions enum_value = BuiltinOptions_LessEqualOptions; |
| 1463 | }; |
| 1464 | |
| 1465 | template<> struct BuiltinOptionsTraits<tflite::SelectOptions> { |
| 1466 | static const BuiltinOptions enum_value = BuiltinOptions_SelectOptions; |
| 1467 | }; |
| 1468 | |
| 1469 | template<> struct BuiltinOptionsTraits<tflite::SliceOptions> { |
| 1470 | static const BuiltinOptions enum_value = BuiltinOptions_SliceOptions; |
| 1471 | }; |
| 1472 | |
| 1473 | template<> struct BuiltinOptionsTraits<tflite::TransposeConvOptions> { |
| 1474 | static const BuiltinOptions enum_value = BuiltinOptions_TransposeConvOptions; |
| 1475 | }; |
| 1476 | |
| 1477 | template<> struct BuiltinOptionsTraits<tflite::SparseToDenseOptions> { |
| 1478 | static const BuiltinOptions enum_value = BuiltinOptions_SparseToDenseOptions; |
| 1479 | }; |
| 1480 | |
| 1481 | template<> struct BuiltinOptionsTraits<tflite::TileOptions> { |
| 1482 | static const BuiltinOptions enum_value = BuiltinOptions_TileOptions; |
| 1483 | }; |
| 1484 | |
| 1485 | template<> struct BuiltinOptionsTraits<tflite::ExpandDimsOptions> { |
| 1486 | static const BuiltinOptions enum_value = BuiltinOptions_ExpandDimsOptions; |
| 1487 | }; |
| 1488 | |
| 1489 | template<> struct BuiltinOptionsTraits<tflite::EqualOptions> { |
| 1490 | static const BuiltinOptions enum_value = BuiltinOptions_EqualOptions; |
| 1491 | }; |
| 1492 | |
| 1493 | template<> struct BuiltinOptionsTraits<tflite::NotEqualOptions> { |
| 1494 | static const BuiltinOptions enum_value = BuiltinOptions_NotEqualOptions; |
| 1495 | }; |
| 1496 | |
| 1497 | template<> struct BuiltinOptionsTraits<tflite::ShapeOptions> { |
| 1498 | static const BuiltinOptions enum_value = BuiltinOptions_ShapeOptions; |
| 1499 | }; |
| 1500 | |
| 1501 | template<> struct BuiltinOptionsTraits<tflite::PowOptions> { |
| 1502 | static const BuiltinOptions enum_value = BuiltinOptions_PowOptions; |
| 1503 | }; |
| 1504 | |
| 1505 | template<> struct BuiltinOptionsTraits<tflite::ArgMinOptions> { |
| 1506 | static const BuiltinOptions enum_value = BuiltinOptions_ArgMinOptions; |
| 1507 | }; |
| 1508 | |
| 1509 | template<> struct BuiltinOptionsTraits<tflite::FakeQuantOptions> { |
| 1510 | static const BuiltinOptions enum_value = BuiltinOptions_FakeQuantOptions; |
| 1511 | }; |
| 1512 | |
| 1513 | template<> struct BuiltinOptionsTraits<tflite::PackOptions> { |
| 1514 | static const BuiltinOptions enum_value = BuiltinOptions_PackOptions; |
| 1515 | }; |
| 1516 | |
| 1517 | template<> struct BuiltinOptionsTraits<tflite::LogicalOrOptions> { |
| 1518 | static const BuiltinOptions enum_value = BuiltinOptions_LogicalOrOptions; |
| 1519 | }; |
| 1520 | |
| 1521 | template<> struct BuiltinOptionsTraits<tflite::OneHotOptions> { |
| 1522 | static const BuiltinOptions enum_value = BuiltinOptions_OneHotOptions; |
| 1523 | }; |
| 1524 | |
| 1525 | template<> struct BuiltinOptionsTraits<tflite::LogicalAndOptions> { |
| 1526 | static const BuiltinOptions enum_value = BuiltinOptions_LogicalAndOptions; |
| 1527 | }; |
| 1528 | |
| 1529 | template<> struct BuiltinOptionsTraits<tflite::LogicalNotOptions> { |
| 1530 | static const BuiltinOptions enum_value = BuiltinOptions_LogicalNotOptions; |
| 1531 | }; |
| 1532 | |
| 1533 | template<> struct BuiltinOptionsTraits<tflite::UnpackOptions> { |
| 1534 | static const BuiltinOptions enum_value = BuiltinOptions_UnpackOptions; |
| 1535 | }; |
| 1536 | |
| 1537 | template<> struct BuiltinOptionsTraits<tflite::FloorDivOptions> { |
| 1538 | static const BuiltinOptions enum_value = BuiltinOptions_FloorDivOptions; |
| 1539 | }; |
| 1540 | |
| 1541 | template<> struct BuiltinOptionsTraits<tflite::SquareOptions> { |
| 1542 | static const BuiltinOptions enum_value = BuiltinOptions_SquareOptions; |
| 1543 | }; |
| 1544 | |
| 1545 | template<> struct BuiltinOptionsTraits<tflite::ZerosLikeOptions> { |
| 1546 | static const BuiltinOptions enum_value = BuiltinOptions_ZerosLikeOptions; |
| 1547 | }; |
| 1548 | |
| 1549 | template<> struct BuiltinOptionsTraits<tflite::FillOptions> { |
| 1550 | static const BuiltinOptions enum_value = BuiltinOptions_FillOptions; |
| 1551 | }; |
| 1552 | |
| 1553 | template<> struct BuiltinOptionsTraits<tflite::BidirectionalSequenceLSTMOptions> { |
| 1554 | static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceLSTMOptions; |
| 1555 | }; |
| 1556 | |
| 1557 | template<> struct BuiltinOptionsTraits<tflite::BidirectionalSequenceRNNOptions> { |
| 1558 | static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceRNNOptions; |
| 1559 | }; |
| 1560 | |
| 1561 | template<> struct BuiltinOptionsTraits<tflite::UnidirectionalSequenceLSTMOptions> { |
| 1562 | static const BuiltinOptions enum_value = BuiltinOptions_UnidirectionalSequenceLSTMOptions; |
| 1563 | }; |
| 1564 | |
| 1565 | template<> struct BuiltinOptionsTraits<tflite::FloorModOptions> { |
| 1566 | static const BuiltinOptions enum_value = BuiltinOptions_FloorModOptions; |
| 1567 | }; |
| 1568 | |
| 1569 | template<> struct BuiltinOptionsTraits<tflite::RangeOptions> { |
| 1570 | static const BuiltinOptions enum_value = BuiltinOptions_RangeOptions; |
| 1571 | }; |
| 1572 | |
| 1573 | template<> struct BuiltinOptionsTraits<tflite::ResizeNearestNeighborOptions> { |
| 1574 | static const BuiltinOptions enum_value = BuiltinOptions_ResizeNearestNeighborOptions; |
| 1575 | }; |
| 1576 | |
| 1577 | template<> struct BuiltinOptionsTraits<tflite::LeakyReluOptions> { |
| 1578 | static const BuiltinOptions enum_value = BuiltinOptions_LeakyReluOptions; |
| 1579 | }; |
| 1580 | |
| 1581 | template<> struct BuiltinOptionsTraits<tflite::SquaredDifferenceOptions> { |
| 1582 | static const BuiltinOptions enum_value = BuiltinOptions_SquaredDifferenceOptions; |
| 1583 | }; |
| 1584 | |
| 1585 | template<> struct BuiltinOptionsTraits<tflite::MirrorPadOptions> { |
| 1586 | static const BuiltinOptions enum_value = BuiltinOptions_MirrorPadOptions; |
| 1587 | }; |
| 1588 | |
| 1589 | template<> struct BuiltinOptionsTraits<tflite::AbsOptions> { |
| 1590 | static const BuiltinOptions enum_value = BuiltinOptions_AbsOptions; |
| 1591 | }; |
| 1592 | |
| 1593 | template<> struct BuiltinOptionsTraits<tflite::SplitVOptions> { |
| 1594 | static const BuiltinOptions enum_value = BuiltinOptions_SplitVOptions; |
| 1595 | }; |
| 1596 | |
| 1597 | template<> struct BuiltinOptionsTraits<tflite::UniqueOptions> { |
| 1598 | static const BuiltinOptions enum_value = BuiltinOptions_UniqueOptions; |
| 1599 | }; |
| 1600 | |
| 1601 | template<> struct BuiltinOptionsTraits<tflite::ReverseV2Options> { |
| 1602 | static const BuiltinOptions enum_value = BuiltinOptions_ReverseV2Options; |
| 1603 | }; |
| 1604 | |
| 1605 | template<> struct BuiltinOptionsTraits<tflite::AddNOptions> { |
| 1606 | static const BuiltinOptions enum_value = BuiltinOptions_AddNOptions; |
| 1607 | }; |
| 1608 | |
| 1609 | template<> struct BuiltinOptionsTraits<tflite::GatherNdOptions> { |
| 1610 | static const BuiltinOptions enum_value = BuiltinOptions_GatherNdOptions; |
| 1611 | }; |
| 1612 | |
| 1613 | template<> struct BuiltinOptionsTraits<tflite::CosOptions> { |
| 1614 | static const BuiltinOptions enum_value = BuiltinOptions_CosOptions; |
| 1615 | }; |
| 1616 | |
| 1617 | template<> struct BuiltinOptionsTraits<tflite::WhereOptions> { |
| 1618 | static const BuiltinOptions enum_value = BuiltinOptions_WhereOptions; |
| 1619 | }; |
| 1620 | |
| 1621 | template<> struct BuiltinOptionsTraits<tflite::RankOptions> { |
| 1622 | static const BuiltinOptions enum_value = BuiltinOptions_RankOptions; |
| 1623 | }; |
| 1624 | |
| 1625 | template<> struct BuiltinOptionsTraits<tflite::ReverseSequenceOptions> { |
| 1626 | static const BuiltinOptions enum_value = BuiltinOptions_ReverseSequenceOptions; |
| 1627 | }; |
| 1628 | |
| 1629 | template<> struct BuiltinOptionsTraits<tflite::MatrixDiagOptions> { |
| 1630 | static const BuiltinOptions enum_value = BuiltinOptions_MatrixDiagOptions; |
| 1631 | }; |
| 1632 | |
| 1633 | template<> struct BuiltinOptionsTraits<tflite::QuantizeOptions> { |
| 1634 | static const BuiltinOptions enum_value = BuiltinOptions_QuantizeOptions; |
| 1635 | }; |
| 1636 | |
| 1637 | template<> struct BuiltinOptionsTraits<tflite::MatrixSetDiagOptions> { |
| 1638 | static const BuiltinOptions enum_value = BuiltinOptions_MatrixSetDiagOptions; |
| 1639 | }; |
| 1640 | |
| 1641 | template<> struct BuiltinOptionsTraits<tflite::HardSwishOptions> { |
| 1642 | static const BuiltinOptions enum_value = BuiltinOptions_HardSwishOptions; |
| 1643 | }; |
| 1644 | |
| 1645 | template<> struct BuiltinOptionsTraits<tflite::IfOptions> { |
| 1646 | static const BuiltinOptions enum_value = BuiltinOptions_IfOptions; |
| 1647 | }; |
| 1648 | |
| 1649 | template<> struct BuiltinOptionsTraits<tflite::WhileOptions> { |
| 1650 | static const BuiltinOptions enum_value = BuiltinOptions_WhileOptions; |
| 1651 | }; |
| 1652 | |
| 1653 | template<> struct BuiltinOptionsTraits<tflite::DepthToSpaceOptions> { |
| 1654 | static const BuiltinOptions enum_value = BuiltinOptions_DepthToSpaceOptions; |
| 1655 | }; |
| 1656 | |
| 1657 | template<> struct BuiltinOptionsTraits<tflite::NonMaxSuppressionV4Options> { |
| 1658 | static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV4Options; |
| 1659 | }; |
| 1660 | |
| 1661 | template<> struct BuiltinOptionsTraits<tflite::NonMaxSuppressionV5Options> { |
| 1662 | static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV5Options; |
| 1663 | }; |
| 1664 | |
| 1665 | template<> struct BuiltinOptionsTraits<tflite::ScatterNdOptions> { |
| 1666 | static const BuiltinOptions enum_value = BuiltinOptions_ScatterNdOptions; |
| 1667 | }; |
| 1668 | |
| 1669 | template<> struct BuiltinOptionsTraits<tflite::SelectV2Options> { |
| 1670 | static const BuiltinOptions enum_value = BuiltinOptions_SelectV2Options; |
| 1671 | }; |
| 1672 | |
| 1673 | template<> struct BuiltinOptionsTraits<tflite::DensifyOptions> { |
| 1674 | static const BuiltinOptions enum_value = BuiltinOptions_DensifyOptions; |
| 1675 | }; |
| 1676 | |
| 1677 | template<> struct BuiltinOptionsTraits<tflite::SegmentSumOptions> { |
| 1678 | static const BuiltinOptions enum_value = BuiltinOptions_SegmentSumOptions; |
| 1679 | }; |
| 1680 | |
| 1681 | template<> struct BuiltinOptionsTraits<tflite::BatchMatMulOptions> { |
| 1682 | static const BuiltinOptions enum_value = BuiltinOptions_BatchMatMulOptions; |
| 1683 | }; |
| 1684 | |
| 1685 | bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type); |
| 1686 | bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types); |
| 1687 | |
| 1688 | enum Padding { |
| 1689 | Padding_SAME = 0, |
| 1690 | Padding_VALID = 1, |
| 1691 | Padding_MIN = Padding_SAME, |
| 1692 | Padding_MAX = Padding_VALID |
| 1693 | }; |
| 1694 | |
| 1695 | inline const Padding (&EnumValuesPadding())[2] { |
| 1696 | static const Padding values[] = { |
| 1697 | Padding_SAME, |
| 1698 | Padding_VALID |
| 1699 | }; |
| 1700 | return values; |
| 1701 | } |
| 1702 | |
| 1703 | inline const char * const *EnumNamesPadding() { |
| 1704 | static const char * const names[3] = { |
| 1705 | "SAME", |
| 1706 | "VALID", |
| 1707 | nullptr |
| 1708 | }; |
| 1709 | return names; |
| 1710 | } |
| 1711 | |
| 1712 | inline const char *EnumNamePadding(Padding e) { |
| 1713 | if (flatbuffers::IsOutRange(e, Padding_SAME, Padding_VALID)) return ""; |
| 1714 | const size_t index = static_cast<size_t>(e); |
| 1715 | return EnumNamesPadding()[index]; |
| 1716 | } |
| 1717 | |
| 1718 | enum ActivationFunctionType { |
| 1719 | ActivationFunctionType_NONE = 0, |
| 1720 | ActivationFunctionType_RELU = 1, |
| 1721 | ActivationFunctionType_RELU_N1_TO_1 = 2, |
| 1722 | ActivationFunctionType_RELU6 = 3, |
| 1723 | ActivationFunctionType_TANH = 4, |
| 1724 | ActivationFunctionType_SIGN_BIT = 5, |
| 1725 | ActivationFunctionType_MIN = ActivationFunctionType_NONE, |
| 1726 | ActivationFunctionType_MAX = ActivationFunctionType_SIGN_BIT |
| 1727 | }; |
| 1728 | |
| 1729 | inline const ActivationFunctionType (&EnumValuesActivationFunctionType())[6] { |
| 1730 | static const ActivationFunctionType values[] = { |
| 1731 | ActivationFunctionType_NONE, |
| 1732 | ActivationFunctionType_RELU, |
| 1733 | ActivationFunctionType_RELU_N1_TO_1, |
| 1734 | ActivationFunctionType_RELU6, |
| 1735 | ActivationFunctionType_TANH, |
| 1736 | ActivationFunctionType_SIGN_BIT |
| 1737 | }; |
| 1738 | return values; |
| 1739 | } |
| 1740 | |
| 1741 | inline const char * const *EnumNamesActivationFunctionType() { |
| 1742 | static const char * const names[7] = { |
| 1743 | "NONE", |
| 1744 | "RELU", |
| 1745 | "RELU_N1_TO_1", |
| 1746 | "RELU6", |
| 1747 | "TANH", |
| 1748 | "SIGN_BIT", |
| 1749 | nullptr |
| 1750 | }; |
| 1751 | return names; |
| 1752 | } |
| 1753 | |
| 1754 | inline const char *EnumNameActivationFunctionType(ActivationFunctionType e) { |
| 1755 | if (flatbuffers::IsOutRange(e, ActivationFunctionType_NONE, ActivationFunctionType_SIGN_BIT)) return ""; |
| 1756 | const size_t index = static_cast<size_t>(e); |
| 1757 | return EnumNamesActivationFunctionType()[index]; |
| 1758 | } |
| 1759 | |
| 1760 | enum LSHProjectionType { |
| 1761 | LSHProjectionType_UNKNOWN = 0, |
| 1762 | LSHProjectionType_SPARSE = 1, |
| 1763 | LSHProjectionType_DENSE = 2, |
| 1764 | LSHProjectionType_MIN = LSHProjectionType_UNKNOWN, |
| 1765 | LSHProjectionType_MAX = LSHProjectionType_DENSE |
| 1766 | }; |
| 1767 | |
| 1768 | inline const LSHProjectionType (&EnumValuesLSHProjectionType())[3] { |
| 1769 | static const LSHProjectionType values[] = { |
| 1770 | LSHProjectionType_UNKNOWN, |
| 1771 | LSHProjectionType_SPARSE, |
| 1772 | LSHProjectionType_DENSE |
| 1773 | }; |
| 1774 | return values; |
| 1775 | } |
| 1776 | |
| 1777 | inline const char * const *EnumNamesLSHProjectionType() { |
| 1778 | static const char * const names[4] = { |
| 1779 | "UNKNOWN", |
| 1780 | "SPARSE", |
| 1781 | "DENSE", |
| 1782 | nullptr |
| 1783 | }; |
| 1784 | return names; |
| 1785 | } |
| 1786 | |
| 1787 | inline const char *EnumNameLSHProjectionType(LSHProjectionType e) { |
| 1788 | if (flatbuffers::IsOutRange(e, LSHProjectionType_UNKNOWN, LSHProjectionType_DENSE)) return ""; |
| 1789 | const size_t index = static_cast<size_t>(e); |
| 1790 | return EnumNamesLSHProjectionType()[index]; |
| 1791 | } |
| 1792 | |
| 1793 | enum FullyConnectedOptionsWeightsFormat { |
| 1794 | FullyConnectedOptionsWeightsFormat_DEFAULT = 0, |
| 1795 | FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 = 1, |
| 1796 | FullyConnectedOptionsWeightsFormat_MIN = FullyConnectedOptionsWeightsFormat_DEFAULT, |
| 1797 | FullyConnectedOptionsWeightsFormat_MAX = FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 |
| 1798 | }; |
| 1799 | |
| 1800 | inline const FullyConnectedOptionsWeightsFormat (&EnumValuesFullyConnectedOptionsWeightsFormat())[2] { |
| 1801 | static const FullyConnectedOptionsWeightsFormat values[] = { |
| 1802 | FullyConnectedOptionsWeightsFormat_DEFAULT, |
| 1803 | FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 |
| 1804 | }; |
| 1805 | return values; |
| 1806 | } |
| 1807 | |
| 1808 | inline const char * const *EnumNamesFullyConnectedOptionsWeightsFormat() { |
| 1809 | static const char * const names[3] = { |
| 1810 | "DEFAULT", |
| 1811 | "SHUFFLED4x16INT8", |
| 1812 | nullptr |
| 1813 | }; |
| 1814 | return names; |
| 1815 | } |
| 1816 | |
| 1817 | inline const char *EnumNameFullyConnectedOptionsWeightsFormat(FullyConnectedOptionsWeightsFormat e) { |
| 1818 | if (flatbuffers::IsOutRange(e, FullyConnectedOptionsWeightsFormat_DEFAULT, FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8)) return ""; |
| 1819 | const size_t index = static_cast<size_t>(e); |
| 1820 | return EnumNamesFullyConnectedOptionsWeightsFormat()[index]; |
| 1821 | } |
| 1822 | |
| 1823 | enum LSTMKernelType { |
| 1824 | LSTMKernelType_FULL = 0, |
| 1825 | LSTMKernelType_BASIC = 1, |
| 1826 | LSTMKernelType_MIN = LSTMKernelType_FULL, |
| 1827 | LSTMKernelType_MAX = LSTMKernelType_BASIC |
| 1828 | }; |
| 1829 | |
| 1830 | inline const LSTMKernelType (&EnumValuesLSTMKernelType())[2] { |
| 1831 | static const LSTMKernelType values[] = { |
| 1832 | LSTMKernelType_FULL, |
| 1833 | LSTMKernelType_BASIC |
| 1834 | }; |
| 1835 | return values; |
| 1836 | } |
| 1837 | |
| 1838 | inline const char * const *EnumNamesLSTMKernelType() { |
| 1839 | static const char * const names[3] = { |
| 1840 | "FULL", |
| 1841 | "BASIC", |
| 1842 | nullptr |
| 1843 | }; |
| 1844 | return names; |
| 1845 | } |
| 1846 | |
| 1847 | inline const char *EnumNameLSTMKernelType(LSTMKernelType e) { |
| 1848 | if (flatbuffers::IsOutRange(e, LSTMKernelType_FULL, LSTMKernelType_BASIC)) return ""; |
| 1849 | const size_t index = static_cast<size_t>(e); |
| 1850 | return EnumNamesLSTMKernelType()[index]; |
| 1851 | } |
| 1852 | |
| 1853 | enum CombinerType { |
| 1854 | CombinerType_SUM = 0, |
| 1855 | CombinerType_MEAN = 1, |
| 1856 | CombinerType_SQRTN = 2, |
| 1857 | CombinerType_MIN = CombinerType_SUM, |
| 1858 | CombinerType_MAX = CombinerType_SQRTN |
| 1859 | }; |
| 1860 | |
| 1861 | inline const CombinerType (&EnumValuesCombinerType())[3] { |
| 1862 | static const CombinerType values[] = { |
| 1863 | CombinerType_SUM, |
| 1864 | CombinerType_MEAN, |
| 1865 | CombinerType_SQRTN |
| 1866 | }; |
| 1867 | return values; |
| 1868 | } |
| 1869 | |
| 1870 | inline const char * const *EnumNamesCombinerType() { |
| 1871 | static const char * const names[4] = { |
| 1872 | "SUM", |
| 1873 | "MEAN", |
| 1874 | "SQRTN", |
| 1875 | nullptr |
| 1876 | }; |
| 1877 | return names; |
| 1878 | } |
| 1879 | |
| 1880 | inline const char *EnumNameCombinerType(CombinerType e) { |
| 1881 | if (flatbuffers::IsOutRange(e, CombinerType_SUM, CombinerType_SQRTN)) return ""; |
| 1882 | const size_t index = static_cast<size_t>(e); |
| 1883 | return EnumNamesCombinerType()[index]; |
| 1884 | } |
| 1885 | |
| 1886 | enum MirrorPadMode { |
| 1887 | MirrorPadMode_REFLECT = 0, |
| 1888 | MirrorPadMode_SYMMETRIC = 1, |
| 1889 | MirrorPadMode_MIN = MirrorPadMode_REFLECT, |
| 1890 | MirrorPadMode_MAX = MirrorPadMode_SYMMETRIC |
| 1891 | }; |
| 1892 | |
| 1893 | inline const MirrorPadMode (&EnumValuesMirrorPadMode())[2] { |
| 1894 | static const MirrorPadMode values[] = { |
| 1895 | MirrorPadMode_REFLECT, |
| 1896 | MirrorPadMode_SYMMETRIC |
| 1897 | }; |
| 1898 | return values; |
| 1899 | } |
| 1900 | |
| 1901 | inline const char * const *EnumNamesMirrorPadMode() { |
| 1902 | static const char * const names[3] = { |
| 1903 | "REFLECT", |
| 1904 | "SYMMETRIC", |
| 1905 | nullptr |
| 1906 | }; |
| 1907 | return names; |
| 1908 | } |
| 1909 | |
| 1910 | inline const char *EnumNameMirrorPadMode(MirrorPadMode e) { |
| 1911 | if (flatbuffers::IsOutRange(e, MirrorPadMode_REFLECT, MirrorPadMode_SYMMETRIC)) return ""; |
| 1912 | const size_t index = static_cast<size_t>(e); |
| 1913 | return EnumNamesMirrorPadMode()[index]; |
| 1914 | } |
| 1915 | |
| 1916 | enum CustomOptionsFormat { |
| 1917 | CustomOptionsFormat_FLEXBUFFERS = 0, |
| 1918 | CustomOptionsFormat_MIN = CustomOptionsFormat_FLEXBUFFERS, |
| 1919 | CustomOptionsFormat_MAX = CustomOptionsFormat_FLEXBUFFERS |
| 1920 | }; |
| 1921 | |
| 1922 | inline const CustomOptionsFormat (&EnumValuesCustomOptionsFormat())[1] { |
| 1923 | static const CustomOptionsFormat values[] = { |
| 1924 | CustomOptionsFormat_FLEXBUFFERS |
| 1925 | }; |
| 1926 | return values; |
| 1927 | } |
| 1928 | |
| 1929 | inline const char * const *EnumNamesCustomOptionsFormat() { |
| 1930 | static const char * const names[2] = { |
| 1931 | "FLEXBUFFERS", |
| 1932 | nullptr |
| 1933 | }; |
| 1934 | return names; |
| 1935 | } |
| 1936 | |
| 1937 | inline const char *EnumNameCustomOptionsFormat(CustomOptionsFormat e) { |
| 1938 | if (flatbuffers::IsOutRange(e, CustomOptionsFormat_FLEXBUFFERS, CustomOptionsFormat_FLEXBUFFERS)) return ""; |
| 1939 | const size_t index = static_cast<size_t>(e); |
| 1940 | return EnumNamesCustomOptionsFormat()[index]; |
| 1941 | } |
| 1942 | |
| 1943 | struct CustomQuantization FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 1944 | typedef CustomQuantizationBuilder Builder; |
| 1945 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 1946 | VT_CUSTOM = 4 |
| 1947 | }; |
| 1948 | const flatbuffers::Vector<uint8_t> *custom() const { |
| 1949 | return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_CUSTOM); |
| 1950 | } |
| 1951 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 1952 | return VerifyTableStart(verifier) && |
| 1953 | VerifyOffset(verifier, VT_CUSTOM) && |
| 1954 | verifier.VerifyVector(custom()) && |
| 1955 | verifier.EndTable(); |
| 1956 | } |
| 1957 | }; |
| 1958 | |
| 1959 | struct CustomQuantizationBuilder { |
| 1960 | typedef CustomQuantization Table; |
| 1961 | flatbuffers::FlatBufferBuilder &fbb_; |
| 1962 | flatbuffers::uoffset_t start_; |
| 1963 | void add_custom(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> custom) { |
| 1964 | fbb_.AddOffset(CustomQuantization::VT_CUSTOM, custom); |
| 1965 | } |
| 1966 | explicit CustomQuantizationBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 1967 | : fbb_(_fbb) { |
| 1968 | start_ = fbb_.StartTable(); |
| 1969 | } |
| 1970 | flatbuffers::Offset<CustomQuantization> Finish() { |
| 1971 | const auto end = fbb_.EndTable(start_); |
| 1972 | auto o = flatbuffers::Offset<CustomQuantization>(end); |
| 1973 | return o; |
| 1974 | } |
| 1975 | }; |
| 1976 | |
| 1977 | inline flatbuffers::Offset<CustomQuantization> CreateCustomQuantization( |
| 1978 | flatbuffers::FlatBufferBuilder &_fbb, |
| 1979 | flatbuffers::Offset<flatbuffers::Vector<uint8_t>> custom = 0) { |
| 1980 | CustomQuantizationBuilder builder_(_fbb); |
| 1981 | builder_.add_custom(custom); |
| 1982 | return builder_.Finish(); |
| 1983 | } |
| 1984 | |
| 1985 | inline flatbuffers::Offset<CustomQuantization> CreateCustomQuantizationDirect( |
| 1986 | flatbuffers::FlatBufferBuilder &_fbb, |
| 1987 | const std::vector<uint8_t> *custom = nullptr) { |
| 1988 | if (custom) { _fbb.ForceVectorAlignment(custom->size(), sizeof(uint8_t), 16); } |
| 1989 | auto custom__ = custom ? _fbb.CreateVector<uint8_t>(*custom) : 0; |
| 1990 | return tflite::CreateCustomQuantization( |
| 1991 | _fbb, |
| 1992 | custom__); |
| 1993 | } |
| 1994 | |
| 1995 | struct QuantizationParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 1996 | typedef QuantizationParametersBuilder Builder; |
| 1997 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 1998 | VT_MIN = 4, |
| 1999 | VT_MAX = 6, |
| 2000 | VT_SCALE = 8, |
| 2001 | VT_ZERO_POINT = 10, |
| 2002 | VT_DETAILS_TYPE = 12, |
| 2003 | VT_DETAILS = 14, |
| 2004 | VT_QUANTIZED_DIMENSION = 16 |
| 2005 | }; |
| 2006 | const flatbuffers::Vector<float> *min() const { |
| 2007 | return GetPointer<const flatbuffers::Vector<float> *>(VT_MIN); |
| 2008 | } |
| 2009 | const flatbuffers::Vector<float> *max() const { |
| 2010 | return GetPointer<const flatbuffers::Vector<float> *>(VT_MAX); |
| 2011 | } |
| 2012 | const flatbuffers::Vector<float> *scale() const { |
| 2013 | return GetPointer<const flatbuffers::Vector<float> *>(VT_SCALE); |
| 2014 | } |
| 2015 | const flatbuffers::Vector<int64_t> *zero_point() const { |
| 2016 | return GetPointer<const flatbuffers::Vector<int64_t> *>(VT_ZERO_POINT); |
| 2017 | } |
| 2018 | tflite::QuantizationDetails details_type() const { |
| 2019 | return static_cast<tflite::QuantizationDetails>(GetField<uint8_t>(VT_DETAILS_TYPE, 0)); |
| 2020 | } |
| 2021 | const void *details() const { |
| 2022 | return GetPointer<const void *>(VT_DETAILS); |
| 2023 | } |
| 2024 | template<typename T> const T *details_as() const; |
| 2025 | const tflite::CustomQuantization *details_as_CustomQuantization() const { |
| 2026 | return details_type() == tflite::QuantizationDetails_CustomQuantization ? static_cast<const tflite::CustomQuantization *>(details()) : nullptr; |
| 2027 | } |
| 2028 | int32_t quantized_dimension() const { |
| 2029 | return GetField<int32_t>(VT_QUANTIZED_DIMENSION, 0); |
| 2030 | } |
| 2031 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2032 | return VerifyTableStart(verifier) && |
| 2033 | VerifyOffset(verifier, VT_MIN) && |
| 2034 | verifier.VerifyVector(min()) && |
| 2035 | VerifyOffset(verifier, VT_MAX) && |
| 2036 | verifier.VerifyVector(max()) && |
| 2037 | VerifyOffset(verifier, VT_SCALE) && |
| 2038 | verifier.VerifyVector(scale()) && |
| 2039 | VerifyOffset(verifier, VT_ZERO_POINT) && |
| 2040 | verifier.VerifyVector(zero_point()) && |
| 2041 | VerifyField<uint8_t>(verifier, VT_DETAILS_TYPE) && |
| 2042 | VerifyOffset(verifier, VT_DETAILS) && |
| 2043 | VerifyQuantizationDetails(verifier, details(), details_type()) && |
| 2044 | VerifyField<int32_t>(verifier, VT_QUANTIZED_DIMENSION) && |
| 2045 | verifier.EndTable(); |
| 2046 | } |
| 2047 | }; |
| 2048 | |
| 2049 | template<> inline const tflite::CustomQuantization *QuantizationParameters::details_as<tflite::CustomQuantization>() const { |
| 2050 | return details_as_CustomQuantization(); |
| 2051 | } |
| 2052 | |
| 2053 | struct QuantizationParametersBuilder { |
| 2054 | typedef QuantizationParameters Table; |
| 2055 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2056 | flatbuffers::uoffset_t start_; |
| 2057 | void add_min(flatbuffers::Offset<flatbuffers::Vector<float>> min) { |
| 2058 | fbb_.AddOffset(QuantizationParameters::VT_MIN, min); |
| 2059 | } |
| 2060 | void add_max(flatbuffers::Offset<flatbuffers::Vector<float>> max) { |
| 2061 | fbb_.AddOffset(QuantizationParameters::VT_MAX, max); |
| 2062 | } |
| 2063 | void add_scale(flatbuffers::Offset<flatbuffers::Vector<float>> scale) { |
| 2064 | fbb_.AddOffset(QuantizationParameters::VT_SCALE, scale); |
| 2065 | } |
| 2066 | void add_zero_point(flatbuffers::Offset<flatbuffers::Vector<int64_t>> zero_point) { |
| 2067 | fbb_.AddOffset(QuantizationParameters::VT_ZERO_POINT, zero_point); |
| 2068 | } |
| 2069 | void add_details_type(tflite::QuantizationDetails details_type) { |
| 2070 | fbb_.AddElement<uint8_t>(QuantizationParameters::VT_DETAILS_TYPE, static_cast<uint8_t>(details_type), 0); |
| 2071 | } |
| 2072 | void add_details(flatbuffers::Offset<void> details) { |
| 2073 | fbb_.AddOffset(QuantizationParameters::VT_DETAILS, details); |
| 2074 | } |
| 2075 | void add_quantized_dimension(int32_t quantized_dimension) { |
| 2076 | fbb_.AddElement<int32_t>(QuantizationParameters::VT_QUANTIZED_DIMENSION, quantized_dimension, 0); |
| 2077 | } |
| 2078 | explicit QuantizationParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2079 | : fbb_(_fbb) { |
| 2080 | start_ = fbb_.StartTable(); |
| 2081 | } |
| 2082 | flatbuffers::Offset<QuantizationParameters> Finish() { |
| 2083 | const auto end = fbb_.EndTable(start_); |
| 2084 | auto o = flatbuffers::Offset<QuantizationParameters>(end); |
| 2085 | return o; |
| 2086 | } |
| 2087 | }; |
| 2088 | |
| 2089 | inline flatbuffers::Offset<QuantizationParameters> CreateQuantizationParameters( |
| 2090 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2091 | flatbuffers::Offset<flatbuffers::Vector<float>> min = 0, |
| 2092 | flatbuffers::Offset<flatbuffers::Vector<float>> max = 0, |
| 2093 | flatbuffers::Offset<flatbuffers::Vector<float>> scale = 0, |
| 2094 | flatbuffers::Offset<flatbuffers::Vector<int64_t>> zero_point = 0, |
| 2095 | tflite::QuantizationDetails details_type = tflite::QuantizationDetails_NONE, |
| 2096 | flatbuffers::Offset<void> details = 0, |
| 2097 | int32_t quantized_dimension = 0) { |
| 2098 | QuantizationParametersBuilder builder_(_fbb); |
| 2099 | builder_.add_quantized_dimension(quantized_dimension); |
| 2100 | builder_.add_details(details); |
| 2101 | builder_.add_zero_point(zero_point); |
| 2102 | builder_.add_scale(scale); |
| 2103 | builder_.add_max(max); |
| 2104 | builder_.add_min(min); |
| 2105 | builder_.add_details_type(details_type); |
| 2106 | return builder_.Finish(); |
| 2107 | } |
| 2108 | |
| 2109 | inline flatbuffers::Offset<QuantizationParameters> CreateQuantizationParametersDirect( |
| 2110 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2111 | const std::vector<float> *min = nullptr, |
| 2112 | const std::vector<float> *max = nullptr, |
| 2113 | const std::vector<float> *scale = nullptr, |
| 2114 | const std::vector<int64_t> *zero_point = nullptr, |
| 2115 | tflite::QuantizationDetails details_type = tflite::QuantizationDetails_NONE, |
| 2116 | flatbuffers::Offset<void> details = 0, |
| 2117 | int32_t quantized_dimension = 0) { |
| 2118 | auto min__ = min ? _fbb.CreateVector<float>(*min) : 0; |
| 2119 | auto max__ = max ? _fbb.CreateVector<float>(*max) : 0; |
| 2120 | auto scale__ = scale ? _fbb.CreateVector<float>(*scale) : 0; |
| 2121 | auto zero_point__ = zero_point ? _fbb.CreateVector<int64_t>(*zero_point) : 0; |
| 2122 | return tflite::CreateQuantizationParameters( |
| 2123 | _fbb, |
| 2124 | min__, |
| 2125 | max__, |
| 2126 | scale__, |
| 2127 | zero_point__, |
| 2128 | details_type, |
| 2129 | details, |
| 2130 | quantized_dimension); |
| 2131 | } |
| 2132 | |
| 2133 | struct Int32Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2134 | typedef Int32VectorBuilder Builder; |
| 2135 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2136 | VT_VALUES = 4 |
| 2137 | }; |
| 2138 | const flatbuffers::Vector<int32_t> *values() const { |
| 2139 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_VALUES); |
| 2140 | } |
| 2141 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2142 | return VerifyTableStart(verifier) && |
| 2143 | VerifyOffset(verifier, VT_VALUES) && |
| 2144 | verifier.VerifyVector(values()) && |
| 2145 | verifier.EndTable(); |
| 2146 | } |
| 2147 | }; |
| 2148 | |
| 2149 | struct Int32VectorBuilder { |
| 2150 | typedef Int32Vector Table; |
| 2151 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2152 | flatbuffers::uoffset_t start_; |
| 2153 | void add_values(flatbuffers::Offset<flatbuffers::Vector<int32_t>> values) { |
| 2154 | fbb_.AddOffset(Int32Vector::VT_VALUES, values); |
| 2155 | } |
| 2156 | explicit Int32VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2157 | : fbb_(_fbb) { |
| 2158 | start_ = fbb_.StartTable(); |
| 2159 | } |
| 2160 | flatbuffers::Offset<Int32Vector> Finish() { |
| 2161 | const auto end = fbb_.EndTable(start_); |
| 2162 | auto o = flatbuffers::Offset<Int32Vector>(end); |
| 2163 | return o; |
| 2164 | } |
| 2165 | }; |
| 2166 | |
| 2167 | inline flatbuffers::Offset<Int32Vector> CreateInt32Vector( |
| 2168 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2169 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> values = 0) { |
| 2170 | Int32VectorBuilder builder_(_fbb); |
| 2171 | builder_.add_values(values); |
| 2172 | return builder_.Finish(); |
| 2173 | } |
| 2174 | |
| 2175 | inline flatbuffers::Offset<Int32Vector> CreateInt32VectorDirect( |
| 2176 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2177 | const std::vector<int32_t> *values = nullptr) { |
| 2178 | auto values__ = values ? _fbb.CreateVector<int32_t>(*values) : 0; |
| 2179 | return tflite::CreateInt32Vector( |
| 2180 | _fbb, |
| 2181 | values__); |
| 2182 | } |
| 2183 | |
| 2184 | struct Uint16Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2185 | typedef Uint16VectorBuilder Builder; |
| 2186 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2187 | VT_VALUES = 4 |
| 2188 | }; |
| 2189 | const flatbuffers::Vector<uint16_t> *values() const { |
| 2190 | return GetPointer<const flatbuffers::Vector<uint16_t> *>(VT_VALUES); |
| 2191 | } |
| 2192 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2193 | return VerifyTableStart(verifier) && |
| 2194 | VerifyOffset(verifier, VT_VALUES) && |
| 2195 | verifier.VerifyVector(values()) && |
| 2196 | verifier.EndTable(); |
| 2197 | } |
| 2198 | }; |
| 2199 | |
| 2200 | struct Uint16VectorBuilder { |
| 2201 | typedef Uint16Vector Table; |
| 2202 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2203 | flatbuffers::uoffset_t start_; |
| 2204 | void add_values(flatbuffers::Offset<flatbuffers::Vector<uint16_t>> values) { |
| 2205 | fbb_.AddOffset(Uint16Vector::VT_VALUES, values); |
| 2206 | } |
| 2207 | explicit Uint16VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2208 | : fbb_(_fbb) { |
| 2209 | start_ = fbb_.StartTable(); |
| 2210 | } |
| 2211 | flatbuffers::Offset<Uint16Vector> Finish() { |
| 2212 | const auto end = fbb_.EndTable(start_); |
| 2213 | auto o = flatbuffers::Offset<Uint16Vector>(end); |
| 2214 | return o; |
| 2215 | } |
| 2216 | }; |
| 2217 | |
| 2218 | inline flatbuffers::Offset<Uint16Vector> CreateUint16Vector( |
| 2219 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2220 | flatbuffers::Offset<flatbuffers::Vector<uint16_t>> values = 0) { |
| 2221 | Uint16VectorBuilder builder_(_fbb); |
| 2222 | builder_.add_values(values); |
| 2223 | return builder_.Finish(); |
| 2224 | } |
| 2225 | |
| 2226 | inline flatbuffers::Offset<Uint16Vector> CreateUint16VectorDirect( |
| 2227 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2228 | const std::vector<uint16_t> *values = nullptr) { |
| 2229 | if (values) { _fbb.ForceVectorAlignment(values->size(), sizeof(uint16_t), 4); } |
| 2230 | auto values__ = values ? _fbb.CreateVector<uint16_t>(*values) : 0; |
| 2231 | return tflite::CreateUint16Vector( |
| 2232 | _fbb, |
| 2233 | values__); |
| 2234 | } |
| 2235 | |
| 2236 | struct Uint8Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2237 | typedef Uint8VectorBuilder Builder; |
| 2238 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2239 | VT_VALUES = 4 |
| 2240 | }; |
| 2241 | const flatbuffers::Vector<uint8_t> *values() const { |
| 2242 | return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_VALUES); |
| 2243 | } |
| 2244 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2245 | return VerifyTableStart(verifier) && |
| 2246 | VerifyOffset(verifier, VT_VALUES) && |
| 2247 | verifier.VerifyVector(values()) && |
| 2248 | verifier.EndTable(); |
| 2249 | } |
| 2250 | }; |
| 2251 | |
| 2252 | struct Uint8VectorBuilder { |
| 2253 | typedef Uint8Vector Table; |
| 2254 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2255 | flatbuffers::uoffset_t start_; |
| 2256 | void add_values(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> values) { |
| 2257 | fbb_.AddOffset(Uint8Vector::VT_VALUES, values); |
| 2258 | } |
| 2259 | explicit Uint8VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2260 | : fbb_(_fbb) { |
| 2261 | start_ = fbb_.StartTable(); |
| 2262 | } |
| 2263 | flatbuffers::Offset<Uint8Vector> Finish() { |
| 2264 | const auto end = fbb_.EndTable(start_); |
| 2265 | auto o = flatbuffers::Offset<Uint8Vector>(end); |
| 2266 | return o; |
| 2267 | } |
| 2268 | }; |
| 2269 | |
| 2270 | inline flatbuffers::Offset<Uint8Vector> CreateUint8Vector( |
| 2271 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2272 | flatbuffers::Offset<flatbuffers::Vector<uint8_t>> values = 0) { |
| 2273 | Uint8VectorBuilder builder_(_fbb); |
| 2274 | builder_.add_values(values); |
| 2275 | return builder_.Finish(); |
| 2276 | } |
| 2277 | |
| 2278 | inline flatbuffers::Offset<Uint8Vector> CreateUint8VectorDirect( |
| 2279 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2280 | const std::vector<uint8_t> *values = nullptr) { |
| 2281 | if (values) { _fbb.ForceVectorAlignment(values->size(), sizeof(uint8_t), 4); } |
| 2282 | auto values__ = values ? _fbb.CreateVector<uint8_t>(*values) : 0; |
| 2283 | return tflite::CreateUint8Vector( |
| 2284 | _fbb, |
| 2285 | values__); |
| 2286 | } |
| 2287 | |
| 2288 | struct DimensionMetadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2289 | typedef DimensionMetadataBuilder Builder; |
| 2290 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2291 | VT_FORMAT = 4, |
| 2292 | VT_DENSE_SIZE = 6, |
| 2293 | VT_ARRAY_SEGMENTS_TYPE = 8, |
| 2294 | VT_ARRAY_SEGMENTS = 10, |
| 2295 | VT_ARRAY_INDICES_TYPE = 12, |
| 2296 | VT_ARRAY_INDICES = 14 |
| 2297 | }; |
| 2298 | tflite::DimensionType format() const { |
| 2299 | return static_cast<tflite::DimensionType>(GetField<int8_t>(VT_FORMAT, 0)); |
| 2300 | } |
| 2301 | int32_t dense_size() const { |
| 2302 | return GetField<int32_t>(VT_DENSE_SIZE, 0); |
| 2303 | } |
| 2304 | tflite::SparseIndexVector array_segments_type() const { |
| 2305 | return static_cast<tflite::SparseIndexVector>(GetField<uint8_t>(VT_ARRAY_SEGMENTS_TYPE, 0)); |
| 2306 | } |
| 2307 | const void *array_segments() const { |
| 2308 | return GetPointer<const void *>(VT_ARRAY_SEGMENTS); |
| 2309 | } |
| 2310 | template<typename T> const T *array_segments_as() const; |
| 2311 | const tflite::Int32Vector *array_segments_as_Int32Vector() const { |
| 2312 | return array_segments_type() == tflite::SparseIndexVector_Int32Vector ? static_cast<const tflite::Int32Vector *>(array_segments()) : nullptr; |
| 2313 | } |
| 2314 | const tflite::Uint16Vector *array_segments_as_Uint16Vector() const { |
| 2315 | return array_segments_type() == tflite::SparseIndexVector_Uint16Vector ? static_cast<const tflite::Uint16Vector *>(array_segments()) : nullptr; |
| 2316 | } |
| 2317 | const tflite::Uint8Vector *array_segments_as_Uint8Vector() const { |
| 2318 | return array_segments_type() == tflite::SparseIndexVector_Uint8Vector ? static_cast<const tflite::Uint8Vector *>(array_segments()) : nullptr; |
| 2319 | } |
| 2320 | tflite::SparseIndexVector array_indices_type() const { |
| 2321 | return static_cast<tflite::SparseIndexVector>(GetField<uint8_t>(VT_ARRAY_INDICES_TYPE, 0)); |
| 2322 | } |
| 2323 | const void *array_indices() const { |
| 2324 | return GetPointer<const void *>(VT_ARRAY_INDICES); |
| 2325 | } |
| 2326 | template<typename T> const T *array_indices_as() const; |
| 2327 | const tflite::Int32Vector *array_indices_as_Int32Vector() const { |
| 2328 | return array_indices_type() == tflite::SparseIndexVector_Int32Vector ? static_cast<const tflite::Int32Vector *>(array_indices()) : nullptr; |
| 2329 | } |
| 2330 | const tflite::Uint16Vector *array_indices_as_Uint16Vector() const { |
| 2331 | return array_indices_type() == tflite::SparseIndexVector_Uint16Vector ? static_cast<const tflite::Uint16Vector *>(array_indices()) : nullptr; |
| 2332 | } |
| 2333 | const tflite::Uint8Vector *array_indices_as_Uint8Vector() const { |
| 2334 | return array_indices_type() == tflite::SparseIndexVector_Uint8Vector ? static_cast<const tflite::Uint8Vector *>(array_indices()) : nullptr; |
| 2335 | } |
| 2336 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2337 | return VerifyTableStart(verifier) && |
| 2338 | VerifyField<int8_t>(verifier, VT_FORMAT) && |
| 2339 | VerifyField<int32_t>(verifier, VT_DENSE_SIZE) && |
| 2340 | VerifyField<uint8_t>(verifier, VT_ARRAY_SEGMENTS_TYPE) && |
| 2341 | VerifyOffset(verifier, VT_ARRAY_SEGMENTS) && |
| 2342 | VerifySparseIndexVector(verifier, array_segments(), array_segments_type()) && |
| 2343 | VerifyField<uint8_t>(verifier, VT_ARRAY_INDICES_TYPE) && |
| 2344 | VerifyOffset(verifier, VT_ARRAY_INDICES) && |
| 2345 | VerifySparseIndexVector(verifier, array_indices(), array_indices_type()) && |
| 2346 | verifier.EndTable(); |
| 2347 | } |
| 2348 | }; |
| 2349 | |
| 2350 | template<> inline const tflite::Int32Vector *DimensionMetadata::array_segments_as<tflite::Int32Vector>() const { |
| 2351 | return array_segments_as_Int32Vector(); |
| 2352 | } |
| 2353 | |
| 2354 | template<> inline const tflite::Uint16Vector *DimensionMetadata::array_segments_as<tflite::Uint16Vector>() const { |
| 2355 | return array_segments_as_Uint16Vector(); |
| 2356 | } |
| 2357 | |
| 2358 | template<> inline const tflite::Uint8Vector *DimensionMetadata::array_segments_as<tflite::Uint8Vector>() const { |
| 2359 | return array_segments_as_Uint8Vector(); |
| 2360 | } |
| 2361 | |
| 2362 | template<> inline const tflite::Int32Vector *DimensionMetadata::array_indices_as<tflite::Int32Vector>() const { |
| 2363 | return array_indices_as_Int32Vector(); |
| 2364 | } |
| 2365 | |
| 2366 | template<> inline const tflite::Uint16Vector *DimensionMetadata::array_indices_as<tflite::Uint16Vector>() const { |
| 2367 | return array_indices_as_Uint16Vector(); |
| 2368 | } |
| 2369 | |
| 2370 | template<> inline const tflite::Uint8Vector *DimensionMetadata::array_indices_as<tflite::Uint8Vector>() const { |
| 2371 | return array_indices_as_Uint8Vector(); |
| 2372 | } |
| 2373 | |
| 2374 | struct DimensionMetadataBuilder { |
| 2375 | typedef DimensionMetadata Table; |
| 2376 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2377 | flatbuffers::uoffset_t start_; |
| 2378 | void add_format(tflite::DimensionType format) { |
| 2379 | fbb_.AddElement<int8_t>(DimensionMetadata::VT_FORMAT, static_cast<int8_t>(format), 0); |
| 2380 | } |
| 2381 | void add_dense_size(int32_t dense_size) { |
| 2382 | fbb_.AddElement<int32_t>(DimensionMetadata::VT_DENSE_SIZE, dense_size, 0); |
| 2383 | } |
| 2384 | void add_array_segments_type(tflite::SparseIndexVector array_segments_type) { |
| 2385 | fbb_.AddElement<uint8_t>(DimensionMetadata::VT_ARRAY_SEGMENTS_TYPE, static_cast<uint8_t>(array_segments_type), 0); |
| 2386 | } |
| 2387 | void add_array_segments(flatbuffers::Offset<void> array_segments) { |
| 2388 | fbb_.AddOffset(DimensionMetadata::VT_ARRAY_SEGMENTS, array_segments); |
| 2389 | } |
| 2390 | void add_array_indices_type(tflite::SparseIndexVector array_indices_type) { |
| 2391 | fbb_.AddElement<uint8_t>(DimensionMetadata::VT_ARRAY_INDICES_TYPE, static_cast<uint8_t>(array_indices_type), 0); |
| 2392 | } |
| 2393 | void add_array_indices(flatbuffers::Offset<void> array_indices) { |
| 2394 | fbb_.AddOffset(DimensionMetadata::VT_ARRAY_INDICES, array_indices); |
| 2395 | } |
| 2396 | explicit DimensionMetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2397 | : fbb_(_fbb) { |
| 2398 | start_ = fbb_.StartTable(); |
| 2399 | } |
| 2400 | flatbuffers::Offset<DimensionMetadata> Finish() { |
| 2401 | const auto end = fbb_.EndTable(start_); |
| 2402 | auto o = flatbuffers::Offset<DimensionMetadata>(end); |
| 2403 | return o; |
| 2404 | } |
| 2405 | }; |
| 2406 | |
| 2407 | inline flatbuffers::Offset<DimensionMetadata> CreateDimensionMetadata( |
| 2408 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2409 | tflite::DimensionType format = tflite::DimensionType_DENSE, |
| 2410 | int32_t dense_size = 0, |
| 2411 | tflite::SparseIndexVector array_segments_type = tflite::SparseIndexVector_NONE, |
| 2412 | flatbuffers::Offset<void> array_segments = 0, |
| 2413 | tflite::SparseIndexVector array_indices_type = tflite::SparseIndexVector_NONE, |
| 2414 | flatbuffers::Offset<void> array_indices = 0) { |
| 2415 | DimensionMetadataBuilder builder_(_fbb); |
| 2416 | builder_.add_array_indices(array_indices); |
| 2417 | builder_.add_array_segments(array_segments); |
| 2418 | builder_.add_dense_size(dense_size); |
| 2419 | builder_.add_array_indices_type(array_indices_type); |
| 2420 | builder_.add_array_segments_type(array_segments_type); |
| 2421 | builder_.add_format(format); |
| 2422 | return builder_.Finish(); |
| 2423 | } |
| 2424 | |
| 2425 | struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2426 | typedef SparsityParametersBuilder Builder; |
| 2427 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2428 | VT_TRAVERSAL_ORDER = 4, |
| 2429 | VT_BLOCK_MAP = 6, |
| 2430 | VT_DIM_METADATA = 8 |
| 2431 | }; |
| 2432 | const flatbuffers::Vector<int32_t> *traversal_order() const { |
| 2433 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_TRAVERSAL_ORDER); |
| 2434 | } |
| 2435 | const flatbuffers::Vector<int32_t> *block_map() const { |
| 2436 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_BLOCK_MAP); |
| 2437 | } |
| 2438 | const flatbuffers::Vector<flatbuffers::Offset<tflite::DimensionMetadata>> *dim_metadata() const { |
| 2439 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::DimensionMetadata>> *>(VT_DIM_METADATA); |
| 2440 | } |
| 2441 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2442 | return VerifyTableStart(verifier) && |
| 2443 | VerifyOffset(verifier, VT_TRAVERSAL_ORDER) && |
| 2444 | verifier.VerifyVector(traversal_order()) && |
| 2445 | VerifyOffset(verifier, VT_BLOCK_MAP) && |
| 2446 | verifier.VerifyVector(block_map()) && |
| 2447 | VerifyOffset(verifier, VT_DIM_METADATA) && |
| 2448 | verifier.VerifyVector(dim_metadata()) && |
| 2449 | verifier.VerifyVectorOfTables(dim_metadata()) && |
| 2450 | verifier.EndTable(); |
| 2451 | } |
| 2452 | }; |
| 2453 | |
| 2454 | struct SparsityParametersBuilder { |
| 2455 | typedef SparsityParameters Table; |
| 2456 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2457 | flatbuffers::uoffset_t start_; |
| 2458 | void add_traversal_order(flatbuffers::Offset<flatbuffers::Vector<int32_t>> traversal_order) { |
| 2459 | fbb_.AddOffset(SparsityParameters::VT_TRAVERSAL_ORDER, traversal_order); |
| 2460 | } |
| 2461 | void add_block_map(flatbuffers::Offset<flatbuffers::Vector<int32_t>> block_map) { |
| 2462 | fbb_.AddOffset(SparsityParameters::VT_BLOCK_MAP, block_map); |
| 2463 | } |
| 2464 | void add_dim_metadata(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::DimensionMetadata>>> dim_metadata) { |
| 2465 | fbb_.AddOffset(SparsityParameters::VT_DIM_METADATA, dim_metadata); |
| 2466 | } |
| 2467 | explicit SparsityParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2468 | : fbb_(_fbb) { |
| 2469 | start_ = fbb_.StartTable(); |
| 2470 | } |
| 2471 | flatbuffers::Offset<SparsityParameters> Finish() { |
| 2472 | const auto end = fbb_.EndTable(start_); |
| 2473 | auto o = flatbuffers::Offset<SparsityParameters>(end); |
| 2474 | return o; |
| 2475 | } |
| 2476 | }; |
| 2477 | |
| 2478 | inline flatbuffers::Offset<SparsityParameters> CreateSparsityParameters( |
| 2479 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2480 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> traversal_order = 0, |
| 2481 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> block_map = 0, |
| 2482 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::DimensionMetadata>>> dim_metadata = 0) { |
| 2483 | SparsityParametersBuilder builder_(_fbb); |
| 2484 | builder_.add_dim_metadata(dim_metadata); |
| 2485 | builder_.add_block_map(block_map); |
| 2486 | builder_.add_traversal_order(traversal_order); |
| 2487 | return builder_.Finish(); |
| 2488 | } |
| 2489 | |
| 2490 | inline flatbuffers::Offset<SparsityParameters> CreateSparsityParametersDirect( |
| 2491 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2492 | const std::vector<int32_t> *traversal_order = nullptr, |
| 2493 | const std::vector<int32_t> *block_map = nullptr, |
| 2494 | const std::vector<flatbuffers::Offset<tflite::DimensionMetadata>> *dim_metadata = nullptr) { |
| 2495 | auto traversal_order__ = traversal_order ? _fbb.CreateVector<int32_t>(*traversal_order) : 0; |
| 2496 | auto block_map__ = block_map ? _fbb.CreateVector<int32_t>(*block_map) : 0; |
| 2497 | auto dim_metadata__ = dim_metadata ? _fbb.CreateVector<flatbuffers::Offset<tflite::DimensionMetadata>>(*dim_metadata) : 0; |
| 2498 | return tflite::CreateSparsityParameters( |
| 2499 | _fbb, |
| 2500 | traversal_order__, |
| 2501 | block_map__, |
| 2502 | dim_metadata__); |
| 2503 | } |
| 2504 | |
| 2505 | struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2506 | typedef TensorBuilder Builder; |
| 2507 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2508 | VT_SHAPE = 4, |
| 2509 | VT_TYPE = 6, |
| 2510 | VT_BUFFER = 8, |
| 2511 | VT_NAME = 10, |
| 2512 | VT_QUANTIZATION = 12, |
| 2513 | VT_IS_VARIABLE = 14, |
| 2514 | VT_SPARSITY = 16, |
| 2515 | VT_SHAPE_SIGNATURE = 18 |
| 2516 | }; |
| 2517 | const flatbuffers::Vector<int32_t> *shape() const { |
| 2518 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_SHAPE); |
| 2519 | } |
| 2520 | tflite::TensorType type() const { |
| 2521 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_TYPE, 0)); |
| 2522 | } |
| 2523 | uint32_t buffer() const { |
| 2524 | return GetField<uint32_t>(VT_BUFFER, 0); |
| 2525 | } |
| 2526 | const flatbuffers::String *name() const { |
| 2527 | return GetPointer<const flatbuffers::String *>(VT_NAME); |
| 2528 | } |
| 2529 | const tflite::QuantizationParameters *quantization() const { |
| 2530 | return GetPointer<const tflite::QuantizationParameters *>(VT_QUANTIZATION); |
| 2531 | } |
| 2532 | bool is_variable() const { |
| 2533 | return GetField<uint8_t>(VT_IS_VARIABLE, 0) != 0; |
| 2534 | } |
| 2535 | const tflite::SparsityParameters *sparsity() const { |
| 2536 | return GetPointer<const tflite::SparsityParameters *>(VT_SPARSITY); |
| 2537 | } |
| 2538 | const flatbuffers::Vector<int32_t> *shape_signature() const { |
| 2539 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_SHAPE_SIGNATURE); |
| 2540 | } |
| 2541 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2542 | return VerifyTableStart(verifier) && |
| 2543 | VerifyOffset(verifier, VT_SHAPE) && |
| 2544 | verifier.VerifyVector(shape()) && |
| 2545 | VerifyField<int8_t>(verifier, VT_TYPE) && |
| 2546 | VerifyField<uint32_t>(verifier, VT_BUFFER) && |
| 2547 | VerifyOffset(verifier, VT_NAME) && |
| 2548 | verifier.VerifyString(name()) && |
| 2549 | VerifyOffset(verifier, VT_QUANTIZATION) && |
| 2550 | verifier.VerifyTable(quantization()) && |
| 2551 | VerifyField<uint8_t>(verifier, VT_IS_VARIABLE) && |
| 2552 | VerifyOffset(verifier, VT_SPARSITY) && |
| 2553 | verifier.VerifyTable(sparsity()) && |
| 2554 | VerifyOffset(verifier, VT_SHAPE_SIGNATURE) && |
| 2555 | verifier.VerifyVector(shape_signature()) && |
| 2556 | verifier.EndTable(); |
| 2557 | } |
| 2558 | }; |
| 2559 | |
| 2560 | struct TensorBuilder { |
| 2561 | typedef Tensor Table; |
| 2562 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2563 | flatbuffers::uoffset_t start_; |
| 2564 | void add_shape(flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape) { |
| 2565 | fbb_.AddOffset(Tensor::VT_SHAPE, shape); |
| 2566 | } |
| 2567 | void add_type(tflite::TensorType type) { |
| 2568 | fbb_.AddElement<int8_t>(Tensor::VT_TYPE, static_cast<int8_t>(type), 0); |
| 2569 | } |
| 2570 | void add_buffer(uint32_t buffer) { |
| 2571 | fbb_.AddElement<uint32_t>(Tensor::VT_BUFFER, buffer, 0); |
| 2572 | } |
| 2573 | void add_name(flatbuffers::Offset<flatbuffers::String> name) { |
| 2574 | fbb_.AddOffset(Tensor::VT_NAME, name); |
| 2575 | } |
| 2576 | void add_quantization(flatbuffers::Offset<tflite::QuantizationParameters> quantization) { |
| 2577 | fbb_.AddOffset(Tensor::VT_QUANTIZATION, quantization); |
| 2578 | } |
| 2579 | void add_is_variable(bool is_variable) { |
| 2580 | fbb_.AddElement<uint8_t>(Tensor::VT_IS_VARIABLE, static_cast<uint8_t>(is_variable), 0); |
| 2581 | } |
| 2582 | void add_sparsity(flatbuffers::Offset<tflite::SparsityParameters> sparsity) { |
| 2583 | fbb_.AddOffset(Tensor::VT_SPARSITY, sparsity); |
| 2584 | } |
| 2585 | void add_shape_signature(flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape_signature) { |
| 2586 | fbb_.AddOffset(Tensor::VT_SHAPE_SIGNATURE, shape_signature); |
| 2587 | } |
| 2588 | explicit TensorBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2589 | : fbb_(_fbb) { |
| 2590 | start_ = fbb_.StartTable(); |
| 2591 | } |
| 2592 | flatbuffers::Offset<Tensor> Finish() { |
| 2593 | const auto end = fbb_.EndTable(start_); |
| 2594 | auto o = flatbuffers::Offset<Tensor>(end); |
| 2595 | return o; |
| 2596 | } |
| 2597 | }; |
| 2598 | |
| 2599 | inline flatbuffers::Offset<Tensor> CreateTensor( |
| 2600 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2601 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape = 0, |
| 2602 | tflite::TensorType type = tflite::TensorType_FLOAT32, |
| 2603 | uint32_t buffer = 0, |
| 2604 | flatbuffers::Offset<flatbuffers::String> name = 0, |
| 2605 | flatbuffers::Offset<tflite::QuantizationParameters> quantization = 0, |
| 2606 | bool is_variable = false, |
| 2607 | flatbuffers::Offset<tflite::SparsityParameters> sparsity = 0, |
| 2608 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape_signature = 0) { |
| 2609 | TensorBuilder builder_(_fbb); |
| 2610 | builder_.add_shape_signature(shape_signature); |
| 2611 | builder_.add_sparsity(sparsity); |
| 2612 | builder_.add_quantization(quantization); |
| 2613 | builder_.add_name(name); |
| 2614 | builder_.add_buffer(buffer); |
| 2615 | builder_.add_shape(shape); |
| 2616 | builder_.add_is_variable(is_variable); |
| 2617 | builder_.add_type(type); |
| 2618 | return builder_.Finish(); |
| 2619 | } |
| 2620 | |
| 2621 | inline flatbuffers::Offset<Tensor> CreateTensorDirect( |
| 2622 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2623 | const std::vector<int32_t> *shape = nullptr, |
| 2624 | tflite::TensorType type = tflite::TensorType_FLOAT32, |
| 2625 | uint32_t buffer = 0, |
| 2626 | const char *name = nullptr, |
| 2627 | flatbuffers::Offset<tflite::QuantizationParameters> quantization = 0, |
| 2628 | bool is_variable = false, |
| 2629 | flatbuffers::Offset<tflite::SparsityParameters> sparsity = 0, |
| 2630 | const std::vector<int32_t> *shape_signature = nullptr) { |
| 2631 | auto shape__ = shape ? _fbb.CreateVector<int32_t>(*shape) : 0; |
| 2632 | auto name__ = name ? _fbb.CreateString(name) : 0; |
| 2633 | auto shape_signature__ = shape_signature ? _fbb.CreateVector<int32_t>(*shape_signature) : 0; |
| 2634 | return tflite::CreateTensor( |
| 2635 | _fbb, |
| 2636 | shape__, |
| 2637 | type, |
| 2638 | buffer, |
| 2639 | name__, |
| 2640 | quantization, |
| 2641 | is_variable, |
| 2642 | sparsity, |
| 2643 | shape_signature__); |
| 2644 | } |
| 2645 | |
| 2646 | struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2647 | typedef Conv2DOptionsBuilder Builder; |
| 2648 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2649 | VT_PADDING = 4, |
| 2650 | VT_STRIDE_W = 6, |
| 2651 | VT_STRIDE_H = 8, |
| 2652 | VT_FUSED_ACTIVATION_FUNCTION = 10, |
| 2653 | VT_DILATION_W_FACTOR = 12, |
| 2654 | VT_DILATION_H_FACTOR = 14 |
| 2655 | }; |
| 2656 | tflite::Padding padding() const { |
| 2657 | return static_cast<tflite::Padding>(GetField<int8_t>(VT_PADDING, 0)); |
| 2658 | } |
| 2659 | int32_t stride_w() const { |
| 2660 | return GetField<int32_t>(VT_STRIDE_W, 0); |
| 2661 | } |
| 2662 | int32_t stride_h() const { |
| 2663 | return GetField<int32_t>(VT_STRIDE_H, 0); |
| 2664 | } |
| 2665 | tflite::ActivationFunctionType fused_activation_function() const { |
| 2666 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 2667 | } |
| 2668 | int32_t dilation_w_factor() const { |
| 2669 | return GetField<int32_t>(VT_DILATION_W_FACTOR, 1); |
| 2670 | } |
| 2671 | int32_t dilation_h_factor() const { |
| 2672 | return GetField<int32_t>(VT_DILATION_H_FACTOR, 1); |
| 2673 | } |
| 2674 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2675 | return VerifyTableStart(verifier) && |
| 2676 | VerifyField<int8_t>(verifier, VT_PADDING) && |
| 2677 | VerifyField<int32_t>(verifier, VT_STRIDE_W) && |
| 2678 | VerifyField<int32_t>(verifier, VT_STRIDE_H) && |
| 2679 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 2680 | VerifyField<int32_t>(verifier, VT_DILATION_W_FACTOR) && |
| 2681 | VerifyField<int32_t>(verifier, VT_DILATION_H_FACTOR) && |
| 2682 | verifier.EndTable(); |
| 2683 | } |
| 2684 | }; |
| 2685 | |
| 2686 | struct Conv2DOptionsBuilder { |
| 2687 | typedef Conv2DOptions Table; |
| 2688 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2689 | flatbuffers::uoffset_t start_; |
| 2690 | void add_padding(tflite::Padding padding) { |
| 2691 | fbb_.AddElement<int8_t>(Conv2DOptions::VT_PADDING, static_cast<int8_t>(padding), 0); |
| 2692 | } |
| 2693 | void add_stride_w(int32_t stride_w) { |
| 2694 | fbb_.AddElement<int32_t>(Conv2DOptions::VT_STRIDE_W, stride_w, 0); |
| 2695 | } |
| 2696 | void add_stride_h(int32_t stride_h) { |
| 2697 | fbb_.AddElement<int32_t>(Conv2DOptions::VT_STRIDE_H, stride_h, 0); |
| 2698 | } |
| 2699 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 2700 | fbb_.AddElement<int8_t>(Conv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 2701 | } |
| 2702 | void add_dilation_w_factor(int32_t dilation_w_factor) { |
| 2703 | fbb_.AddElement<int32_t>(Conv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); |
| 2704 | } |
| 2705 | void add_dilation_h_factor(int32_t dilation_h_factor) { |
| 2706 | fbb_.AddElement<int32_t>(Conv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); |
| 2707 | } |
| 2708 | explicit Conv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2709 | : fbb_(_fbb) { |
| 2710 | start_ = fbb_.StartTable(); |
| 2711 | } |
| 2712 | flatbuffers::Offset<Conv2DOptions> Finish() { |
| 2713 | const auto end = fbb_.EndTable(start_); |
| 2714 | auto o = flatbuffers::Offset<Conv2DOptions>(end); |
| 2715 | return o; |
| 2716 | } |
| 2717 | }; |
| 2718 | |
| 2719 | inline flatbuffers::Offset<Conv2DOptions> CreateConv2DOptions( |
| 2720 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2721 | tflite::Padding padding = tflite::Padding_SAME, |
| 2722 | int32_t stride_w = 0, |
| 2723 | int32_t stride_h = 0, |
| 2724 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 2725 | int32_t dilation_w_factor = 1, |
| 2726 | int32_t dilation_h_factor = 1) { |
| 2727 | Conv2DOptionsBuilder builder_(_fbb); |
| 2728 | builder_.add_dilation_h_factor(dilation_h_factor); |
| 2729 | builder_.add_dilation_w_factor(dilation_w_factor); |
| 2730 | builder_.add_stride_h(stride_h); |
| 2731 | builder_.add_stride_w(stride_w); |
| 2732 | builder_.add_fused_activation_function(fused_activation_function); |
| 2733 | builder_.add_padding(padding); |
| 2734 | return builder_.Finish(); |
| 2735 | } |
| 2736 | |
| 2737 | struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2738 | typedef Pool2DOptionsBuilder Builder; |
| 2739 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2740 | VT_PADDING = 4, |
| 2741 | VT_STRIDE_W = 6, |
| 2742 | VT_STRIDE_H = 8, |
| 2743 | VT_FILTER_WIDTH = 10, |
| 2744 | VT_FILTER_HEIGHT = 12, |
| 2745 | VT_FUSED_ACTIVATION_FUNCTION = 14 |
| 2746 | }; |
| 2747 | tflite::Padding padding() const { |
| 2748 | return static_cast<tflite::Padding>(GetField<int8_t>(VT_PADDING, 0)); |
| 2749 | } |
| 2750 | int32_t stride_w() const { |
| 2751 | return GetField<int32_t>(VT_STRIDE_W, 0); |
| 2752 | } |
| 2753 | int32_t stride_h() const { |
| 2754 | return GetField<int32_t>(VT_STRIDE_H, 0); |
| 2755 | } |
| 2756 | int32_t filter_width() const { |
| 2757 | return GetField<int32_t>(VT_FILTER_WIDTH, 0); |
| 2758 | } |
| 2759 | int32_t filter_height() const { |
| 2760 | return GetField<int32_t>(VT_FILTER_HEIGHT, 0); |
| 2761 | } |
| 2762 | tflite::ActivationFunctionType fused_activation_function() const { |
| 2763 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 2764 | } |
| 2765 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2766 | return VerifyTableStart(verifier) && |
| 2767 | VerifyField<int8_t>(verifier, VT_PADDING) && |
| 2768 | VerifyField<int32_t>(verifier, VT_STRIDE_W) && |
| 2769 | VerifyField<int32_t>(verifier, VT_STRIDE_H) && |
| 2770 | VerifyField<int32_t>(verifier, VT_FILTER_WIDTH) && |
| 2771 | VerifyField<int32_t>(verifier, VT_FILTER_HEIGHT) && |
| 2772 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 2773 | verifier.EndTable(); |
| 2774 | } |
| 2775 | }; |
| 2776 | |
| 2777 | struct Pool2DOptionsBuilder { |
| 2778 | typedef Pool2DOptions Table; |
| 2779 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2780 | flatbuffers::uoffset_t start_; |
| 2781 | void add_padding(tflite::Padding padding) { |
| 2782 | fbb_.AddElement<int8_t>(Pool2DOptions::VT_PADDING, static_cast<int8_t>(padding), 0); |
| 2783 | } |
| 2784 | void add_stride_w(int32_t stride_w) { |
| 2785 | fbb_.AddElement<int32_t>(Pool2DOptions::VT_STRIDE_W, stride_w, 0); |
| 2786 | } |
| 2787 | void add_stride_h(int32_t stride_h) { |
| 2788 | fbb_.AddElement<int32_t>(Pool2DOptions::VT_STRIDE_H, stride_h, 0); |
| 2789 | } |
| 2790 | void add_filter_width(int32_t filter_width) { |
| 2791 | fbb_.AddElement<int32_t>(Pool2DOptions::VT_FILTER_WIDTH, filter_width, 0); |
| 2792 | } |
| 2793 | void add_filter_height(int32_t filter_height) { |
| 2794 | fbb_.AddElement<int32_t>(Pool2DOptions::VT_FILTER_HEIGHT, filter_height, 0); |
| 2795 | } |
| 2796 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 2797 | fbb_.AddElement<int8_t>(Pool2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 2798 | } |
| 2799 | explicit Pool2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2800 | : fbb_(_fbb) { |
| 2801 | start_ = fbb_.StartTable(); |
| 2802 | } |
| 2803 | flatbuffers::Offset<Pool2DOptions> Finish() { |
| 2804 | const auto end = fbb_.EndTable(start_); |
| 2805 | auto o = flatbuffers::Offset<Pool2DOptions>(end); |
| 2806 | return o; |
| 2807 | } |
| 2808 | }; |
| 2809 | |
| 2810 | inline flatbuffers::Offset<Pool2DOptions> CreatePool2DOptions( |
| 2811 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2812 | tflite::Padding padding = tflite::Padding_SAME, |
| 2813 | int32_t stride_w = 0, |
| 2814 | int32_t stride_h = 0, |
| 2815 | int32_t filter_width = 0, |
| 2816 | int32_t filter_height = 0, |
| 2817 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE) { |
| 2818 | Pool2DOptionsBuilder builder_(_fbb); |
| 2819 | builder_.add_filter_height(filter_height); |
| 2820 | builder_.add_filter_width(filter_width); |
| 2821 | builder_.add_stride_h(stride_h); |
| 2822 | builder_.add_stride_w(stride_w); |
| 2823 | builder_.add_fused_activation_function(fused_activation_function); |
| 2824 | builder_.add_padding(padding); |
| 2825 | return builder_.Finish(); |
| 2826 | } |
| 2827 | |
| 2828 | struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2829 | typedef DepthwiseConv2DOptionsBuilder Builder; |
| 2830 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2831 | VT_PADDING = 4, |
| 2832 | VT_STRIDE_W = 6, |
| 2833 | VT_STRIDE_H = 8, |
| 2834 | VT_DEPTH_MULTIPLIER = 10, |
| 2835 | VT_FUSED_ACTIVATION_FUNCTION = 12, |
| 2836 | VT_DILATION_W_FACTOR = 14, |
| 2837 | VT_DILATION_H_FACTOR = 16 |
| 2838 | }; |
| 2839 | tflite::Padding padding() const { |
| 2840 | return static_cast<tflite::Padding>(GetField<int8_t>(VT_PADDING, 0)); |
| 2841 | } |
| 2842 | int32_t stride_w() const { |
| 2843 | return GetField<int32_t>(VT_STRIDE_W, 0); |
| 2844 | } |
| 2845 | int32_t stride_h() const { |
| 2846 | return GetField<int32_t>(VT_STRIDE_H, 0); |
| 2847 | } |
| 2848 | int32_t depth_multiplier() const { |
| 2849 | return GetField<int32_t>(VT_DEPTH_MULTIPLIER, 0); |
| 2850 | } |
| 2851 | tflite::ActivationFunctionType fused_activation_function() const { |
| 2852 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 2853 | } |
| 2854 | int32_t dilation_w_factor() const { |
| 2855 | return GetField<int32_t>(VT_DILATION_W_FACTOR, 1); |
| 2856 | } |
| 2857 | int32_t dilation_h_factor() const { |
| 2858 | return GetField<int32_t>(VT_DILATION_H_FACTOR, 1); |
| 2859 | } |
| 2860 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2861 | return VerifyTableStart(verifier) && |
| 2862 | VerifyField<int8_t>(verifier, VT_PADDING) && |
| 2863 | VerifyField<int32_t>(verifier, VT_STRIDE_W) && |
| 2864 | VerifyField<int32_t>(verifier, VT_STRIDE_H) && |
| 2865 | VerifyField<int32_t>(verifier, VT_DEPTH_MULTIPLIER) && |
| 2866 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 2867 | VerifyField<int32_t>(verifier, VT_DILATION_W_FACTOR) && |
| 2868 | VerifyField<int32_t>(verifier, VT_DILATION_H_FACTOR) && |
| 2869 | verifier.EndTable(); |
| 2870 | } |
| 2871 | }; |
| 2872 | |
| 2873 | struct DepthwiseConv2DOptionsBuilder { |
| 2874 | typedef DepthwiseConv2DOptions Table; |
| 2875 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2876 | flatbuffers::uoffset_t start_; |
| 2877 | void add_padding(tflite::Padding padding) { |
| 2878 | fbb_.AddElement<int8_t>(DepthwiseConv2DOptions::VT_PADDING, static_cast<int8_t>(padding), 0); |
| 2879 | } |
| 2880 | void add_stride_w(int32_t stride_w) { |
| 2881 | fbb_.AddElement<int32_t>(DepthwiseConv2DOptions::VT_STRIDE_W, stride_w, 0); |
| 2882 | } |
| 2883 | void add_stride_h(int32_t stride_h) { |
| 2884 | fbb_.AddElement<int32_t>(DepthwiseConv2DOptions::VT_STRIDE_H, stride_h, 0); |
| 2885 | } |
| 2886 | void add_depth_multiplier(int32_t depth_multiplier) { |
| 2887 | fbb_.AddElement<int32_t>(DepthwiseConv2DOptions::VT_DEPTH_MULTIPLIER, depth_multiplier, 0); |
| 2888 | } |
| 2889 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 2890 | fbb_.AddElement<int8_t>(DepthwiseConv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 2891 | } |
| 2892 | void add_dilation_w_factor(int32_t dilation_w_factor) { |
| 2893 | fbb_.AddElement<int32_t>(DepthwiseConv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); |
| 2894 | } |
| 2895 | void add_dilation_h_factor(int32_t dilation_h_factor) { |
| 2896 | fbb_.AddElement<int32_t>(DepthwiseConv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); |
| 2897 | } |
| 2898 | explicit DepthwiseConv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2899 | : fbb_(_fbb) { |
| 2900 | start_ = fbb_.StartTable(); |
| 2901 | } |
| 2902 | flatbuffers::Offset<DepthwiseConv2DOptions> Finish() { |
| 2903 | const auto end = fbb_.EndTable(start_); |
| 2904 | auto o = flatbuffers::Offset<DepthwiseConv2DOptions>(end); |
| 2905 | return o; |
| 2906 | } |
| 2907 | }; |
| 2908 | |
| 2909 | inline flatbuffers::Offset<DepthwiseConv2DOptions> CreateDepthwiseConv2DOptions( |
| 2910 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2911 | tflite::Padding padding = tflite::Padding_SAME, |
| 2912 | int32_t stride_w = 0, |
| 2913 | int32_t stride_h = 0, |
| 2914 | int32_t depth_multiplier = 0, |
| 2915 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 2916 | int32_t dilation_w_factor = 1, |
| 2917 | int32_t dilation_h_factor = 1) { |
| 2918 | DepthwiseConv2DOptionsBuilder builder_(_fbb); |
| 2919 | builder_.add_dilation_h_factor(dilation_h_factor); |
| 2920 | builder_.add_dilation_w_factor(dilation_w_factor); |
| 2921 | builder_.add_depth_multiplier(depth_multiplier); |
| 2922 | builder_.add_stride_h(stride_h); |
| 2923 | builder_.add_stride_w(stride_w); |
| 2924 | builder_.add_fused_activation_function(fused_activation_function); |
| 2925 | builder_.add_padding(padding); |
| 2926 | return builder_.Finish(); |
| 2927 | } |
| 2928 | |
| 2929 | struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 2930 | typedef ConcatEmbeddingsOptionsBuilder Builder; |
| 2931 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 2932 | VT_NUM_CHANNELS = 4, |
| 2933 | VT_NUM_COLUMNS_PER_CHANNEL = 6, |
| 2934 | VT_EMBEDDING_DIM_PER_CHANNEL = 8 |
| 2935 | }; |
| 2936 | int32_t num_channels() const { |
| 2937 | return GetField<int32_t>(VT_NUM_CHANNELS, 0); |
| 2938 | } |
| 2939 | const flatbuffers::Vector<int32_t> *num_columns_per_channel() const { |
| 2940 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_NUM_COLUMNS_PER_CHANNEL); |
| 2941 | } |
| 2942 | const flatbuffers::Vector<int32_t> *embedding_dim_per_channel() const { |
| 2943 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_EMBEDDING_DIM_PER_CHANNEL); |
| 2944 | } |
| 2945 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 2946 | return VerifyTableStart(verifier) && |
| 2947 | VerifyField<int32_t>(verifier, VT_NUM_CHANNELS) && |
| 2948 | VerifyOffset(verifier, VT_NUM_COLUMNS_PER_CHANNEL) && |
| 2949 | verifier.VerifyVector(num_columns_per_channel()) && |
| 2950 | VerifyOffset(verifier, VT_EMBEDDING_DIM_PER_CHANNEL) && |
| 2951 | verifier.VerifyVector(embedding_dim_per_channel()) && |
| 2952 | verifier.EndTable(); |
| 2953 | } |
| 2954 | }; |
| 2955 | |
| 2956 | struct ConcatEmbeddingsOptionsBuilder { |
| 2957 | typedef ConcatEmbeddingsOptions Table; |
| 2958 | flatbuffers::FlatBufferBuilder &fbb_; |
| 2959 | flatbuffers::uoffset_t start_; |
| 2960 | void add_num_channels(int32_t num_channels) { |
| 2961 | fbb_.AddElement<int32_t>(ConcatEmbeddingsOptions::VT_NUM_CHANNELS, num_channels, 0); |
| 2962 | } |
| 2963 | void add_num_columns_per_channel(flatbuffers::Offset<flatbuffers::Vector<int32_t>> num_columns_per_channel) { |
| 2964 | fbb_.AddOffset(ConcatEmbeddingsOptions::VT_NUM_COLUMNS_PER_CHANNEL, num_columns_per_channel); |
| 2965 | } |
| 2966 | void add_embedding_dim_per_channel(flatbuffers::Offset<flatbuffers::Vector<int32_t>> embedding_dim_per_channel) { |
| 2967 | fbb_.AddOffset(ConcatEmbeddingsOptions::VT_EMBEDDING_DIM_PER_CHANNEL, embedding_dim_per_channel); |
| 2968 | } |
| 2969 | explicit ConcatEmbeddingsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 2970 | : fbb_(_fbb) { |
| 2971 | start_ = fbb_.StartTable(); |
| 2972 | } |
| 2973 | flatbuffers::Offset<ConcatEmbeddingsOptions> Finish() { |
| 2974 | const auto end = fbb_.EndTable(start_); |
| 2975 | auto o = flatbuffers::Offset<ConcatEmbeddingsOptions>(end); |
| 2976 | return o; |
| 2977 | } |
| 2978 | }; |
| 2979 | |
| 2980 | inline flatbuffers::Offset<ConcatEmbeddingsOptions> CreateConcatEmbeddingsOptions( |
| 2981 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2982 | int32_t num_channels = 0, |
| 2983 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> num_columns_per_channel = 0, |
| 2984 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> embedding_dim_per_channel = 0) { |
| 2985 | ConcatEmbeddingsOptionsBuilder builder_(_fbb); |
| 2986 | builder_.add_embedding_dim_per_channel(embedding_dim_per_channel); |
| 2987 | builder_.add_num_columns_per_channel(num_columns_per_channel); |
| 2988 | builder_.add_num_channels(num_channels); |
| 2989 | return builder_.Finish(); |
| 2990 | } |
| 2991 | |
| 2992 | inline flatbuffers::Offset<ConcatEmbeddingsOptions> CreateConcatEmbeddingsOptionsDirect( |
| 2993 | flatbuffers::FlatBufferBuilder &_fbb, |
| 2994 | int32_t num_channels = 0, |
| 2995 | const std::vector<int32_t> *num_columns_per_channel = nullptr, |
| 2996 | const std::vector<int32_t> *embedding_dim_per_channel = nullptr) { |
| 2997 | auto num_columns_per_channel__ = num_columns_per_channel ? _fbb.CreateVector<int32_t>(*num_columns_per_channel) : 0; |
| 2998 | auto embedding_dim_per_channel__ = embedding_dim_per_channel ? _fbb.CreateVector<int32_t>(*embedding_dim_per_channel) : 0; |
| 2999 | return tflite::CreateConcatEmbeddingsOptions( |
| 3000 | _fbb, |
| 3001 | num_channels, |
| 3002 | num_columns_per_channel__, |
| 3003 | embedding_dim_per_channel__); |
| 3004 | } |
| 3005 | |
| 3006 | struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3007 | typedef LSHProjectionOptionsBuilder Builder; |
| 3008 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3009 | VT_TYPE = 4 |
| 3010 | }; |
| 3011 | tflite::LSHProjectionType type() const { |
| 3012 | return static_cast<tflite::LSHProjectionType>(GetField<int8_t>(VT_TYPE, 0)); |
| 3013 | } |
| 3014 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3015 | return VerifyTableStart(verifier) && |
| 3016 | VerifyField<int8_t>(verifier, VT_TYPE) && |
| 3017 | verifier.EndTable(); |
| 3018 | } |
| 3019 | }; |
| 3020 | |
| 3021 | struct LSHProjectionOptionsBuilder { |
| 3022 | typedef LSHProjectionOptions Table; |
| 3023 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3024 | flatbuffers::uoffset_t start_; |
| 3025 | void add_type(tflite::LSHProjectionType type) { |
| 3026 | fbb_.AddElement<int8_t>(LSHProjectionOptions::VT_TYPE, static_cast<int8_t>(type), 0); |
| 3027 | } |
| 3028 | explicit LSHProjectionOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3029 | : fbb_(_fbb) { |
| 3030 | start_ = fbb_.StartTable(); |
| 3031 | } |
| 3032 | flatbuffers::Offset<LSHProjectionOptions> Finish() { |
| 3033 | const auto end = fbb_.EndTable(start_); |
| 3034 | auto o = flatbuffers::Offset<LSHProjectionOptions>(end); |
| 3035 | return o; |
| 3036 | } |
| 3037 | }; |
| 3038 | |
| 3039 | inline flatbuffers::Offset<LSHProjectionOptions> CreateLSHProjectionOptions( |
| 3040 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3041 | tflite::LSHProjectionType type = tflite::LSHProjectionType_UNKNOWN) { |
| 3042 | LSHProjectionOptionsBuilder builder_(_fbb); |
| 3043 | builder_.add_type(type); |
| 3044 | return builder_.Finish(); |
| 3045 | } |
| 3046 | |
| 3047 | struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3048 | typedef SVDFOptionsBuilder Builder; |
| 3049 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3050 | VT_RANK = 4, |
| 3051 | VT_FUSED_ACTIVATION_FUNCTION = 6, |
| 3052 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 |
| 3053 | }; |
| 3054 | int32_t rank() const { |
| 3055 | return GetField<int32_t>(VT_RANK, 0); |
| 3056 | } |
| 3057 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3058 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3059 | } |
| 3060 | bool asymmetric_quantize_inputs() const { |
| 3061 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3062 | } |
| 3063 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3064 | return VerifyTableStart(verifier) && |
| 3065 | VerifyField<int32_t>(verifier, VT_RANK) && |
| 3066 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3067 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3068 | verifier.EndTable(); |
| 3069 | } |
| 3070 | }; |
| 3071 | |
| 3072 | struct SVDFOptionsBuilder { |
| 3073 | typedef SVDFOptions Table; |
| 3074 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3075 | flatbuffers::uoffset_t start_; |
| 3076 | void add_rank(int32_t rank) { |
| 3077 | fbb_.AddElement<int32_t>(SVDFOptions::VT_RANK, rank, 0); |
| 3078 | } |
| 3079 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3080 | fbb_.AddElement<int8_t>(SVDFOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3081 | } |
| 3082 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3083 | fbb_.AddElement<uint8_t>(SVDFOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3084 | } |
| 3085 | explicit SVDFOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3086 | : fbb_(_fbb) { |
| 3087 | start_ = fbb_.StartTable(); |
| 3088 | } |
| 3089 | flatbuffers::Offset<SVDFOptions> Finish() { |
| 3090 | const auto end = fbb_.EndTable(start_); |
| 3091 | auto o = flatbuffers::Offset<SVDFOptions>(end); |
| 3092 | return o; |
| 3093 | } |
| 3094 | }; |
| 3095 | |
| 3096 | inline flatbuffers::Offset<SVDFOptions> CreateSVDFOptions( |
| 3097 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3098 | int32_t rank = 0, |
| 3099 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3100 | bool asymmetric_quantize_inputs = false) { |
| 3101 | SVDFOptionsBuilder builder_(_fbb); |
| 3102 | builder_.add_rank(rank); |
| 3103 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3104 | builder_.add_fused_activation_function(fused_activation_function); |
| 3105 | return builder_.Finish(); |
| 3106 | } |
| 3107 | |
| 3108 | struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3109 | typedef RNNOptionsBuilder Builder; |
| 3110 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3111 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3112 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 6 |
| 3113 | }; |
| 3114 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3115 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3116 | } |
| 3117 | bool asymmetric_quantize_inputs() const { |
| 3118 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3119 | } |
| 3120 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3121 | return VerifyTableStart(verifier) && |
| 3122 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3123 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3124 | verifier.EndTable(); |
| 3125 | } |
| 3126 | }; |
| 3127 | |
| 3128 | struct RNNOptionsBuilder { |
| 3129 | typedef RNNOptions Table; |
| 3130 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3131 | flatbuffers::uoffset_t start_; |
| 3132 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3133 | fbb_.AddElement<int8_t>(RNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3134 | } |
| 3135 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3136 | fbb_.AddElement<uint8_t>(RNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3137 | } |
| 3138 | explicit RNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3139 | : fbb_(_fbb) { |
| 3140 | start_ = fbb_.StartTable(); |
| 3141 | } |
| 3142 | flatbuffers::Offset<RNNOptions> Finish() { |
| 3143 | const auto end = fbb_.EndTable(start_); |
| 3144 | auto o = flatbuffers::Offset<RNNOptions>(end); |
| 3145 | return o; |
| 3146 | } |
| 3147 | }; |
| 3148 | |
| 3149 | inline flatbuffers::Offset<RNNOptions> CreateRNNOptions( |
| 3150 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3151 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3152 | bool asymmetric_quantize_inputs = false) { |
| 3153 | RNNOptionsBuilder builder_(_fbb); |
| 3154 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3155 | builder_.add_fused_activation_function(fused_activation_function); |
| 3156 | return builder_.Finish(); |
| 3157 | } |
| 3158 | |
| 3159 | struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3160 | typedef SequenceRNNOptionsBuilder Builder; |
| 3161 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3162 | VT_TIME_MAJOR = 4, |
| 3163 | VT_FUSED_ACTIVATION_FUNCTION = 6, |
| 3164 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 |
| 3165 | }; |
| 3166 | bool time_major() const { |
| 3167 | return GetField<uint8_t>(VT_TIME_MAJOR, 0) != 0; |
| 3168 | } |
| 3169 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3170 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3171 | } |
| 3172 | bool asymmetric_quantize_inputs() const { |
| 3173 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3174 | } |
| 3175 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3176 | return VerifyTableStart(verifier) && |
| 3177 | VerifyField<uint8_t>(verifier, VT_TIME_MAJOR) && |
| 3178 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3179 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3180 | verifier.EndTable(); |
| 3181 | } |
| 3182 | }; |
| 3183 | |
| 3184 | struct SequenceRNNOptionsBuilder { |
| 3185 | typedef SequenceRNNOptions Table; |
| 3186 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3187 | flatbuffers::uoffset_t start_; |
| 3188 | void add_time_major(bool time_major) { |
| 3189 | fbb_.AddElement<uint8_t>(SequenceRNNOptions::VT_TIME_MAJOR, static_cast<uint8_t>(time_major), 0); |
| 3190 | } |
| 3191 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3192 | fbb_.AddElement<int8_t>(SequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3193 | } |
| 3194 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3195 | fbb_.AddElement<uint8_t>(SequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3196 | } |
| 3197 | explicit SequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3198 | : fbb_(_fbb) { |
| 3199 | start_ = fbb_.StartTable(); |
| 3200 | } |
| 3201 | flatbuffers::Offset<SequenceRNNOptions> Finish() { |
| 3202 | const auto end = fbb_.EndTable(start_); |
| 3203 | auto o = flatbuffers::Offset<SequenceRNNOptions>(end); |
| 3204 | return o; |
| 3205 | } |
| 3206 | }; |
| 3207 | |
| 3208 | inline flatbuffers::Offset<SequenceRNNOptions> CreateSequenceRNNOptions( |
| 3209 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3210 | bool time_major = false, |
| 3211 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3212 | bool asymmetric_quantize_inputs = false) { |
| 3213 | SequenceRNNOptionsBuilder builder_(_fbb); |
| 3214 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3215 | builder_.add_fused_activation_function(fused_activation_function); |
| 3216 | builder_.add_time_major(time_major); |
| 3217 | return builder_.Finish(); |
| 3218 | } |
| 3219 | |
| 3220 | struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3221 | typedef BidirectionalSequenceRNNOptionsBuilder Builder; |
| 3222 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3223 | VT_TIME_MAJOR = 4, |
| 3224 | VT_FUSED_ACTIVATION_FUNCTION = 6, |
| 3225 | VT_MERGE_OUTPUTS = 8, |
| 3226 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 10 |
| 3227 | }; |
| 3228 | bool time_major() const { |
| 3229 | return GetField<uint8_t>(VT_TIME_MAJOR, 0) != 0; |
| 3230 | } |
| 3231 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3232 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3233 | } |
| 3234 | bool merge_outputs() const { |
| 3235 | return GetField<uint8_t>(VT_MERGE_OUTPUTS, 0) != 0; |
| 3236 | } |
| 3237 | bool asymmetric_quantize_inputs() const { |
| 3238 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3239 | } |
| 3240 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3241 | return VerifyTableStart(verifier) && |
| 3242 | VerifyField<uint8_t>(verifier, VT_TIME_MAJOR) && |
| 3243 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3244 | VerifyField<uint8_t>(verifier, VT_MERGE_OUTPUTS) && |
| 3245 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3246 | verifier.EndTable(); |
| 3247 | } |
| 3248 | }; |
| 3249 | |
| 3250 | struct BidirectionalSequenceRNNOptionsBuilder { |
| 3251 | typedef BidirectionalSequenceRNNOptions Table; |
| 3252 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3253 | flatbuffers::uoffset_t start_; |
| 3254 | void add_time_major(bool time_major) { |
| 3255 | fbb_.AddElement<uint8_t>(BidirectionalSequenceRNNOptions::VT_TIME_MAJOR, static_cast<uint8_t>(time_major), 0); |
| 3256 | } |
| 3257 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3258 | fbb_.AddElement<int8_t>(BidirectionalSequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3259 | } |
| 3260 | void add_merge_outputs(bool merge_outputs) { |
| 3261 | fbb_.AddElement<uint8_t>(BidirectionalSequenceRNNOptions::VT_MERGE_OUTPUTS, static_cast<uint8_t>(merge_outputs), 0); |
| 3262 | } |
| 3263 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3264 | fbb_.AddElement<uint8_t>(BidirectionalSequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3265 | } |
| 3266 | explicit BidirectionalSequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3267 | : fbb_(_fbb) { |
| 3268 | start_ = fbb_.StartTable(); |
| 3269 | } |
| 3270 | flatbuffers::Offset<BidirectionalSequenceRNNOptions> Finish() { |
| 3271 | const auto end = fbb_.EndTable(start_); |
| 3272 | auto o = flatbuffers::Offset<BidirectionalSequenceRNNOptions>(end); |
| 3273 | return o; |
| 3274 | } |
| 3275 | }; |
| 3276 | |
| 3277 | inline flatbuffers::Offset<BidirectionalSequenceRNNOptions> CreateBidirectionalSequenceRNNOptions( |
| 3278 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3279 | bool time_major = false, |
| 3280 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3281 | bool merge_outputs = false, |
| 3282 | bool asymmetric_quantize_inputs = false) { |
| 3283 | BidirectionalSequenceRNNOptionsBuilder builder_(_fbb); |
| 3284 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3285 | builder_.add_merge_outputs(merge_outputs); |
| 3286 | builder_.add_fused_activation_function(fused_activation_function); |
| 3287 | builder_.add_time_major(time_major); |
| 3288 | return builder_.Finish(); |
| 3289 | } |
| 3290 | |
| 3291 | struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3292 | typedef FullyConnectedOptionsBuilder Builder; |
| 3293 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3294 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3295 | VT_WEIGHTS_FORMAT = 6, |
| 3296 | VT_KEEP_NUM_DIMS = 8, |
| 3297 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 10 |
| 3298 | }; |
| 3299 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3300 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3301 | } |
| 3302 | tflite::FullyConnectedOptionsWeightsFormat weights_format() const { |
| 3303 | return static_cast<tflite::FullyConnectedOptionsWeightsFormat>(GetField<int8_t>(VT_WEIGHTS_FORMAT, 0)); |
| 3304 | } |
| 3305 | bool keep_num_dims() const { |
| 3306 | return GetField<uint8_t>(VT_KEEP_NUM_DIMS, 0) != 0; |
| 3307 | } |
| 3308 | bool asymmetric_quantize_inputs() const { |
| 3309 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3310 | } |
| 3311 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3312 | return VerifyTableStart(verifier) && |
| 3313 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3314 | VerifyField<int8_t>(verifier, VT_WEIGHTS_FORMAT) && |
| 3315 | VerifyField<uint8_t>(verifier, VT_KEEP_NUM_DIMS) && |
| 3316 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3317 | verifier.EndTable(); |
| 3318 | } |
| 3319 | }; |
| 3320 | |
| 3321 | struct FullyConnectedOptionsBuilder { |
| 3322 | typedef FullyConnectedOptions Table; |
| 3323 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3324 | flatbuffers::uoffset_t start_; |
| 3325 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3326 | fbb_.AddElement<int8_t>(FullyConnectedOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3327 | } |
| 3328 | void add_weights_format(tflite::FullyConnectedOptionsWeightsFormat weights_format) { |
| 3329 | fbb_.AddElement<int8_t>(FullyConnectedOptions::VT_WEIGHTS_FORMAT, static_cast<int8_t>(weights_format), 0); |
| 3330 | } |
| 3331 | void add_keep_num_dims(bool keep_num_dims) { |
| 3332 | fbb_.AddElement<uint8_t>(FullyConnectedOptions::VT_KEEP_NUM_DIMS, static_cast<uint8_t>(keep_num_dims), 0); |
| 3333 | } |
| 3334 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3335 | fbb_.AddElement<uint8_t>(FullyConnectedOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3336 | } |
| 3337 | explicit FullyConnectedOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3338 | : fbb_(_fbb) { |
| 3339 | start_ = fbb_.StartTable(); |
| 3340 | } |
| 3341 | flatbuffers::Offset<FullyConnectedOptions> Finish() { |
| 3342 | const auto end = fbb_.EndTable(start_); |
| 3343 | auto o = flatbuffers::Offset<FullyConnectedOptions>(end); |
| 3344 | return o; |
| 3345 | } |
| 3346 | }; |
| 3347 | |
| 3348 | inline flatbuffers::Offset<FullyConnectedOptions> CreateFullyConnectedOptions( |
| 3349 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3350 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3351 | tflite::FullyConnectedOptionsWeightsFormat weights_format = tflite::FullyConnectedOptionsWeightsFormat_DEFAULT, |
| 3352 | bool keep_num_dims = false, |
| 3353 | bool asymmetric_quantize_inputs = false) { |
| 3354 | FullyConnectedOptionsBuilder builder_(_fbb); |
| 3355 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3356 | builder_.add_keep_num_dims(keep_num_dims); |
| 3357 | builder_.add_weights_format(weights_format); |
| 3358 | builder_.add_fused_activation_function(fused_activation_function); |
| 3359 | return builder_.Finish(); |
| 3360 | } |
| 3361 | |
| 3362 | struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3363 | typedef SoftmaxOptionsBuilder Builder; |
| 3364 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3365 | VT_BETA = 4 |
| 3366 | }; |
| 3367 | float beta() const { |
| 3368 | return GetField<float>(VT_BETA, 0.0f); |
| 3369 | } |
| 3370 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3371 | return VerifyTableStart(verifier) && |
| 3372 | VerifyField<float>(verifier, VT_BETA) && |
| 3373 | verifier.EndTable(); |
| 3374 | } |
| 3375 | }; |
| 3376 | |
| 3377 | struct SoftmaxOptionsBuilder { |
| 3378 | typedef SoftmaxOptions Table; |
| 3379 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3380 | flatbuffers::uoffset_t start_; |
| 3381 | void add_beta(float beta) { |
| 3382 | fbb_.AddElement<float>(SoftmaxOptions::VT_BETA, beta, 0.0f); |
| 3383 | } |
| 3384 | explicit SoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3385 | : fbb_(_fbb) { |
| 3386 | start_ = fbb_.StartTable(); |
| 3387 | } |
| 3388 | flatbuffers::Offset<SoftmaxOptions> Finish() { |
| 3389 | const auto end = fbb_.EndTable(start_); |
| 3390 | auto o = flatbuffers::Offset<SoftmaxOptions>(end); |
| 3391 | return o; |
| 3392 | } |
| 3393 | }; |
| 3394 | |
| 3395 | inline flatbuffers::Offset<SoftmaxOptions> CreateSoftmaxOptions( |
| 3396 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3397 | float beta = 0.0f) { |
| 3398 | SoftmaxOptionsBuilder builder_(_fbb); |
| 3399 | builder_.add_beta(beta); |
| 3400 | return builder_.Finish(); |
| 3401 | } |
| 3402 | |
| 3403 | struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3404 | typedef ConcatenationOptionsBuilder Builder; |
| 3405 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3406 | VT_AXIS = 4, |
| 3407 | VT_FUSED_ACTIVATION_FUNCTION = 6 |
| 3408 | }; |
| 3409 | int32_t axis() const { |
| 3410 | return GetField<int32_t>(VT_AXIS, 0); |
| 3411 | } |
| 3412 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3413 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3414 | } |
| 3415 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3416 | return VerifyTableStart(verifier) && |
| 3417 | VerifyField<int32_t>(verifier, VT_AXIS) && |
| 3418 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3419 | verifier.EndTable(); |
| 3420 | } |
| 3421 | }; |
| 3422 | |
| 3423 | struct ConcatenationOptionsBuilder { |
| 3424 | typedef ConcatenationOptions Table; |
| 3425 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3426 | flatbuffers::uoffset_t start_; |
| 3427 | void add_axis(int32_t axis) { |
| 3428 | fbb_.AddElement<int32_t>(ConcatenationOptions::VT_AXIS, axis, 0); |
| 3429 | } |
| 3430 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3431 | fbb_.AddElement<int8_t>(ConcatenationOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3432 | } |
| 3433 | explicit ConcatenationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3434 | : fbb_(_fbb) { |
| 3435 | start_ = fbb_.StartTable(); |
| 3436 | } |
| 3437 | flatbuffers::Offset<ConcatenationOptions> Finish() { |
| 3438 | const auto end = fbb_.EndTable(start_); |
| 3439 | auto o = flatbuffers::Offset<ConcatenationOptions>(end); |
| 3440 | return o; |
| 3441 | } |
| 3442 | }; |
| 3443 | |
| 3444 | inline flatbuffers::Offset<ConcatenationOptions> CreateConcatenationOptions( |
| 3445 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3446 | int32_t axis = 0, |
| 3447 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE) { |
| 3448 | ConcatenationOptionsBuilder builder_(_fbb); |
| 3449 | builder_.add_axis(axis); |
| 3450 | builder_.add_fused_activation_function(fused_activation_function); |
| 3451 | return builder_.Finish(); |
| 3452 | } |
| 3453 | |
| 3454 | struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3455 | typedef AddOptionsBuilder Builder; |
| 3456 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3457 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3458 | VT_POT_SCALE_INT16 = 6 |
| 3459 | }; |
| 3460 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3461 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3462 | } |
| 3463 | bool pot_scale_int16() const { |
| 3464 | return GetField<uint8_t>(VT_POT_SCALE_INT16, 1) != 0; |
| 3465 | } |
| 3466 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3467 | return VerifyTableStart(verifier) && |
| 3468 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3469 | VerifyField<uint8_t>(verifier, VT_POT_SCALE_INT16) && |
| 3470 | verifier.EndTable(); |
| 3471 | } |
| 3472 | }; |
| 3473 | |
| 3474 | struct AddOptionsBuilder { |
| 3475 | typedef AddOptions Table; |
| 3476 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3477 | flatbuffers::uoffset_t start_; |
| 3478 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3479 | fbb_.AddElement<int8_t>(AddOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3480 | } |
| 3481 | void add_pot_scale_int16(bool pot_scale_int16) { |
| 3482 | fbb_.AddElement<uint8_t>(AddOptions::VT_POT_SCALE_INT16, static_cast<uint8_t>(pot_scale_int16), 1); |
| 3483 | } |
| 3484 | explicit AddOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3485 | : fbb_(_fbb) { |
| 3486 | start_ = fbb_.StartTable(); |
| 3487 | } |
| 3488 | flatbuffers::Offset<AddOptions> Finish() { |
| 3489 | const auto end = fbb_.EndTable(start_); |
| 3490 | auto o = flatbuffers::Offset<AddOptions>(end); |
| 3491 | return o; |
| 3492 | } |
| 3493 | }; |
| 3494 | |
| 3495 | inline flatbuffers::Offset<AddOptions> CreateAddOptions( |
| 3496 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3497 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3498 | bool pot_scale_int16 = true) { |
| 3499 | AddOptionsBuilder builder_(_fbb); |
| 3500 | builder_.add_pot_scale_int16(pot_scale_int16); |
| 3501 | builder_.add_fused_activation_function(fused_activation_function); |
| 3502 | return builder_.Finish(); |
| 3503 | } |
| 3504 | |
| 3505 | struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3506 | typedef MulOptionsBuilder Builder; |
| 3507 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3508 | VT_FUSED_ACTIVATION_FUNCTION = 4 |
| 3509 | }; |
| 3510 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3511 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3512 | } |
| 3513 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3514 | return VerifyTableStart(verifier) && |
| 3515 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3516 | verifier.EndTable(); |
| 3517 | } |
| 3518 | }; |
| 3519 | |
| 3520 | struct MulOptionsBuilder { |
| 3521 | typedef MulOptions Table; |
| 3522 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3523 | flatbuffers::uoffset_t start_; |
| 3524 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3525 | fbb_.AddElement<int8_t>(MulOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3526 | } |
| 3527 | explicit MulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3528 | : fbb_(_fbb) { |
| 3529 | start_ = fbb_.StartTable(); |
| 3530 | } |
| 3531 | flatbuffers::Offset<MulOptions> Finish() { |
| 3532 | const auto end = fbb_.EndTable(start_); |
| 3533 | auto o = flatbuffers::Offset<MulOptions>(end); |
| 3534 | return o; |
| 3535 | } |
| 3536 | }; |
| 3537 | |
| 3538 | inline flatbuffers::Offset<MulOptions> CreateMulOptions( |
| 3539 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3540 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE) { |
| 3541 | MulOptionsBuilder builder_(_fbb); |
| 3542 | builder_.add_fused_activation_function(fused_activation_function); |
| 3543 | return builder_.Finish(); |
| 3544 | } |
| 3545 | |
| 3546 | struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3547 | typedef L2NormOptionsBuilder Builder; |
| 3548 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3549 | VT_FUSED_ACTIVATION_FUNCTION = 4 |
| 3550 | }; |
| 3551 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3552 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3553 | } |
| 3554 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3555 | return VerifyTableStart(verifier) && |
| 3556 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3557 | verifier.EndTable(); |
| 3558 | } |
| 3559 | }; |
| 3560 | |
| 3561 | struct L2NormOptionsBuilder { |
| 3562 | typedef L2NormOptions Table; |
| 3563 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3564 | flatbuffers::uoffset_t start_; |
| 3565 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3566 | fbb_.AddElement<int8_t>(L2NormOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3567 | } |
| 3568 | explicit L2NormOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3569 | : fbb_(_fbb) { |
| 3570 | start_ = fbb_.StartTable(); |
| 3571 | } |
| 3572 | flatbuffers::Offset<L2NormOptions> Finish() { |
| 3573 | const auto end = fbb_.EndTable(start_); |
| 3574 | auto o = flatbuffers::Offset<L2NormOptions>(end); |
| 3575 | return o; |
| 3576 | } |
| 3577 | }; |
| 3578 | |
| 3579 | inline flatbuffers::Offset<L2NormOptions> CreateL2NormOptions( |
| 3580 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3581 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE) { |
| 3582 | L2NormOptionsBuilder builder_(_fbb); |
| 3583 | builder_.add_fused_activation_function(fused_activation_function); |
| 3584 | return builder_.Finish(); |
| 3585 | } |
| 3586 | |
| 3587 | struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3588 | typedef LocalResponseNormalizationOptionsBuilder Builder; |
| 3589 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3590 | VT_RADIUS = 4, |
| 3591 | VT_BIAS = 6, |
| 3592 | VT_ALPHA = 8, |
| 3593 | VT_BETA = 10 |
| 3594 | }; |
| 3595 | int32_t radius() const { |
| 3596 | return GetField<int32_t>(VT_RADIUS, 0); |
| 3597 | } |
| 3598 | float bias() const { |
| 3599 | return GetField<float>(VT_BIAS, 0.0f); |
| 3600 | } |
| 3601 | float alpha() const { |
| 3602 | return GetField<float>(VT_ALPHA, 0.0f); |
| 3603 | } |
| 3604 | float beta() const { |
| 3605 | return GetField<float>(VT_BETA, 0.0f); |
| 3606 | } |
| 3607 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3608 | return VerifyTableStart(verifier) && |
| 3609 | VerifyField<int32_t>(verifier, VT_RADIUS) && |
| 3610 | VerifyField<float>(verifier, VT_BIAS) && |
| 3611 | VerifyField<float>(verifier, VT_ALPHA) && |
| 3612 | VerifyField<float>(verifier, VT_BETA) && |
| 3613 | verifier.EndTable(); |
| 3614 | } |
| 3615 | }; |
| 3616 | |
| 3617 | struct LocalResponseNormalizationOptionsBuilder { |
| 3618 | typedef LocalResponseNormalizationOptions Table; |
| 3619 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3620 | flatbuffers::uoffset_t start_; |
| 3621 | void add_radius(int32_t radius) { |
| 3622 | fbb_.AddElement<int32_t>(LocalResponseNormalizationOptions::VT_RADIUS, radius, 0); |
| 3623 | } |
| 3624 | void add_bias(float bias) { |
| 3625 | fbb_.AddElement<float>(LocalResponseNormalizationOptions::VT_BIAS, bias, 0.0f); |
| 3626 | } |
| 3627 | void add_alpha(float alpha) { |
| 3628 | fbb_.AddElement<float>(LocalResponseNormalizationOptions::VT_ALPHA, alpha, 0.0f); |
| 3629 | } |
| 3630 | void add_beta(float beta) { |
| 3631 | fbb_.AddElement<float>(LocalResponseNormalizationOptions::VT_BETA, beta, 0.0f); |
| 3632 | } |
| 3633 | explicit LocalResponseNormalizationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3634 | : fbb_(_fbb) { |
| 3635 | start_ = fbb_.StartTable(); |
| 3636 | } |
| 3637 | flatbuffers::Offset<LocalResponseNormalizationOptions> Finish() { |
| 3638 | const auto end = fbb_.EndTable(start_); |
| 3639 | auto o = flatbuffers::Offset<LocalResponseNormalizationOptions>(end); |
| 3640 | return o; |
| 3641 | } |
| 3642 | }; |
| 3643 | |
| 3644 | inline flatbuffers::Offset<LocalResponseNormalizationOptions> CreateLocalResponseNormalizationOptions( |
| 3645 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3646 | int32_t radius = 0, |
| 3647 | float bias = 0.0f, |
| 3648 | float alpha = 0.0f, |
| 3649 | float beta = 0.0f) { |
| 3650 | LocalResponseNormalizationOptionsBuilder builder_(_fbb); |
| 3651 | builder_.add_beta(beta); |
| 3652 | builder_.add_alpha(alpha); |
| 3653 | builder_.add_bias(bias); |
| 3654 | builder_.add_radius(radius); |
| 3655 | return builder_.Finish(); |
| 3656 | } |
| 3657 | |
| 3658 | struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3659 | typedef LSTMOptionsBuilder Builder; |
| 3660 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3661 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3662 | VT_CELL_CLIP = 6, |
| 3663 | VT_PROJ_CLIP = 8, |
| 3664 | VT_KERNEL_TYPE = 10, |
| 3665 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 12 |
| 3666 | }; |
| 3667 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3668 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3669 | } |
| 3670 | float cell_clip() const { |
| 3671 | return GetField<float>(VT_CELL_CLIP, 0.0f); |
| 3672 | } |
| 3673 | float proj_clip() const { |
| 3674 | return GetField<float>(VT_PROJ_CLIP, 0.0f); |
| 3675 | } |
| 3676 | tflite::LSTMKernelType kernel_type() const { |
| 3677 | return static_cast<tflite::LSTMKernelType>(GetField<int8_t>(VT_KERNEL_TYPE, 0)); |
| 3678 | } |
| 3679 | bool asymmetric_quantize_inputs() const { |
| 3680 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3681 | } |
| 3682 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3683 | return VerifyTableStart(verifier) && |
| 3684 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3685 | VerifyField<float>(verifier, VT_CELL_CLIP) && |
| 3686 | VerifyField<float>(verifier, VT_PROJ_CLIP) && |
| 3687 | VerifyField<int8_t>(verifier, VT_KERNEL_TYPE) && |
| 3688 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3689 | verifier.EndTable(); |
| 3690 | } |
| 3691 | }; |
| 3692 | |
| 3693 | struct LSTMOptionsBuilder { |
| 3694 | typedef LSTMOptions Table; |
| 3695 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3696 | flatbuffers::uoffset_t start_; |
| 3697 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3698 | fbb_.AddElement<int8_t>(LSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3699 | } |
| 3700 | void add_cell_clip(float cell_clip) { |
| 3701 | fbb_.AddElement<float>(LSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); |
| 3702 | } |
| 3703 | void add_proj_clip(float proj_clip) { |
| 3704 | fbb_.AddElement<float>(LSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); |
| 3705 | } |
| 3706 | void add_kernel_type(tflite::LSTMKernelType kernel_type) { |
| 3707 | fbb_.AddElement<int8_t>(LSTMOptions::VT_KERNEL_TYPE, static_cast<int8_t>(kernel_type), 0); |
| 3708 | } |
| 3709 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3710 | fbb_.AddElement<uint8_t>(LSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3711 | } |
| 3712 | explicit LSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3713 | : fbb_(_fbb) { |
| 3714 | start_ = fbb_.StartTable(); |
| 3715 | } |
| 3716 | flatbuffers::Offset<LSTMOptions> Finish() { |
| 3717 | const auto end = fbb_.EndTable(start_); |
| 3718 | auto o = flatbuffers::Offset<LSTMOptions>(end); |
| 3719 | return o; |
| 3720 | } |
| 3721 | }; |
| 3722 | |
| 3723 | inline flatbuffers::Offset<LSTMOptions> CreateLSTMOptions( |
| 3724 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3725 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3726 | float cell_clip = 0.0f, |
| 3727 | float proj_clip = 0.0f, |
| 3728 | tflite::LSTMKernelType kernel_type = tflite::LSTMKernelType_FULL, |
| 3729 | bool asymmetric_quantize_inputs = false) { |
| 3730 | LSTMOptionsBuilder builder_(_fbb); |
| 3731 | builder_.add_proj_clip(proj_clip); |
| 3732 | builder_.add_cell_clip(cell_clip); |
| 3733 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3734 | builder_.add_kernel_type(kernel_type); |
| 3735 | builder_.add_fused_activation_function(fused_activation_function); |
| 3736 | return builder_.Finish(); |
| 3737 | } |
| 3738 | |
| 3739 | struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3740 | typedef UnidirectionalSequenceLSTMOptionsBuilder Builder; |
| 3741 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3742 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3743 | VT_CELL_CLIP = 6, |
| 3744 | VT_PROJ_CLIP = 8, |
| 3745 | VT_TIME_MAJOR = 10, |
| 3746 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 12 |
| 3747 | }; |
| 3748 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3749 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3750 | } |
| 3751 | float cell_clip() const { |
| 3752 | return GetField<float>(VT_CELL_CLIP, 0.0f); |
| 3753 | } |
| 3754 | float proj_clip() const { |
| 3755 | return GetField<float>(VT_PROJ_CLIP, 0.0f); |
| 3756 | } |
| 3757 | bool time_major() const { |
| 3758 | return GetField<uint8_t>(VT_TIME_MAJOR, 0) != 0; |
| 3759 | } |
| 3760 | bool asymmetric_quantize_inputs() const { |
| 3761 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3762 | } |
| 3763 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3764 | return VerifyTableStart(verifier) && |
| 3765 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3766 | VerifyField<float>(verifier, VT_CELL_CLIP) && |
| 3767 | VerifyField<float>(verifier, VT_PROJ_CLIP) && |
| 3768 | VerifyField<uint8_t>(verifier, VT_TIME_MAJOR) && |
| 3769 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3770 | verifier.EndTable(); |
| 3771 | } |
| 3772 | }; |
| 3773 | |
| 3774 | struct UnidirectionalSequenceLSTMOptionsBuilder { |
| 3775 | typedef UnidirectionalSequenceLSTMOptions Table; |
| 3776 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3777 | flatbuffers::uoffset_t start_; |
| 3778 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3779 | fbb_.AddElement<int8_t>(UnidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3780 | } |
| 3781 | void add_cell_clip(float cell_clip) { |
| 3782 | fbb_.AddElement<float>(UnidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); |
| 3783 | } |
| 3784 | void add_proj_clip(float proj_clip) { |
| 3785 | fbb_.AddElement<float>(UnidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); |
| 3786 | } |
| 3787 | void add_time_major(bool time_major) { |
| 3788 | fbb_.AddElement<uint8_t>(UnidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, static_cast<uint8_t>(time_major), 0); |
| 3789 | } |
| 3790 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3791 | fbb_.AddElement<uint8_t>(UnidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3792 | } |
| 3793 | explicit UnidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3794 | : fbb_(_fbb) { |
| 3795 | start_ = fbb_.StartTable(); |
| 3796 | } |
| 3797 | flatbuffers::Offset<UnidirectionalSequenceLSTMOptions> Finish() { |
| 3798 | const auto end = fbb_.EndTable(start_); |
| 3799 | auto o = flatbuffers::Offset<UnidirectionalSequenceLSTMOptions>(end); |
| 3800 | return o; |
| 3801 | } |
| 3802 | }; |
| 3803 | |
| 3804 | inline flatbuffers::Offset<UnidirectionalSequenceLSTMOptions> CreateUnidirectionalSequenceLSTMOptions( |
| 3805 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3806 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3807 | float cell_clip = 0.0f, |
| 3808 | float proj_clip = 0.0f, |
| 3809 | bool time_major = false, |
| 3810 | bool asymmetric_quantize_inputs = false) { |
| 3811 | UnidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); |
| 3812 | builder_.add_proj_clip(proj_clip); |
| 3813 | builder_.add_cell_clip(cell_clip); |
| 3814 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3815 | builder_.add_time_major(time_major); |
| 3816 | builder_.add_fused_activation_function(fused_activation_function); |
| 3817 | return builder_.Finish(); |
| 3818 | } |
| 3819 | |
| 3820 | struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3821 | typedef BidirectionalSequenceLSTMOptionsBuilder Builder; |
| 3822 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3823 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 3824 | VT_CELL_CLIP = 6, |
| 3825 | VT_PROJ_CLIP = 8, |
| 3826 | VT_MERGE_OUTPUTS = 10, |
| 3827 | VT_TIME_MAJOR = 12, |
| 3828 | VT_ASYMMETRIC_QUANTIZE_INPUTS = 14 |
| 3829 | }; |
| 3830 | tflite::ActivationFunctionType fused_activation_function() const { |
| 3831 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 3832 | } |
| 3833 | float cell_clip() const { |
| 3834 | return GetField<float>(VT_CELL_CLIP, 0.0f); |
| 3835 | } |
| 3836 | float proj_clip() const { |
| 3837 | return GetField<float>(VT_PROJ_CLIP, 0.0f); |
| 3838 | } |
| 3839 | bool merge_outputs() const { |
| 3840 | return GetField<uint8_t>(VT_MERGE_OUTPUTS, 0) != 0; |
| 3841 | } |
| 3842 | bool time_major() const { |
| 3843 | return GetField<uint8_t>(VT_TIME_MAJOR, 1) != 0; |
| 3844 | } |
| 3845 | bool asymmetric_quantize_inputs() const { |
| 3846 | return GetField<uint8_t>(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; |
| 3847 | } |
| 3848 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3849 | return VerifyTableStart(verifier) && |
| 3850 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 3851 | VerifyField<float>(verifier, VT_CELL_CLIP) && |
| 3852 | VerifyField<float>(verifier, VT_PROJ_CLIP) && |
| 3853 | VerifyField<uint8_t>(verifier, VT_MERGE_OUTPUTS) && |
| 3854 | VerifyField<uint8_t>(verifier, VT_TIME_MAJOR) && |
| 3855 | VerifyField<uint8_t>(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && |
| 3856 | verifier.EndTable(); |
| 3857 | } |
| 3858 | }; |
| 3859 | |
| 3860 | struct BidirectionalSequenceLSTMOptionsBuilder { |
| 3861 | typedef BidirectionalSequenceLSTMOptions Table; |
| 3862 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3863 | flatbuffers::uoffset_t start_; |
| 3864 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 3865 | fbb_.AddElement<int8_t>(BidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 3866 | } |
| 3867 | void add_cell_clip(float cell_clip) { |
| 3868 | fbb_.AddElement<float>(BidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); |
| 3869 | } |
| 3870 | void add_proj_clip(float proj_clip) { |
| 3871 | fbb_.AddElement<float>(BidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); |
| 3872 | } |
| 3873 | void add_merge_outputs(bool merge_outputs) { |
| 3874 | fbb_.AddElement<uint8_t>(BidirectionalSequenceLSTMOptions::VT_MERGE_OUTPUTS, static_cast<uint8_t>(merge_outputs), 0); |
| 3875 | } |
| 3876 | void add_time_major(bool time_major) { |
| 3877 | fbb_.AddElement<uint8_t>(BidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, static_cast<uint8_t>(time_major), 1); |
| 3878 | } |
| 3879 | void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { |
| 3880 | fbb_.AddElement<uint8_t>(BidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast<uint8_t>(asymmetric_quantize_inputs), 0); |
| 3881 | } |
| 3882 | explicit BidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3883 | : fbb_(_fbb) { |
| 3884 | start_ = fbb_.StartTable(); |
| 3885 | } |
| 3886 | flatbuffers::Offset<BidirectionalSequenceLSTMOptions> Finish() { |
| 3887 | const auto end = fbb_.EndTable(start_); |
| 3888 | auto o = flatbuffers::Offset<BidirectionalSequenceLSTMOptions>(end); |
| 3889 | return o; |
| 3890 | } |
| 3891 | }; |
| 3892 | |
| 3893 | inline flatbuffers::Offset<BidirectionalSequenceLSTMOptions> CreateBidirectionalSequenceLSTMOptions( |
| 3894 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3895 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 3896 | float cell_clip = 0.0f, |
| 3897 | float proj_clip = 0.0f, |
| 3898 | bool merge_outputs = false, |
| 3899 | bool time_major = true, |
| 3900 | bool asymmetric_quantize_inputs = false) { |
| 3901 | BidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); |
| 3902 | builder_.add_proj_clip(proj_clip); |
| 3903 | builder_.add_cell_clip(cell_clip); |
| 3904 | builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); |
| 3905 | builder_.add_time_major(time_major); |
| 3906 | builder_.add_merge_outputs(merge_outputs); |
| 3907 | builder_.add_fused_activation_function(fused_activation_function); |
| 3908 | return builder_.Finish(); |
| 3909 | } |
| 3910 | |
| 3911 | struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3912 | typedef ResizeBilinearOptionsBuilder Builder; |
| 3913 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3914 | VT_ALIGN_CORNERS = 8, |
| 3915 | VT_HALF_PIXEL_CENTERS = 10 |
| 3916 | }; |
| 3917 | bool align_corners() const { |
| 3918 | return GetField<uint8_t>(VT_ALIGN_CORNERS, 0) != 0; |
| 3919 | } |
| 3920 | bool half_pixel_centers() const { |
| 3921 | return GetField<uint8_t>(VT_HALF_PIXEL_CENTERS, 0) != 0; |
| 3922 | } |
| 3923 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3924 | return VerifyTableStart(verifier) && |
| 3925 | VerifyField<uint8_t>(verifier, VT_ALIGN_CORNERS) && |
| 3926 | VerifyField<uint8_t>(verifier, VT_HALF_PIXEL_CENTERS) && |
| 3927 | verifier.EndTable(); |
| 3928 | } |
| 3929 | }; |
| 3930 | |
| 3931 | struct ResizeBilinearOptionsBuilder { |
| 3932 | typedef ResizeBilinearOptions Table; |
| 3933 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3934 | flatbuffers::uoffset_t start_; |
| 3935 | void add_align_corners(bool align_corners) { |
| 3936 | fbb_.AddElement<uint8_t>(ResizeBilinearOptions::VT_ALIGN_CORNERS, static_cast<uint8_t>(align_corners), 0); |
| 3937 | } |
| 3938 | void add_half_pixel_centers(bool half_pixel_centers) { |
| 3939 | fbb_.AddElement<uint8_t>(ResizeBilinearOptions::VT_HALF_PIXEL_CENTERS, static_cast<uint8_t>(half_pixel_centers), 0); |
| 3940 | } |
| 3941 | explicit ResizeBilinearOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3942 | : fbb_(_fbb) { |
| 3943 | start_ = fbb_.StartTable(); |
| 3944 | } |
| 3945 | flatbuffers::Offset<ResizeBilinearOptions> Finish() { |
| 3946 | const auto end = fbb_.EndTable(start_); |
| 3947 | auto o = flatbuffers::Offset<ResizeBilinearOptions>(end); |
| 3948 | return o; |
| 3949 | } |
| 3950 | }; |
| 3951 | |
| 3952 | inline flatbuffers::Offset<ResizeBilinearOptions> CreateResizeBilinearOptions( |
| 3953 | flatbuffers::FlatBufferBuilder &_fbb, |
| 3954 | bool align_corners = false, |
| 3955 | bool half_pixel_centers = false) { |
| 3956 | ResizeBilinearOptionsBuilder builder_(_fbb); |
| 3957 | builder_.add_half_pixel_centers(half_pixel_centers); |
| 3958 | builder_.add_align_corners(align_corners); |
| 3959 | return builder_.Finish(); |
| 3960 | } |
| 3961 | |
| 3962 | struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 3963 | typedef ResizeNearestNeighborOptionsBuilder Builder; |
| 3964 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 3965 | VT_ALIGN_CORNERS = 4, |
| 3966 | VT_HALF_PIXEL_CENTERS = 6 |
| 3967 | }; |
| 3968 | bool align_corners() const { |
| 3969 | return GetField<uint8_t>(VT_ALIGN_CORNERS, 0) != 0; |
| 3970 | } |
| 3971 | bool half_pixel_centers() const { |
| 3972 | return GetField<uint8_t>(VT_HALF_PIXEL_CENTERS, 0) != 0; |
| 3973 | } |
| 3974 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 3975 | return VerifyTableStart(verifier) && |
| 3976 | VerifyField<uint8_t>(verifier, VT_ALIGN_CORNERS) && |
| 3977 | VerifyField<uint8_t>(verifier, VT_HALF_PIXEL_CENTERS) && |
| 3978 | verifier.EndTable(); |
| 3979 | } |
| 3980 | }; |
| 3981 | |
| 3982 | struct ResizeNearestNeighborOptionsBuilder { |
| 3983 | typedef ResizeNearestNeighborOptions Table; |
| 3984 | flatbuffers::FlatBufferBuilder &fbb_; |
| 3985 | flatbuffers::uoffset_t start_; |
| 3986 | void add_align_corners(bool align_corners) { |
| 3987 | fbb_.AddElement<uint8_t>(ResizeNearestNeighborOptions::VT_ALIGN_CORNERS, static_cast<uint8_t>(align_corners), 0); |
| 3988 | } |
| 3989 | void add_half_pixel_centers(bool half_pixel_centers) { |
| 3990 | fbb_.AddElement<uint8_t>(ResizeNearestNeighborOptions::VT_HALF_PIXEL_CENTERS, static_cast<uint8_t>(half_pixel_centers), 0); |
| 3991 | } |
| 3992 | explicit ResizeNearestNeighborOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 3993 | : fbb_(_fbb) { |
| 3994 | start_ = fbb_.StartTable(); |
| 3995 | } |
| 3996 | flatbuffers::Offset<ResizeNearestNeighborOptions> Finish() { |
| 3997 | const auto end = fbb_.EndTable(start_); |
| 3998 | auto o = flatbuffers::Offset<ResizeNearestNeighborOptions>(end); |
| 3999 | return o; |
| 4000 | } |
| 4001 | }; |
| 4002 | |
| 4003 | inline flatbuffers::Offset<ResizeNearestNeighborOptions> CreateResizeNearestNeighborOptions( |
| 4004 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4005 | bool align_corners = false, |
| 4006 | bool half_pixel_centers = false) { |
| 4007 | ResizeNearestNeighborOptionsBuilder builder_(_fbb); |
| 4008 | builder_.add_half_pixel_centers(half_pixel_centers); |
| 4009 | builder_.add_align_corners(align_corners); |
| 4010 | return builder_.Finish(); |
| 4011 | } |
| 4012 | |
| 4013 | struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4014 | typedef CallOptionsBuilder Builder; |
| 4015 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4016 | VT_SUBGRAPH = 4 |
| 4017 | }; |
| 4018 | uint32_t subgraph() const { |
| 4019 | return GetField<uint32_t>(VT_SUBGRAPH, 0); |
| 4020 | } |
| 4021 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4022 | return VerifyTableStart(verifier) && |
| 4023 | VerifyField<uint32_t>(verifier, VT_SUBGRAPH) && |
| 4024 | verifier.EndTable(); |
| 4025 | } |
| 4026 | }; |
| 4027 | |
| 4028 | struct CallOptionsBuilder { |
| 4029 | typedef CallOptions Table; |
| 4030 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4031 | flatbuffers::uoffset_t start_; |
| 4032 | void add_subgraph(uint32_t subgraph) { |
| 4033 | fbb_.AddElement<uint32_t>(CallOptions::VT_SUBGRAPH, subgraph, 0); |
| 4034 | } |
| 4035 | explicit CallOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4036 | : fbb_(_fbb) { |
| 4037 | start_ = fbb_.StartTable(); |
| 4038 | } |
| 4039 | flatbuffers::Offset<CallOptions> Finish() { |
| 4040 | const auto end = fbb_.EndTable(start_); |
| 4041 | auto o = flatbuffers::Offset<CallOptions>(end); |
| 4042 | return o; |
| 4043 | } |
| 4044 | }; |
| 4045 | |
| 4046 | inline flatbuffers::Offset<CallOptions> CreateCallOptions( |
| 4047 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4048 | uint32_t subgraph = 0) { |
| 4049 | CallOptionsBuilder builder_(_fbb); |
| 4050 | builder_.add_subgraph(subgraph); |
| 4051 | return builder_.Finish(); |
| 4052 | } |
| 4053 | |
| 4054 | struct PadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4055 | typedef PadOptionsBuilder Builder; |
| 4056 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4057 | return VerifyTableStart(verifier) && |
| 4058 | verifier.EndTable(); |
| 4059 | } |
| 4060 | }; |
| 4061 | |
| 4062 | struct PadOptionsBuilder { |
| 4063 | typedef PadOptions Table; |
| 4064 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4065 | flatbuffers::uoffset_t start_; |
| 4066 | explicit PadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4067 | : fbb_(_fbb) { |
| 4068 | start_ = fbb_.StartTable(); |
| 4069 | } |
| 4070 | flatbuffers::Offset<PadOptions> Finish() { |
| 4071 | const auto end = fbb_.EndTable(start_); |
| 4072 | auto o = flatbuffers::Offset<PadOptions>(end); |
| 4073 | return o; |
| 4074 | } |
| 4075 | }; |
| 4076 | |
| 4077 | inline flatbuffers::Offset<PadOptions> CreatePadOptions( |
| 4078 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4079 | PadOptionsBuilder builder_(_fbb); |
| 4080 | return builder_.Finish(); |
| 4081 | } |
| 4082 | |
| 4083 | struct PadV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4084 | typedef PadV2OptionsBuilder Builder; |
| 4085 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4086 | return VerifyTableStart(verifier) && |
| 4087 | verifier.EndTable(); |
| 4088 | } |
| 4089 | }; |
| 4090 | |
| 4091 | struct PadV2OptionsBuilder { |
| 4092 | typedef PadV2Options Table; |
| 4093 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4094 | flatbuffers::uoffset_t start_; |
| 4095 | explicit PadV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4096 | : fbb_(_fbb) { |
| 4097 | start_ = fbb_.StartTable(); |
| 4098 | } |
| 4099 | flatbuffers::Offset<PadV2Options> Finish() { |
| 4100 | const auto end = fbb_.EndTable(start_); |
| 4101 | auto o = flatbuffers::Offset<PadV2Options>(end); |
| 4102 | return o; |
| 4103 | } |
| 4104 | }; |
| 4105 | |
| 4106 | inline flatbuffers::Offset<PadV2Options> CreatePadV2Options( |
| 4107 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4108 | PadV2OptionsBuilder builder_(_fbb); |
| 4109 | return builder_.Finish(); |
| 4110 | } |
| 4111 | |
| 4112 | struct ReshapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4113 | typedef ReshapeOptionsBuilder Builder; |
| 4114 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4115 | VT_NEW_SHAPE = 4 |
| 4116 | }; |
| 4117 | const flatbuffers::Vector<int32_t> *new_shape() const { |
| 4118 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_NEW_SHAPE); |
| 4119 | } |
| 4120 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4121 | return VerifyTableStart(verifier) && |
| 4122 | VerifyOffset(verifier, VT_NEW_SHAPE) && |
| 4123 | verifier.VerifyVector(new_shape()) && |
| 4124 | verifier.EndTable(); |
| 4125 | } |
| 4126 | }; |
| 4127 | |
| 4128 | struct ReshapeOptionsBuilder { |
| 4129 | typedef ReshapeOptions Table; |
| 4130 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4131 | flatbuffers::uoffset_t start_; |
| 4132 | void add_new_shape(flatbuffers::Offset<flatbuffers::Vector<int32_t>> new_shape) { |
| 4133 | fbb_.AddOffset(ReshapeOptions::VT_NEW_SHAPE, new_shape); |
| 4134 | } |
| 4135 | explicit ReshapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4136 | : fbb_(_fbb) { |
| 4137 | start_ = fbb_.StartTable(); |
| 4138 | } |
| 4139 | flatbuffers::Offset<ReshapeOptions> Finish() { |
| 4140 | const auto end = fbb_.EndTable(start_); |
| 4141 | auto o = flatbuffers::Offset<ReshapeOptions>(end); |
| 4142 | return o; |
| 4143 | } |
| 4144 | }; |
| 4145 | |
| 4146 | inline flatbuffers::Offset<ReshapeOptions> CreateReshapeOptions( |
| 4147 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4148 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> new_shape = 0) { |
| 4149 | ReshapeOptionsBuilder builder_(_fbb); |
| 4150 | builder_.add_new_shape(new_shape); |
| 4151 | return builder_.Finish(); |
| 4152 | } |
| 4153 | |
| 4154 | inline flatbuffers::Offset<ReshapeOptions> CreateReshapeOptionsDirect( |
| 4155 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4156 | const std::vector<int32_t> *new_shape = nullptr) { |
| 4157 | auto new_shape__ = new_shape ? _fbb.CreateVector<int32_t>(*new_shape) : 0; |
| 4158 | return tflite::CreateReshapeOptions( |
| 4159 | _fbb, |
| 4160 | new_shape__); |
| 4161 | } |
| 4162 | |
| 4163 | struct SpaceToBatchNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4164 | typedef SpaceToBatchNDOptionsBuilder Builder; |
| 4165 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4166 | return VerifyTableStart(verifier) && |
| 4167 | verifier.EndTable(); |
| 4168 | } |
| 4169 | }; |
| 4170 | |
| 4171 | struct SpaceToBatchNDOptionsBuilder { |
| 4172 | typedef SpaceToBatchNDOptions Table; |
| 4173 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4174 | flatbuffers::uoffset_t start_; |
| 4175 | explicit SpaceToBatchNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4176 | : fbb_(_fbb) { |
| 4177 | start_ = fbb_.StartTable(); |
| 4178 | } |
| 4179 | flatbuffers::Offset<SpaceToBatchNDOptions> Finish() { |
| 4180 | const auto end = fbb_.EndTable(start_); |
| 4181 | auto o = flatbuffers::Offset<SpaceToBatchNDOptions>(end); |
| 4182 | return o; |
| 4183 | } |
| 4184 | }; |
| 4185 | |
| 4186 | inline flatbuffers::Offset<SpaceToBatchNDOptions> CreateSpaceToBatchNDOptions( |
| 4187 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4188 | SpaceToBatchNDOptionsBuilder builder_(_fbb); |
| 4189 | return builder_.Finish(); |
| 4190 | } |
| 4191 | |
| 4192 | struct BatchToSpaceNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4193 | typedef BatchToSpaceNDOptionsBuilder Builder; |
| 4194 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4195 | return VerifyTableStart(verifier) && |
| 4196 | verifier.EndTable(); |
| 4197 | } |
| 4198 | }; |
| 4199 | |
| 4200 | struct BatchToSpaceNDOptionsBuilder { |
| 4201 | typedef BatchToSpaceNDOptions Table; |
| 4202 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4203 | flatbuffers::uoffset_t start_; |
| 4204 | explicit BatchToSpaceNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4205 | : fbb_(_fbb) { |
| 4206 | start_ = fbb_.StartTable(); |
| 4207 | } |
| 4208 | flatbuffers::Offset<BatchToSpaceNDOptions> Finish() { |
| 4209 | const auto end = fbb_.EndTable(start_); |
| 4210 | auto o = flatbuffers::Offset<BatchToSpaceNDOptions>(end); |
| 4211 | return o; |
| 4212 | } |
| 4213 | }; |
| 4214 | |
| 4215 | inline flatbuffers::Offset<BatchToSpaceNDOptions> CreateBatchToSpaceNDOptions( |
| 4216 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4217 | BatchToSpaceNDOptionsBuilder builder_(_fbb); |
| 4218 | return builder_.Finish(); |
| 4219 | } |
| 4220 | |
| 4221 | struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4222 | typedef SkipGramOptionsBuilder Builder; |
| 4223 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4224 | VT_NGRAM_SIZE = 4, |
| 4225 | VT_MAX_SKIP_SIZE = 6, |
| 4226 | VT_INCLUDE_ALL_NGRAMS = 8 |
| 4227 | }; |
| 4228 | int32_t ngram_size() const { |
| 4229 | return GetField<int32_t>(VT_NGRAM_SIZE, 0); |
| 4230 | } |
| 4231 | int32_t max_skip_size() const { |
| 4232 | return GetField<int32_t>(VT_MAX_SKIP_SIZE, 0); |
| 4233 | } |
| 4234 | bool include_all_ngrams() const { |
| 4235 | return GetField<uint8_t>(VT_INCLUDE_ALL_NGRAMS, 0) != 0; |
| 4236 | } |
| 4237 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4238 | return VerifyTableStart(verifier) && |
| 4239 | VerifyField<int32_t>(verifier, VT_NGRAM_SIZE) && |
| 4240 | VerifyField<int32_t>(verifier, VT_MAX_SKIP_SIZE) && |
| 4241 | VerifyField<uint8_t>(verifier, VT_INCLUDE_ALL_NGRAMS) && |
| 4242 | verifier.EndTable(); |
| 4243 | } |
| 4244 | }; |
| 4245 | |
| 4246 | struct SkipGramOptionsBuilder { |
| 4247 | typedef SkipGramOptions Table; |
| 4248 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4249 | flatbuffers::uoffset_t start_; |
| 4250 | void add_ngram_size(int32_t ngram_size) { |
| 4251 | fbb_.AddElement<int32_t>(SkipGramOptions::VT_NGRAM_SIZE, ngram_size, 0); |
| 4252 | } |
| 4253 | void add_max_skip_size(int32_t max_skip_size) { |
| 4254 | fbb_.AddElement<int32_t>(SkipGramOptions::VT_MAX_SKIP_SIZE, max_skip_size, 0); |
| 4255 | } |
| 4256 | void add_include_all_ngrams(bool include_all_ngrams) { |
| 4257 | fbb_.AddElement<uint8_t>(SkipGramOptions::VT_INCLUDE_ALL_NGRAMS, static_cast<uint8_t>(include_all_ngrams), 0); |
| 4258 | } |
| 4259 | explicit SkipGramOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4260 | : fbb_(_fbb) { |
| 4261 | start_ = fbb_.StartTable(); |
| 4262 | } |
| 4263 | flatbuffers::Offset<SkipGramOptions> Finish() { |
| 4264 | const auto end = fbb_.EndTable(start_); |
| 4265 | auto o = flatbuffers::Offset<SkipGramOptions>(end); |
| 4266 | return o; |
| 4267 | } |
| 4268 | }; |
| 4269 | |
| 4270 | inline flatbuffers::Offset<SkipGramOptions> CreateSkipGramOptions( |
| 4271 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4272 | int32_t ngram_size = 0, |
| 4273 | int32_t max_skip_size = 0, |
| 4274 | bool include_all_ngrams = false) { |
| 4275 | SkipGramOptionsBuilder builder_(_fbb); |
| 4276 | builder_.add_max_skip_size(max_skip_size); |
| 4277 | builder_.add_ngram_size(ngram_size); |
| 4278 | builder_.add_include_all_ngrams(include_all_ngrams); |
| 4279 | return builder_.Finish(); |
| 4280 | } |
| 4281 | |
| 4282 | struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4283 | typedef SpaceToDepthOptionsBuilder Builder; |
| 4284 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4285 | VT_BLOCK_SIZE = 4 |
| 4286 | }; |
| 4287 | int32_t block_size() const { |
| 4288 | return GetField<int32_t>(VT_BLOCK_SIZE, 0); |
| 4289 | } |
| 4290 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4291 | return VerifyTableStart(verifier) && |
| 4292 | VerifyField<int32_t>(verifier, VT_BLOCK_SIZE) && |
| 4293 | verifier.EndTable(); |
| 4294 | } |
| 4295 | }; |
| 4296 | |
| 4297 | struct SpaceToDepthOptionsBuilder { |
| 4298 | typedef SpaceToDepthOptions Table; |
| 4299 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4300 | flatbuffers::uoffset_t start_; |
| 4301 | void add_block_size(int32_t block_size) { |
| 4302 | fbb_.AddElement<int32_t>(SpaceToDepthOptions::VT_BLOCK_SIZE, block_size, 0); |
| 4303 | } |
| 4304 | explicit SpaceToDepthOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4305 | : fbb_(_fbb) { |
| 4306 | start_ = fbb_.StartTable(); |
| 4307 | } |
| 4308 | flatbuffers::Offset<SpaceToDepthOptions> Finish() { |
| 4309 | const auto end = fbb_.EndTable(start_); |
| 4310 | auto o = flatbuffers::Offset<SpaceToDepthOptions>(end); |
| 4311 | return o; |
| 4312 | } |
| 4313 | }; |
| 4314 | |
| 4315 | inline flatbuffers::Offset<SpaceToDepthOptions> CreateSpaceToDepthOptions( |
| 4316 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4317 | int32_t block_size = 0) { |
| 4318 | SpaceToDepthOptionsBuilder builder_(_fbb); |
| 4319 | builder_.add_block_size(block_size); |
| 4320 | return builder_.Finish(); |
| 4321 | } |
| 4322 | |
| 4323 | struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4324 | typedef DepthToSpaceOptionsBuilder Builder; |
| 4325 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4326 | VT_BLOCK_SIZE = 4 |
| 4327 | }; |
| 4328 | int32_t block_size() const { |
| 4329 | return GetField<int32_t>(VT_BLOCK_SIZE, 0); |
| 4330 | } |
| 4331 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4332 | return VerifyTableStart(verifier) && |
| 4333 | VerifyField<int32_t>(verifier, VT_BLOCK_SIZE) && |
| 4334 | verifier.EndTable(); |
| 4335 | } |
| 4336 | }; |
| 4337 | |
| 4338 | struct DepthToSpaceOptionsBuilder { |
| 4339 | typedef DepthToSpaceOptions Table; |
| 4340 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4341 | flatbuffers::uoffset_t start_; |
| 4342 | void add_block_size(int32_t block_size) { |
| 4343 | fbb_.AddElement<int32_t>(DepthToSpaceOptions::VT_BLOCK_SIZE, block_size, 0); |
| 4344 | } |
| 4345 | explicit DepthToSpaceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4346 | : fbb_(_fbb) { |
| 4347 | start_ = fbb_.StartTable(); |
| 4348 | } |
| 4349 | flatbuffers::Offset<DepthToSpaceOptions> Finish() { |
| 4350 | const auto end = fbb_.EndTable(start_); |
| 4351 | auto o = flatbuffers::Offset<DepthToSpaceOptions>(end); |
| 4352 | return o; |
| 4353 | } |
| 4354 | }; |
| 4355 | |
| 4356 | inline flatbuffers::Offset<DepthToSpaceOptions> CreateDepthToSpaceOptions( |
| 4357 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4358 | int32_t block_size = 0) { |
| 4359 | DepthToSpaceOptionsBuilder builder_(_fbb); |
| 4360 | builder_.add_block_size(block_size); |
| 4361 | return builder_.Finish(); |
| 4362 | } |
| 4363 | |
| 4364 | struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4365 | typedef SubOptionsBuilder Builder; |
| 4366 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4367 | VT_FUSED_ACTIVATION_FUNCTION = 4, |
| 4368 | VT_POT_SCALE_INT16 = 6 |
| 4369 | }; |
| 4370 | tflite::ActivationFunctionType fused_activation_function() const { |
| 4371 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 4372 | } |
| 4373 | bool pot_scale_int16() const { |
| 4374 | return GetField<uint8_t>(VT_POT_SCALE_INT16, 1) != 0; |
| 4375 | } |
| 4376 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4377 | return VerifyTableStart(verifier) && |
| 4378 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 4379 | VerifyField<uint8_t>(verifier, VT_POT_SCALE_INT16) && |
| 4380 | verifier.EndTable(); |
| 4381 | } |
| 4382 | }; |
| 4383 | |
| 4384 | struct SubOptionsBuilder { |
| 4385 | typedef SubOptions Table; |
| 4386 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4387 | flatbuffers::uoffset_t start_; |
| 4388 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 4389 | fbb_.AddElement<int8_t>(SubOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 4390 | } |
| 4391 | void add_pot_scale_int16(bool pot_scale_int16) { |
| 4392 | fbb_.AddElement<uint8_t>(SubOptions::VT_POT_SCALE_INT16, static_cast<uint8_t>(pot_scale_int16), 1); |
| 4393 | } |
| 4394 | explicit SubOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4395 | : fbb_(_fbb) { |
| 4396 | start_ = fbb_.StartTable(); |
| 4397 | } |
| 4398 | flatbuffers::Offset<SubOptions> Finish() { |
| 4399 | const auto end = fbb_.EndTable(start_); |
| 4400 | auto o = flatbuffers::Offset<SubOptions>(end); |
| 4401 | return o; |
| 4402 | } |
| 4403 | }; |
| 4404 | |
| 4405 | inline flatbuffers::Offset<SubOptions> CreateSubOptions( |
| 4406 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4407 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE, |
| 4408 | bool pot_scale_int16 = true) { |
| 4409 | SubOptionsBuilder builder_(_fbb); |
| 4410 | builder_.add_pot_scale_int16(pot_scale_int16); |
| 4411 | builder_.add_fused_activation_function(fused_activation_function); |
| 4412 | return builder_.Finish(); |
| 4413 | } |
| 4414 | |
| 4415 | struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4416 | typedef DivOptionsBuilder Builder; |
| 4417 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4418 | VT_FUSED_ACTIVATION_FUNCTION = 4 |
| 4419 | }; |
| 4420 | tflite::ActivationFunctionType fused_activation_function() const { |
| 4421 | return static_cast<tflite::ActivationFunctionType>(GetField<int8_t>(VT_FUSED_ACTIVATION_FUNCTION, 0)); |
| 4422 | } |
| 4423 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4424 | return VerifyTableStart(verifier) && |
| 4425 | VerifyField<int8_t>(verifier, VT_FUSED_ACTIVATION_FUNCTION) && |
| 4426 | verifier.EndTable(); |
| 4427 | } |
| 4428 | }; |
| 4429 | |
| 4430 | struct DivOptionsBuilder { |
| 4431 | typedef DivOptions Table; |
| 4432 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4433 | flatbuffers::uoffset_t start_; |
| 4434 | void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { |
| 4435 | fbb_.AddElement<int8_t>(DivOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast<int8_t>(fused_activation_function), 0); |
| 4436 | } |
| 4437 | explicit DivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4438 | : fbb_(_fbb) { |
| 4439 | start_ = fbb_.StartTable(); |
| 4440 | } |
| 4441 | flatbuffers::Offset<DivOptions> Finish() { |
| 4442 | const auto end = fbb_.EndTable(start_); |
| 4443 | auto o = flatbuffers::Offset<DivOptions>(end); |
| 4444 | return o; |
| 4445 | } |
| 4446 | }; |
| 4447 | |
| 4448 | inline flatbuffers::Offset<DivOptions> CreateDivOptions( |
| 4449 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4450 | tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE) { |
| 4451 | DivOptionsBuilder builder_(_fbb); |
| 4452 | builder_.add_fused_activation_function(fused_activation_function); |
| 4453 | return builder_.Finish(); |
| 4454 | } |
| 4455 | |
| 4456 | struct TopKV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4457 | typedef TopKV2OptionsBuilder Builder; |
| 4458 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4459 | return VerifyTableStart(verifier) && |
| 4460 | verifier.EndTable(); |
| 4461 | } |
| 4462 | }; |
| 4463 | |
| 4464 | struct TopKV2OptionsBuilder { |
| 4465 | typedef TopKV2Options Table; |
| 4466 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4467 | flatbuffers::uoffset_t start_; |
| 4468 | explicit TopKV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4469 | : fbb_(_fbb) { |
| 4470 | start_ = fbb_.StartTable(); |
| 4471 | } |
| 4472 | flatbuffers::Offset<TopKV2Options> Finish() { |
| 4473 | const auto end = fbb_.EndTable(start_); |
| 4474 | auto o = flatbuffers::Offset<TopKV2Options>(end); |
| 4475 | return o; |
| 4476 | } |
| 4477 | }; |
| 4478 | |
| 4479 | inline flatbuffers::Offset<TopKV2Options> CreateTopKV2Options( |
| 4480 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4481 | TopKV2OptionsBuilder builder_(_fbb); |
| 4482 | return builder_.Finish(); |
| 4483 | } |
| 4484 | |
| 4485 | struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4486 | typedef EmbeddingLookupSparseOptionsBuilder Builder; |
| 4487 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4488 | VT_COMBINER = 4 |
| 4489 | }; |
| 4490 | tflite::CombinerType combiner() const { |
| 4491 | return static_cast<tflite::CombinerType>(GetField<int8_t>(VT_COMBINER, 0)); |
| 4492 | } |
| 4493 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4494 | return VerifyTableStart(verifier) && |
| 4495 | VerifyField<int8_t>(verifier, VT_COMBINER) && |
| 4496 | verifier.EndTable(); |
| 4497 | } |
| 4498 | }; |
| 4499 | |
| 4500 | struct EmbeddingLookupSparseOptionsBuilder { |
| 4501 | typedef EmbeddingLookupSparseOptions Table; |
| 4502 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4503 | flatbuffers::uoffset_t start_; |
| 4504 | void add_combiner(tflite::CombinerType combiner) { |
| 4505 | fbb_.AddElement<int8_t>(EmbeddingLookupSparseOptions::VT_COMBINER, static_cast<int8_t>(combiner), 0); |
| 4506 | } |
| 4507 | explicit EmbeddingLookupSparseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4508 | : fbb_(_fbb) { |
| 4509 | start_ = fbb_.StartTable(); |
| 4510 | } |
| 4511 | flatbuffers::Offset<EmbeddingLookupSparseOptions> Finish() { |
| 4512 | const auto end = fbb_.EndTable(start_); |
| 4513 | auto o = flatbuffers::Offset<EmbeddingLookupSparseOptions>(end); |
| 4514 | return o; |
| 4515 | } |
| 4516 | }; |
| 4517 | |
| 4518 | inline flatbuffers::Offset<EmbeddingLookupSparseOptions> CreateEmbeddingLookupSparseOptions( |
| 4519 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4520 | tflite::CombinerType combiner = tflite::CombinerType_SUM) { |
| 4521 | EmbeddingLookupSparseOptionsBuilder builder_(_fbb); |
| 4522 | builder_.add_combiner(combiner); |
| 4523 | return builder_.Finish(); |
| 4524 | } |
| 4525 | |
| 4526 | struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4527 | typedef GatherOptionsBuilder Builder; |
| 4528 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4529 | VT_AXIS = 4 |
| 4530 | }; |
| 4531 | int32_t axis() const { |
| 4532 | return GetField<int32_t>(VT_AXIS, 0); |
| 4533 | } |
| 4534 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4535 | return VerifyTableStart(verifier) && |
| 4536 | VerifyField<int32_t>(verifier, VT_AXIS) && |
| 4537 | verifier.EndTable(); |
| 4538 | } |
| 4539 | }; |
| 4540 | |
| 4541 | struct GatherOptionsBuilder { |
| 4542 | typedef GatherOptions Table; |
| 4543 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4544 | flatbuffers::uoffset_t start_; |
| 4545 | void add_axis(int32_t axis) { |
| 4546 | fbb_.AddElement<int32_t>(GatherOptions::VT_AXIS, axis, 0); |
| 4547 | } |
| 4548 | explicit GatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4549 | : fbb_(_fbb) { |
| 4550 | start_ = fbb_.StartTable(); |
| 4551 | } |
| 4552 | flatbuffers::Offset<GatherOptions> Finish() { |
| 4553 | const auto end = fbb_.EndTable(start_); |
| 4554 | auto o = flatbuffers::Offset<GatherOptions>(end); |
| 4555 | return o; |
| 4556 | } |
| 4557 | }; |
| 4558 | |
| 4559 | inline flatbuffers::Offset<GatherOptions> CreateGatherOptions( |
| 4560 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4561 | int32_t axis = 0) { |
| 4562 | GatherOptionsBuilder builder_(_fbb); |
| 4563 | builder_.add_axis(axis); |
| 4564 | return builder_.Finish(); |
| 4565 | } |
| 4566 | |
| 4567 | struct TransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4568 | typedef TransposeOptionsBuilder Builder; |
| 4569 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4570 | return VerifyTableStart(verifier) && |
| 4571 | verifier.EndTable(); |
| 4572 | } |
| 4573 | }; |
| 4574 | |
| 4575 | struct TransposeOptionsBuilder { |
| 4576 | typedef TransposeOptions Table; |
| 4577 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4578 | flatbuffers::uoffset_t start_; |
| 4579 | explicit TransposeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4580 | : fbb_(_fbb) { |
| 4581 | start_ = fbb_.StartTable(); |
| 4582 | } |
| 4583 | flatbuffers::Offset<TransposeOptions> Finish() { |
| 4584 | const auto end = fbb_.EndTable(start_); |
| 4585 | auto o = flatbuffers::Offset<TransposeOptions>(end); |
| 4586 | return o; |
| 4587 | } |
| 4588 | }; |
| 4589 | |
| 4590 | inline flatbuffers::Offset<TransposeOptions> CreateTransposeOptions( |
| 4591 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4592 | TransposeOptionsBuilder builder_(_fbb); |
| 4593 | return builder_.Finish(); |
| 4594 | } |
| 4595 | |
| 4596 | struct ExpOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4597 | typedef ExpOptionsBuilder Builder; |
| 4598 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4599 | return VerifyTableStart(verifier) && |
| 4600 | verifier.EndTable(); |
| 4601 | } |
| 4602 | }; |
| 4603 | |
| 4604 | struct ExpOptionsBuilder { |
| 4605 | typedef ExpOptions Table; |
| 4606 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4607 | flatbuffers::uoffset_t start_; |
| 4608 | explicit ExpOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4609 | : fbb_(_fbb) { |
| 4610 | start_ = fbb_.StartTable(); |
| 4611 | } |
| 4612 | flatbuffers::Offset<ExpOptions> Finish() { |
| 4613 | const auto end = fbb_.EndTable(start_); |
| 4614 | auto o = flatbuffers::Offset<ExpOptions>(end); |
| 4615 | return o; |
| 4616 | } |
| 4617 | }; |
| 4618 | |
| 4619 | inline flatbuffers::Offset<ExpOptions> CreateExpOptions( |
| 4620 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4621 | ExpOptionsBuilder builder_(_fbb); |
| 4622 | return builder_.Finish(); |
| 4623 | } |
| 4624 | |
| 4625 | struct CosOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4626 | typedef CosOptionsBuilder Builder; |
| 4627 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4628 | return VerifyTableStart(verifier) && |
| 4629 | verifier.EndTable(); |
| 4630 | } |
| 4631 | }; |
| 4632 | |
| 4633 | struct CosOptionsBuilder { |
| 4634 | typedef CosOptions Table; |
| 4635 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4636 | flatbuffers::uoffset_t start_; |
| 4637 | explicit CosOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4638 | : fbb_(_fbb) { |
| 4639 | start_ = fbb_.StartTable(); |
| 4640 | } |
| 4641 | flatbuffers::Offset<CosOptions> Finish() { |
| 4642 | const auto end = fbb_.EndTable(start_); |
| 4643 | auto o = flatbuffers::Offset<CosOptions>(end); |
| 4644 | return o; |
| 4645 | } |
| 4646 | }; |
| 4647 | |
| 4648 | inline flatbuffers::Offset<CosOptions> CreateCosOptions( |
| 4649 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4650 | CosOptionsBuilder builder_(_fbb); |
| 4651 | return builder_.Finish(); |
| 4652 | } |
| 4653 | |
| 4654 | struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4655 | typedef ReducerOptionsBuilder Builder; |
| 4656 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4657 | VT_KEEP_DIMS = 4 |
| 4658 | }; |
| 4659 | bool keep_dims() const { |
| 4660 | return GetField<uint8_t>(VT_KEEP_DIMS, 0) != 0; |
| 4661 | } |
| 4662 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4663 | return VerifyTableStart(verifier) && |
| 4664 | VerifyField<uint8_t>(verifier, VT_KEEP_DIMS) && |
| 4665 | verifier.EndTable(); |
| 4666 | } |
| 4667 | }; |
| 4668 | |
| 4669 | struct ReducerOptionsBuilder { |
| 4670 | typedef ReducerOptions Table; |
| 4671 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4672 | flatbuffers::uoffset_t start_; |
| 4673 | void add_keep_dims(bool keep_dims) { |
| 4674 | fbb_.AddElement<uint8_t>(ReducerOptions::VT_KEEP_DIMS, static_cast<uint8_t>(keep_dims), 0); |
| 4675 | } |
| 4676 | explicit ReducerOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4677 | : fbb_(_fbb) { |
| 4678 | start_ = fbb_.StartTable(); |
| 4679 | } |
| 4680 | flatbuffers::Offset<ReducerOptions> Finish() { |
| 4681 | const auto end = fbb_.EndTable(start_); |
| 4682 | auto o = flatbuffers::Offset<ReducerOptions>(end); |
| 4683 | return o; |
| 4684 | } |
| 4685 | }; |
| 4686 | |
| 4687 | inline flatbuffers::Offset<ReducerOptions> CreateReducerOptions( |
| 4688 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4689 | bool keep_dims = false) { |
| 4690 | ReducerOptionsBuilder builder_(_fbb); |
| 4691 | builder_.add_keep_dims(keep_dims); |
| 4692 | return builder_.Finish(); |
| 4693 | } |
| 4694 | |
| 4695 | struct SqueezeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4696 | typedef SqueezeOptionsBuilder Builder; |
| 4697 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4698 | VT_SQUEEZE_DIMS = 4 |
| 4699 | }; |
| 4700 | const flatbuffers::Vector<int32_t> *squeeze_dims() const { |
| 4701 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_SQUEEZE_DIMS); |
| 4702 | } |
| 4703 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4704 | return VerifyTableStart(verifier) && |
| 4705 | VerifyOffset(verifier, VT_SQUEEZE_DIMS) && |
| 4706 | verifier.VerifyVector(squeeze_dims()) && |
| 4707 | verifier.EndTable(); |
| 4708 | } |
| 4709 | }; |
| 4710 | |
| 4711 | struct SqueezeOptionsBuilder { |
| 4712 | typedef SqueezeOptions Table; |
| 4713 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4714 | flatbuffers::uoffset_t start_; |
| 4715 | void add_squeeze_dims(flatbuffers::Offset<flatbuffers::Vector<int32_t>> squeeze_dims) { |
| 4716 | fbb_.AddOffset(SqueezeOptions::VT_SQUEEZE_DIMS, squeeze_dims); |
| 4717 | } |
| 4718 | explicit SqueezeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4719 | : fbb_(_fbb) { |
| 4720 | start_ = fbb_.StartTable(); |
| 4721 | } |
| 4722 | flatbuffers::Offset<SqueezeOptions> Finish() { |
| 4723 | const auto end = fbb_.EndTable(start_); |
| 4724 | auto o = flatbuffers::Offset<SqueezeOptions>(end); |
| 4725 | return o; |
| 4726 | } |
| 4727 | }; |
| 4728 | |
| 4729 | inline flatbuffers::Offset<SqueezeOptions> CreateSqueezeOptions( |
| 4730 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4731 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> squeeze_dims = 0) { |
| 4732 | SqueezeOptionsBuilder builder_(_fbb); |
| 4733 | builder_.add_squeeze_dims(squeeze_dims); |
| 4734 | return builder_.Finish(); |
| 4735 | } |
| 4736 | |
| 4737 | inline flatbuffers::Offset<SqueezeOptions> CreateSqueezeOptionsDirect( |
| 4738 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4739 | const std::vector<int32_t> *squeeze_dims = nullptr) { |
| 4740 | auto squeeze_dims__ = squeeze_dims ? _fbb.CreateVector<int32_t>(*squeeze_dims) : 0; |
| 4741 | return tflite::CreateSqueezeOptions( |
| 4742 | _fbb, |
| 4743 | squeeze_dims__); |
| 4744 | } |
| 4745 | |
| 4746 | struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4747 | typedef SplitOptionsBuilder Builder; |
| 4748 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4749 | VT_NUM_SPLITS = 4 |
| 4750 | }; |
| 4751 | int32_t num_splits() const { |
| 4752 | return GetField<int32_t>(VT_NUM_SPLITS, 0); |
| 4753 | } |
| 4754 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4755 | return VerifyTableStart(verifier) && |
| 4756 | VerifyField<int32_t>(verifier, VT_NUM_SPLITS) && |
| 4757 | verifier.EndTable(); |
| 4758 | } |
| 4759 | }; |
| 4760 | |
| 4761 | struct SplitOptionsBuilder { |
| 4762 | typedef SplitOptions Table; |
| 4763 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4764 | flatbuffers::uoffset_t start_; |
| 4765 | void add_num_splits(int32_t num_splits) { |
| 4766 | fbb_.AddElement<int32_t>(SplitOptions::VT_NUM_SPLITS, num_splits, 0); |
| 4767 | } |
| 4768 | explicit SplitOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4769 | : fbb_(_fbb) { |
| 4770 | start_ = fbb_.StartTable(); |
| 4771 | } |
| 4772 | flatbuffers::Offset<SplitOptions> Finish() { |
| 4773 | const auto end = fbb_.EndTable(start_); |
| 4774 | auto o = flatbuffers::Offset<SplitOptions>(end); |
| 4775 | return o; |
| 4776 | } |
| 4777 | }; |
| 4778 | |
| 4779 | inline flatbuffers::Offset<SplitOptions> CreateSplitOptions( |
| 4780 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4781 | int32_t num_splits = 0) { |
| 4782 | SplitOptionsBuilder builder_(_fbb); |
| 4783 | builder_.add_num_splits(num_splits); |
| 4784 | return builder_.Finish(); |
| 4785 | } |
| 4786 | |
| 4787 | struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4788 | typedef SplitVOptionsBuilder Builder; |
| 4789 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4790 | VT_NUM_SPLITS = 4 |
| 4791 | }; |
| 4792 | int32_t num_splits() const { |
| 4793 | return GetField<int32_t>(VT_NUM_SPLITS, 0); |
| 4794 | } |
| 4795 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4796 | return VerifyTableStart(verifier) && |
| 4797 | VerifyField<int32_t>(verifier, VT_NUM_SPLITS) && |
| 4798 | verifier.EndTable(); |
| 4799 | } |
| 4800 | }; |
| 4801 | |
| 4802 | struct SplitVOptionsBuilder { |
| 4803 | typedef SplitVOptions Table; |
| 4804 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4805 | flatbuffers::uoffset_t start_; |
| 4806 | void add_num_splits(int32_t num_splits) { |
| 4807 | fbb_.AddElement<int32_t>(SplitVOptions::VT_NUM_SPLITS, num_splits, 0); |
| 4808 | } |
| 4809 | explicit SplitVOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4810 | : fbb_(_fbb) { |
| 4811 | start_ = fbb_.StartTable(); |
| 4812 | } |
| 4813 | flatbuffers::Offset<SplitVOptions> Finish() { |
| 4814 | const auto end = fbb_.EndTable(start_); |
| 4815 | auto o = flatbuffers::Offset<SplitVOptions>(end); |
| 4816 | return o; |
| 4817 | } |
| 4818 | }; |
| 4819 | |
| 4820 | inline flatbuffers::Offset<SplitVOptions> CreateSplitVOptions( |
| 4821 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4822 | int32_t num_splits = 0) { |
| 4823 | SplitVOptionsBuilder builder_(_fbb); |
| 4824 | builder_.add_num_splits(num_splits); |
| 4825 | return builder_.Finish(); |
| 4826 | } |
| 4827 | |
| 4828 | struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4829 | typedef StridedSliceOptionsBuilder Builder; |
| 4830 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4831 | VT_BEGIN_MASK = 4, |
| 4832 | VT_END_MASK = 6, |
| 4833 | VT_ELLIPSIS_MASK = 8, |
| 4834 | VT_NEW_AXIS_MASK = 10, |
| 4835 | VT_SHRINK_AXIS_MASK = 12 |
| 4836 | }; |
| 4837 | int32_t begin_mask() const { |
| 4838 | return GetField<int32_t>(VT_BEGIN_MASK, 0); |
| 4839 | } |
| 4840 | int32_t end_mask() const { |
| 4841 | return GetField<int32_t>(VT_END_MASK, 0); |
| 4842 | } |
| 4843 | int32_t ellipsis_mask() const { |
| 4844 | return GetField<int32_t>(VT_ELLIPSIS_MASK, 0); |
| 4845 | } |
| 4846 | int32_t new_axis_mask() const { |
| 4847 | return GetField<int32_t>(VT_NEW_AXIS_MASK, 0); |
| 4848 | } |
| 4849 | int32_t shrink_axis_mask() const { |
| 4850 | return GetField<int32_t>(VT_SHRINK_AXIS_MASK, 0); |
| 4851 | } |
| 4852 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4853 | return VerifyTableStart(verifier) && |
| 4854 | VerifyField<int32_t>(verifier, VT_BEGIN_MASK) && |
| 4855 | VerifyField<int32_t>(verifier, VT_END_MASK) && |
| 4856 | VerifyField<int32_t>(verifier, VT_ELLIPSIS_MASK) && |
| 4857 | VerifyField<int32_t>(verifier, VT_NEW_AXIS_MASK) && |
| 4858 | VerifyField<int32_t>(verifier, VT_SHRINK_AXIS_MASK) && |
| 4859 | verifier.EndTable(); |
| 4860 | } |
| 4861 | }; |
| 4862 | |
| 4863 | struct StridedSliceOptionsBuilder { |
| 4864 | typedef StridedSliceOptions Table; |
| 4865 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4866 | flatbuffers::uoffset_t start_; |
| 4867 | void add_begin_mask(int32_t begin_mask) { |
| 4868 | fbb_.AddElement<int32_t>(StridedSliceOptions::VT_BEGIN_MASK, begin_mask, 0); |
| 4869 | } |
| 4870 | void add_end_mask(int32_t end_mask) { |
| 4871 | fbb_.AddElement<int32_t>(StridedSliceOptions::VT_END_MASK, end_mask, 0); |
| 4872 | } |
| 4873 | void add_ellipsis_mask(int32_t ellipsis_mask) { |
| 4874 | fbb_.AddElement<int32_t>(StridedSliceOptions::VT_ELLIPSIS_MASK, ellipsis_mask, 0); |
| 4875 | } |
| 4876 | void add_new_axis_mask(int32_t new_axis_mask) { |
| 4877 | fbb_.AddElement<int32_t>(StridedSliceOptions::VT_NEW_AXIS_MASK, new_axis_mask, 0); |
| 4878 | } |
| 4879 | void add_shrink_axis_mask(int32_t shrink_axis_mask) { |
| 4880 | fbb_.AddElement<int32_t>(StridedSliceOptions::VT_SHRINK_AXIS_MASK, shrink_axis_mask, 0); |
| 4881 | } |
| 4882 | explicit StridedSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4883 | : fbb_(_fbb) { |
| 4884 | start_ = fbb_.StartTable(); |
| 4885 | } |
| 4886 | flatbuffers::Offset<StridedSliceOptions> Finish() { |
| 4887 | const auto end = fbb_.EndTable(start_); |
| 4888 | auto o = flatbuffers::Offset<StridedSliceOptions>(end); |
| 4889 | return o; |
| 4890 | } |
| 4891 | }; |
| 4892 | |
| 4893 | inline flatbuffers::Offset<StridedSliceOptions> CreateStridedSliceOptions( |
| 4894 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4895 | int32_t begin_mask = 0, |
| 4896 | int32_t end_mask = 0, |
| 4897 | int32_t ellipsis_mask = 0, |
| 4898 | int32_t new_axis_mask = 0, |
| 4899 | int32_t shrink_axis_mask = 0) { |
| 4900 | StridedSliceOptionsBuilder builder_(_fbb); |
| 4901 | builder_.add_shrink_axis_mask(shrink_axis_mask); |
| 4902 | builder_.add_new_axis_mask(new_axis_mask); |
| 4903 | builder_.add_ellipsis_mask(ellipsis_mask); |
| 4904 | builder_.add_end_mask(end_mask); |
| 4905 | builder_.add_begin_mask(begin_mask); |
| 4906 | return builder_.Finish(); |
| 4907 | } |
| 4908 | |
| 4909 | struct LogSoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4910 | typedef LogSoftmaxOptionsBuilder Builder; |
| 4911 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4912 | return VerifyTableStart(verifier) && |
| 4913 | verifier.EndTable(); |
| 4914 | } |
| 4915 | }; |
| 4916 | |
| 4917 | struct LogSoftmaxOptionsBuilder { |
| 4918 | typedef LogSoftmaxOptions Table; |
| 4919 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4920 | flatbuffers::uoffset_t start_; |
| 4921 | explicit LogSoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4922 | : fbb_(_fbb) { |
| 4923 | start_ = fbb_.StartTable(); |
| 4924 | } |
| 4925 | flatbuffers::Offset<LogSoftmaxOptions> Finish() { |
| 4926 | const auto end = fbb_.EndTable(start_); |
| 4927 | auto o = flatbuffers::Offset<LogSoftmaxOptions>(end); |
| 4928 | return o; |
| 4929 | } |
| 4930 | }; |
| 4931 | |
| 4932 | inline flatbuffers::Offset<LogSoftmaxOptions> CreateLogSoftmaxOptions( |
| 4933 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 4934 | LogSoftmaxOptionsBuilder builder_(_fbb); |
| 4935 | return builder_.Finish(); |
| 4936 | } |
| 4937 | |
| 4938 | struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4939 | typedef CastOptionsBuilder Builder; |
| 4940 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 4941 | VT_IN_DATA_TYPE = 4, |
| 4942 | VT_OUT_DATA_TYPE = 6 |
| 4943 | }; |
| 4944 | tflite::TensorType in_data_type() const { |
| 4945 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_IN_DATA_TYPE, 0)); |
| 4946 | } |
| 4947 | tflite::TensorType out_data_type() const { |
| 4948 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_OUT_DATA_TYPE, 0)); |
| 4949 | } |
| 4950 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4951 | return VerifyTableStart(verifier) && |
| 4952 | VerifyField<int8_t>(verifier, VT_IN_DATA_TYPE) && |
| 4953 | VerifyField<int8_t>(verifier, VT_OUT_DATA_TYPE) && |
| 4954 | verifier.EndTable(); |
| 4955 | } |
| 4956 | }; |
| 4957 | |
| 4958 | struct CastOptionsBuilder { |
| 4959 | typedef CastOptions Table; |
| 4960 | flatbuffers::FlatBufferBuilder &fbb_; |
| 4961 | flatbuffers::uoffset_t start_; |
| 4962 | void add_in_data_type(tflite::TensorType in_data_type) { |
| 4963 | fbb_.AddElement<int8_t>(CastOptions::VT_IN_DATA_TYPE, static_cast<int8_t>(in_data_type), 0); |
| 4964 | } |
| 4965 | void add_out_data_type(tflite::TensorType out_data_type) { |
| 4966 | fbb_.AddElement<int8_t>(CastOptions::VT_OUT_DATA_TYPE, static_cast<int8_t>(out_data_type), 0); |
| 4967 | } |
| 4968 | explicit CastOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 4969 | : fbb_(_fbb) { |
| 4970 | start_ = fbb_.StartTable(); |
| 4971 | } |
| 4972 | flatbuffers::Offset<CastOptions> Finish() { |
| 4973 | const auto end = fbb_.EndTable(start_); |
| 4974 | auto o = flatbuffers::Offset<CastOptions>(end); |
| 4975 | return o; |
| 4976 | } |
| 4977 | }; |
| 4978 | |
| 4979 | inline flatbuffers::Offset<CastOptions> CreateCastOptions( |
| 4980 | flatbuffers::FlatBufferBuilder &_fbb, |
| 4981 | tflite::TensorType in_data_type = tflite::TensorType_FLOAT32, |
| 4982 | tflite::TensorType out_data_type = tflite::TensorType_FLOAT32) { |
| 4983 | CastOptionsBuilder builder_(_fbb); |
| 4984 | builder_.add_out_data_type(out_data_type); |
| 4985 | builder_.add_in_data_type(in_data_type); |
| 4986 | return builder_.Finish(); |
| 4987 | } |
| 4988 | |
| 4989 | struct DequantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 4990 | typedef DequantizeOptionsBuilder Builder; |
| 4991 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 4992 | return VerifyTableStart(verifier) && |
| 4993 | verifier.EndTable(); |
| 4994 | } |
| 4995 | }; |
| 4996 | |
| 4997 | struct DequantizeOptionsBuilder { |
| 4998 | typedef DequantizeOptions Table; |
| 4999 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5000 | flatbuffers::uoffset_t start_; |
| 5001 | explicit DequantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5002 | : fbb_(_fbb) { |
| 5003 | start_ = fbb_.StartTable(); |
| 5004 | } |
| 5005 | flatbuffers::Offset<DequantizeOptions> Finish() { |
| 5006 | const auto end = fbb_.EndTable(start_); |
| 5007 | auto o = flatbuffers::Offset<DequantizeOptions>(end); |
| 5008 | return o; |
| 5009 | } |
| 5010 | }; |
| 5011 | |
| 5012 | inline flatbuffers::Offset<DequantizeOptions> CreateDequantizeOptions( |
| 5013 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5014 | DequantizeOptionsBuilder builder_(_fbb); |
| 5015 | return builder_.Finish(); |
| 5016 | } |
| 5017 | |
| 5018 | struct MaximumMinimumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5019 | typedef MaximumMinimumOptionsBuilder Builder; |
| 5020 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5021 | return VerifyTableStart(verifier) && |
| 5022 | verifier.EndTable(); |
| 5023 | } |
| 5024 | }; |
| 5025 | |
| 5026 | struct MaximumMinimumOptionsBuilder { |
| 5027 | typedef MaximumMinimumOptions Table; |
| 5028 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5029 | flatbuffers::uoffset_t start_; |
| 5030 | explicit MaximumMinimumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5031 | : fbb_(_fbb) { |
| 5032 | start_ = fbb_.StartTable(); |
| 5033 | } |
| 5034 | flatbuffers::Offset<MaximumMinimumOptions> Finish() { |
| 5035 | const auto end = fbb_.EndTable(start_); |
| 5036 | auto o = flatbuffers::Offset<MaximumMinimumOptions>(end); |
| 5037 | return o; |
| 5038 | } |
| 5039 | }; |
| 5040 | |
| 5041 | inline flatbuffers::Offset<MaximumMinimumOptions> CreateMaximumMinimumOptions( |
| 5042 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5043 | MaximumMinimumOptionsBuilder builder_(_fbb); |
| 5044 | return builder_.Finish(); |
| 5045 | } |
| 5046 | |
| 5047 | struct TileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5048 | typedef TileOptionsBuilder Builder; |
| 5049 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5050 | return VerifyTableStart(verifier) && |
| 5051 | verifier.EndTable(); |
| 5052 | } |
| 5053 | }; |
| 5054 | |
| 5055 | struct TileOptionsBuilder { |
| 5056 | typedef TileOptions Table; |
| 5057 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5058 | flatbuffers::uoffset_t start_; |
| 5059 | explicit TileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5060 | : fbb_(_fbb) { |
| 5061 | start_ = fbb_.StartTable(); |
| 5062 | } |
| 5063 | flatbuffers::Offset<TileOptions> Finish() { |
| 5064 | const auto end = fbb_.EndTable(start_); |
| 5065 | auto o = flatbuffers::Offset<TileOptions>(end); |
| 5066 | return o; |
| 5067 | } |
| 5068 | }; |
| 5069 | |
| 5070 | inline flatbuffers::Offset<TileOptions> CreateTileOptions( |
| 5071 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5072 | TileOptionsBuilder builder_(_fbb); |
| 5073 | return builder_.Finish(); |
| 5074 | } |
| 5075 | |
| 5076 | struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5077 | typedef ArgMaxOptionsBuilder Builder; |
| 5078 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5079 | VT_OUTPUT_TYPE = 4 |
| 5080 | }; |
| 5081 | tflite::TensorType output_type() const { |
| 5082 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_OUTPUT_TYPE, 0)); |
| 5083 | } |
| 5084 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5085 | return VerifyTableStart(verifier) && |
| 5086 | VerifyField<int8_t>(verifier, VT_OUTPUT_TYPE) && |
| 5087 | verifier.EndTable(); |
| 5088 | } |
| 5089 | }; |
| 5090 | |
| 5091 | struct ArgMaxOptionsBuilder { |
| 5092 | typedef ArgMaxOptions Table; |
| 5093 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5094 | flatbuffers::uoffset_t start_; |
| 5095 | void add_output_type(tflite::TensorType output_type) { |
| 5096 | fbb_.AddElement<int8_t>(ArgMaxOptions::VT_OUTPUT_TYPE, static_cast<int8_t>(output_type), 0); |
| 5097 | } |
| 5098 | explicit ArgMaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5099 | : fbb_(_fbb) { |
| 5100 | start_ = fbb_.StartTable(); |
| 5101 | } |
| 5102 | flatbuffers::Offset<ArgMaxOptions> Finish() { |
| 5103 | const auto end = fbb_.EndTable(start_); |
| 5104 | auto o = flatbuffers::Offset<ArgMaxOptions>(end); |
| 5105 | return o; |
| 5106 | } |
| 5107 | }; |
| 5108 | |
| 5109 | inline flatbuffers::Offset<ArgMaxOptions> CreateArgMaxOptions( |
| 5110 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5111 | tflite::TensorType output_type = tflite::TensorType_FLOAT32) { |
| 5112 | ArgMaxOptionsBuilder builder_(_fbb); |
| 5113 | builder_.add_output_type(output_type); |
| 5114 | return builder_.Finish(); |
| 5115 | } |
| 5116 | |
| 5117 | struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5118 | typedef ArgMinOptionsBuilder Builder; |
| 5119 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5120 | VT_OUTPUT_TYPE = 4 |
| 5121 | }; |
| 5122 | tflite::TensorType output_type() const { |
| 5123 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_OUTPUT_TYPE, 0)); |
| 5124 | } |
| 5125 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5126 | return VerifyTableStart(verifier) && |
| 5127 | VerifyField<int8_t>(verifier, VT_OUTPUT_TYPE) && |
| 5128 | verifier.EndTable(); |
| 5129 | } |
| 5130 | }; |
| 5131 | |
| 5132 | struct ArgMinOptionsBuilder { |
| 5133 | typedef ArgMinOptions Table; |
| 5134 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5135 | flatbuffers::uoffset_t start_; |
| 5136 | void add_output_type(tflite::TensorType output_type) { |
| 5137 | fbb_.AddElement<int8_t>(ArgMinOptions::VT_OUTPUT_TYPE, static_cast<int8_t>(output_type), 0); |
| 5138 | } |
| 5139 | explicit ArgMinOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5140 | : fbb_(_fbb) { |
| 5141 | start_ = fbb_.StartTable(); |
| 5142 | } |
| 5143 | flatbuffers::Offset<ArgMinOptions> Finish() { |
| 5144 | const auto end = fbb_.EndTable(start_); |
| 5145 | auto o = flatbuffers::Offset<ArgMinOptions>(end); |
| 5146 | return o; |
| 5147 | } |
| 5148 | }; |
| 5149 | |
| 5150 | inline flatbuffers::Offset<ArgMinOptions> CreateArgMinOptions( |
| 5151 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5152 | tflite::TensorType output_type = tflite::TensorType_FLOAT32) { |
| 5153 | ArgMinOptionsBuilder builder_(_fbb); |
| 5154 | builder_.add_output_type(output_type); |
| 5155 | return builder_.Finish(); |
| 5156 | } |
| 5157 | |
| 5158 | struct GreaterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5159 | typedef GreaterOptionsBuilder Builder; |
| 5160 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5161 | return VerifyTableStart(verifier) && |
| 5162 | verifier.EndTable(); |
| 5163 | } |
| 5164 | }; |
| 5165 | |
| 5166 | struct GreaterOptionsBuilder { |
| 5167 | typedef GreaterOptions Table; |
| 5168 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5169 | flatbuffers::uoffset_t start_; |
| 5170 | explicit GreaterOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5171 | : fbb_(_fbb) { |
| 5172 | start_ = fbb_.StartTable(); |
| 5173 | } |
| 5174 | flatbuffers::Offset<GreaterOptions> Finish() { |
| 5175 | const auto end = fbb_.EndTable(start_); |
| 5176 | auto o = flatbuffers::Offset<GreaterOptions>(end); |
| 5177 | return o; |
| 5178 | } |
| 5179 | }; |
| 5180 | |
| 5181 | inline flatbuffers::Offset<GreaterOptions> CreateGreaterOptions( |
| 5182 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5183 | GreaterOptionsBuilder builder_(_fbb); |
| 5184 | return builder_.Finish(); |
| 5185 | } |
| 5186 | |
| 5187 | struct GreaterEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5188 | typedef GreaterEqualOptionsBuilder Builder; |
| 5189 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5190 | return VerifyTableStart(verifier) && |
| 5191 | verifier.EndTable(); |
| 5192 | } |
| 5193 | }; |
| 5194 | |
| 5195 | struct GreaterEqualOptionsBuilder { |
| 5196 | typedef GreaterEqualOptions Table; |
| 5197 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5198 | flatbuffers::uoffset_t start_; |
| 5199 | explicit GreaterEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5200 | : fbb_(_fbb) { |
| 5201 | start_ = fbb_.StartTable(); |
| 5202 | } |
| 5203 | flatbuffers::Offset<GreaterEqualOptions> Finish() { |
| 5204 | const auto end = fbb_.EndTable(start_); |
| 5205 | auto o = flatbuffers::Offset<GreaterEqualOptions>(end); |
| 5206 | return o; |
| 5207 | } |
| 5208 | }; |
| 5209 | |
| 5210 | inline flatbuffers::Offset<GreaterEqualOptions> CreateGreaterEqualOptions( |
| 5211 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5212 | GreaterEqualOptionsBuilder builder_(_fbb); |
| 5213 | return builder_.Finish(); |
| 5214 | } |
| 5215 | |
| 5216 | struct LessOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5217 | typedef LessOptionsBuilder Builder; |
| 5218 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5219 | return VerifyTableStart(verifier) && |
| 5220 | verifier.EndTable(); |
| 5221 | } |
| 5222 | }; |
| 5223 | |
| 5224 | struct LessOptionsBuilder { |
| 5225 | typedef LessOptions Table; |
| 5226 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5227 | flatbuffers::uoffset_t start_; |
| 5228 | explicit LessOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5229 | : fbb_(_fbb) { |
| 5230 | start_ = fbb_.StartTable(); |
| 5231 | } |
| 5232 | flatbuffers::Offset<LessOptions> Finish() { |
| 5233 | const auto end = fbb_.EndTable(start_); |
| 5234 | auto o = flatbuffers::Offset<LessOptions>(end); |
| 5235 | return o; |
| 5236 | } |
| 5237 | }; |
| 5238 | |
| 5239 | inline flatbuffers::Offset<LessOptions> CreateLessOptions( |
| 5240 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5241 | LessOptionsBuilder builder_(_fbb); |
| 5242 | return builder_.Finish(); |
| 5243 | } |
| 5244 | |
| 5245 | struct LessEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5246 | typedef LessEqualOptionsBuilder Builder; |
| 5247 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5248 | return VerifyTableStart(verifier) && |
| 5249 | verifier.EndTable(); |
| 5250 | } |
| 5251 | }; |
| 5252 | |
| 5253 | struct LessEqualOptionsBuilder { |
| 5254 | typedef LessEqualOptions Table; |
| 5255 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5256 | flatbuffers::uoffset_t start_; |
| 5257 | explicit LessEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5258 | : fbb_(_fbb) { |
| 5259 | start_ = fbb_.StartTable(); |
| 5260 | } |
| 5261 | flatbuffers::Offset<LessEqualOptions> Finish() { |
| 5262 | const auto end = fbb_.EndTable(start_); |
| 5263 | auto o = flatbuffers::Offset<LessEqualOptions>(end); |
| 5264 | return o; |
| 5265 | } |
| 5266 | }; |
| 5267 | |
| 5268 | inline flatbuffers::Offset<LessEqualOptions> CreateLessEqualOptions( |
| 5269 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5270 | LessEqualOptionsBuilder builder_(_fbb); |
| 5271 | return builder_.Finish(); |
| 5272 | } |
| 5273 | |
| 5274 | struct NegOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5275 | typedef NegOptionsBuilder Builder; |
| 5276 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5277 | return VerifyTableStart(verifier) && |
| 5278 | verifier.EndTable(); |
| 5279 | } |
| 5280 | }; |
| 5281 | |
| 5282 | struct NegOptionsBuilder { |
| 5283 | typedef NegOptions Table; |
| 5284 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5285 | flatbuffers::uoffset_t start_; |
| 5286 | explicit NegOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5287 | : fbb_(_fbb) { |
| 5288 | start_ = fbb_.StartTable(); |
| 5289 | } |
| 5290 | flatbuffers::Offset<NegOptions> Finish() { |
| 5291 | const auto end = fbb_.EndTable(start_); |
| 5292 | auto o = flatbuffers::Offset<NegOptions>(end); |
| 5293 | return o; |
| 5294 | } |
| 5295 | }; |
| 5296 | |
| 5297 | inline flatbuffers::Offset<NegOptions> CreateNegOptions( |
| 5298 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5299 | NegOptionsBuilder builder_(_fbb); |
| 5300 | return builder_.Finish(); |
| 5301 | } |
| 5302 | |
| 5303 | struct SelectOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5304 | typedef SelectOptionsBuilder Builder; |
| 5305 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5306 | return VerifyTableStart(verifier) && |
| 5307 | verifier.EndTable(); |
| 5308 | } |
| 5309 | }; |
| 5310 | |
| 5311 | struct SelectOptionsBuilder { |
| 5312 | typedef SelectOptions Table; |
| 5313 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5314 | flatbuffers::uoffset_t start_; |
| 5315 | explicit SelectOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5316 | : fbb_(_fbb) { |
| 5317 | start_ = fbb_.StartTable(); |
| 5318 | } |
| 5319 | flatbuffers::Offset<SelectOptions> Finish() { |
| 5320 | const auto end = fbb_.EndTable(start_); |
| 5321 | auto o = flatbuffers::Offset<SelectOptions>(end); |
| 5322 | return o; |
| 5323 | } |
| 5324 | }; |
| 5325 | |
| 5326 | inline flatbuffers::Offset<SelectOptions> CreateSelectOptions( |
| 5327 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5328 | SelectOptionsBuilder builder_(_fbb); |
| 5329 | return builder_.Finish(); |
| 5330 | } |
| 5331 | |
| 5332 | struct SliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5333 | typedef SliceOptionsBuilder Builder; |
| 5334 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5335 | return VerifyTableStart(verifier) && |
| 5336 | verifier.EndTable(); |
| 5337 | } |
| 5338 | }; |
| 5339 | |
| 5340 | struct SliceOptionsBuilder { |
| 5341 | typedef SliceOptions Table; |
| 5342 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5343 | flatbuffers::uoffset_t start_; |
| 5344 | explicit SliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5345 | : fbb_(_fbb) { |
| 5346 | start_ = fbb_.StartTable(); |
| 5347 | } |
| 5348 | flatbuffers::Offset<SliceOptions> Finish() { |
| 5349 | const auto end = fbb_.EndTable(start_); |
| 5350 | auto o = flatbuffers::Offset<SliceOptions>(end); |
| 5351 | return o; |
| 5352 | } |
| 5353 | }; |
| 5354 | |
| 5355 | inline flatbuffers::Offset<SliceOptions> CreateSliceOptions( |
| 5356 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5357 | SliceOptionsBuilder builder_(_fbb); |
| 5358 | return builder_.Finish(); |
| 5359 | } |
| 5360 | |
| 5361 | struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5362 | typedef TransposeConvOptionsBuilder Builder; |
| 5363 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5364 | VT_PADDING = 4, |
| 5365 | VT_STRIDE_W = 6, |
| 5366 | VT_STRIDE_H = 8 |
| 5367 | }; |
| 5368 | tflite::Padding padding() const { |
| 5369 | return static_cast<tflite::Padding>(GetField<int8_t>(VT_PADDING, 0)); |
| 5370 | } |
| 5371 | int32_t stride_w() const { |
| 5372 | return GetField<int32_t>(VT_STRIDE_W, 0); |
| 5373 | } |
| 5374 | int32_t stride_h() const { |
| 5375 | return GetField<int32_t>(VT_STRIDE_H, 0); |
| 5376 | } |
| 5377 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5378 | return VerifyTableStart(verifier) && |
| 5379 | VerifyField<int8_t>(verifier, VT_PADDING) && |
| 5380 | VerifyField<int32_t>(verifier, VT_STRIDE_W) && |
| 5381 | VerifyField<int32_t>(verifier, VT_STRIDE_H) && |
| 5382 | verifier.EndTable(); |
| 5383 | } |
| 5384 | }; |
| 5385 | |
| 5386 | struct TransposeConvOptionsBuilder { |
| 5387 | typedef TransposeConvOptions Table; |
| 5388 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5389 | flatbuffers::uoffset_t start_; |
| 5390 | void add_padding(tflite::Padding padding) { |
| 5391 | fbb_.AddElement<int8_t>(TransposeConvOptions::VT_PADDING, static_cast<int8_t>(padding), 0); |
| 5392 | } |
| 5393 | void add_stride_w(int32_t stride_w) { |
| 5394 | fbb_.AddElement<int32_t>(TransposeConvOptions::VT_STRIDE_W, stride_w, 0); |
| 5395 | } |
| 5396 | void add_stride_h(int32_t stride_h) { |
| 5397 | fbb_.AddElement<int32_t>(TransposeConvOptions::VT_STRIDE_H, stride_h, 0); |
| 5398 | } |
| 5399 | explicit TransposeConvOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5400 | : fbb_(_fbb) { |
| 5401 | start_ = fbb_.StartTable(); |
| 5402 | } |
| 5403 | flatbuffers::Offset<TransposeConvOptions> Finish() { |
| 5404 | const auto end = fbb_.EndTable(start_); |
| 5405 | auto o = flatbuffers::Offset<TransposeConvOptions>(end); |
| 5406 | return o; |
| 5407 | } |
| 5408 | }; |
| 5409 | |
| 5410 | inline flatbuffers::Offset<TransposeConvOptions> CreateTransposeConvOptions( |
| 5411 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5412 | tflite::Padding padding = tflite::Padding_SAME, |
| 5413 | int32_t stride_w = 0, |
| 5414 | int32_t stride_h = 0) { |
| 5415 | TransposeConvOptionsBuilder builder_(_fbb); |
| 5416 | builder_.add_stride_h(stride_h); |
| 5417 | builder_.add_stride_w(stride_w); |
| 5418 | builder_.add_padding(padding); |
| 5419 | return builder_.Finish(); |
| 5420 | } |
| 5421 | |
| 5422 | struct ExpandDimsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5423 | typedef ExpandDimsOptionsBuilder Builder; |
| 5424 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5425 | return VerifyTableStart(verifier) && |
| 5426 | verifier.EndTable(); |
| 5427 | } |
| 5428 | }; |
| 5429 | |
| 5430 | struct ExpandDimsOptionsBuilder { |
| 5431 | typedef ExpandDimsOptions Table; |
| 5432 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5433 | flatbuffers::uoffset_t start_; |
| 5434 | explicit ExpandDimsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5435 | : fbb_(_fbb) { |
| 5436 | start_ = fbb_.StartTable(); |
| 5437 | } |
| 5438 | flatbuffers::Offset<ExpandDimsOptions> Finish() { |
| 5439 | const auto end = fbb_.EndTable(start_); |
| 5440 | auto o = flatbuffers::Offset<ExpandDimsOptions>(end); |
| 5441 | return o; |
| 5442 | } |
| 5443 | }; |
| 5444 | |
| 5445 | inline flatbuffers::Offset<ExpandDimsOptions> CreateExpandDimsOptions( |
| 5446 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5447 | ExpandDimsOptionsBuilder builder_(_fbb); |
| 5448 | return builder_.Finish(); |
| 5449 | } |
| 5450 | |
| 5451 | struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5452 | typedef SparseToDenseOptionsBuilder Builder; |
| 5453 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5454 | VT_VALIDATE_INDICES = 4 |
| 5455 | }; |
| 5456 | bool validate_indices() const { |
| 5457 | return GetField<uint8_t>(VT_VALIDATE_INDICES, 0) != 0; |
| 5458 | } |
| 5459 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5460 | return VerifyTableStart(verifier) && |
| 5461 | VerifyField<uint8_t>(verifier, VT_VALIDATE_INDICES) && |
| 5462 | verifier.EndTable(); |
| 5463 | } |
| 5464 | }; |
| 5465 | |
| 5466 | struct SparseToDenseOptionsBuilder { |
| 5467 | typedef SparseToDenseOptions Table; |
| 5468 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5469 | flatbuffers::uoffset_t start_; |
| 5470 | void add_validate_indices(bool validate_indices) { |
| 5471 | fbb_.AddElement<uint8_t>(SparseToDenseOptions::VT_VALIDATE_INDICES, static_cast<uint8_t>(validate_indices), 0); |
| 5472 | } |
| 5473 | explicit SparseToDenseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5474 | : fbb_(_fbb) { |
| 5475 | start_ = fbb_.StartTable(); |
| 5476 | } |
| 5477 | flatbuffers::Offset<SparseToDenseOptions> Finish() { |
| 5478 | const auto end = fbb_.EndTable(start_); |
| 5479 | auto o = flatbuffers::Offset<SparseToDenseOptions>(end); |
| 5480 | return o; |
| 5481 | } |
| 5482 | }; |
| 5483 | |
| 5484 | inline flatbuffers::Offset<SparseToDenseOptions> CreateSparseToDenseOptions( |
| 5485 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5486 | bool validate_indices = false) { |
| 5487 | SparseToDenseOptionsBuilder builder_(_fbb); |
| 5488 | builder_.add_validate_indices(validate_indices); |
| 5489 | return builder_.Finish(); |
| 5490 | } |
| 5491 | |
| 5492 | struct EqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5493 | typedef EqualOptionsBuilder Builder; |
| 5494 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5495 | return VerifyTableStart(verifier) && |
| 5496 | verifier.EndTable(); |
| 5497 | } |
| 5498 | }; |
| 5499 | |
| 5500 | struct EqualOptionsBuilder { |
| 5501 | typedef EqualOptions Table; |
| 5502 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5503 | flatbuffers::uoffset_t start_; |
| 5504 | explicit EqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5505 | : fbb_(_fbb) { |
| 5506 | start_ = fbb_.StartTable(); |
| 5507 | } |
| 5508 | flatbuffers::Offset<EqualOptions> Finish() { |
| 5509 | const auto end = fbb_.EndTable(start_); |
| 5510 | auto o = flatbuffers::Offset<EqualOptions>(end); |
| 5511 | return o; |
| 5512 | } |
| 5513 | }; |
| 5514 | |
| 5515 | inline flatbuffers::Offset<EqualOptions> CreateEqualOptions( |
| 5516 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5517 | EqualOptionsBuilder builder_(_fbb); |
| 5518 | return builder_.Finish(); |
| 5519 | } |
| 5520 | |
| 5521 | struct NotEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5522 | typedef NotEqualOptionsBuilder Builder; |
| 5523 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5524 | return VerifyTableStart(verifier) && |
| 5525 | verifier.EndTable(); |
| 5526 | } |
| 5527 | }; |
| 5528 | |
| 5529 | struct NotEqualOptionsBuilder { |
| 5530 | typedef NotEqualOptions Table; |
| 5531 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5532 | flatbuffers::uoffset_t start_; |
| 5533 | explicit NotEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5534 | : fbb_(_fbb) { |
| 5535 | start_ = fbb_.StartTable(); |
| 5536 | } |
| 5537 | flatbuffers::Offset<NotEqualOptions> Finish() { |
| 5538 | const auto end = fbb_.EndTable(start_); |
| 5539 | auto o = flatbuffers::Offset<NotEqualOptions>(end); |
| 5540 | return o; |
| 5541 | } |
| 5542 | }; |
| 5543 | |
| 5544 | inline flatbuffers::Offset<NotEqualOptions> CreateNotEqualOptions( |
| 5545 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5546 | NotEqualOptionsBuilder builder_(_fbb); |
| 5547 | return builder_.Finish(); |
| 5548 | } |
| 5549 | |
| 5550 | struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5551 | typedef ShapeOptionsBuilder Builder; |
| 5552 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5553 | VT_OUT_TYPE = 4 |
| 5554 | }; |
| 5555 | tflite::TensorType out_type() const { |
| 5556 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_OUT_TYPE, 0)); |
| 5557 | } |
| 5558 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5559 | return VerifyTableStart(verifier) && |
| 5560 | VerifyField<int8_t>(verifier, VT_OUT_TYPE) && |
| 5561 | verifier.EndTable(); |
| 5562 | } |
| 5563 | }; |
| 5564 | |
| 5565 | struct ShapeOptionsBuilder { |
| 5566 | typedef ShapeOptions Table; |
| 5567 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5568 | flatbuffers::uoffset_t start_; |
| 5569 | void add_out_type(tflite::TensorType out_type) { |
| 5570 | fbb_.AddElement<int8_t>(ShapeOptions::VT_OUT_TYPE, static_cast<int8_t>(out_type), 0); |
| 5571 | } |
| 5572 | explicit ShapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5573 | : fbb_(_fbb) { |
| 5574 | start_ = fbb_.StartTable(); |
| 5575 | } |
| 5576 | flatbuffers::Offset<ShapeOptions> Finish() { |
| 5577 | const auto end = fbb_.EndTable(start_); |
| 5578 | auto o = flatbuffers::Offset<ShapeOptions>(end); |
| 5579 | return o; |
| 5580 | } |
| 5581 | }; |
| 5582 | |
| 5583 | inline flatbuffers::Offset<ShapeOptions> CreateShapeOptions( |
| 5584 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5585 | tflite::TensorType out_type = tflite::TensorType_FLOAT32) { |
| 5586 | ShapeOptionsBuilder builder_(_fbb); |
| 5587 | builder_.add_out_type(out_type); |
| 5588 | return builder_.Finish(); |
| 5589 | } |
| 5590 | |
| 5591 | struct RankOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5592 | typedef RankOptionsBuilder Builder; |
| 5593 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5594 | return VerifyTableStart(verifier) && |
| 5595 | verifier.EndTable(); |
| 5596 | } |
| 5597 | }; |
| 5598 | |
| 5599 | struct RankOptionsBuilder { |
| 5600 | typedef RankOptions Table; |
| 5601 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5602 | flatbuffers::uoffset_t start_; |
| 5603 | explicit RankOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5604 | : fbb_(_fbb) { |
| 5605 | start_ = fbb_.StartTable(); |
| 5606 | } |
| 5607 | flatbuffers::Offset<RankOptions> Finish() { |
| 5608 | const auto end = fbb_.EndTable(start_); |
| 5609 | auto o = flatbuffers::Offset<RankOptions>(end); |
| 5610 | return o; |
| 5611 | } |
| 5612 | }; |
| 5613 | |
| 5614 | inline flatbuffers::Offset<RankOptions> CreateRankOptions( |
| 5615 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5616 | RankOptionsBuilder builder_(_fbb); |
| 5617 | return builder_.Finish(); |
| 5618 | } |
| 5619 | |
| 5620 | struct PowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5621 | typedef PowOptionsBuilder Builder; |
| 5622 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5623 | return VerifyTableStart(verifier) && |
| 5624 | verifier.EndTable(); |
| 5625 | } |
| 5626 | }; |
| 5627 | |
| 5628 | struct PowOptionsBuilder { |
| 5629 | typedef PowOptions Table; |
| 5630 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5631 | flatbuffers::uoffset_t start_; |
| 5632 | explicit PowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5633 | : fbb_(_fbb) { |
| 5634 | start_ = fbb_.StartTable(); |
| 5635 | } |
| 5636 | flatbuffers::Offset<PowOptions> Finish() { |
| 5637 | const auto end = fbb_.EndTable(start_); |
| 5638 | auto o = flatbuffers::Offset<PowOptions>(end); |
| 5639 | return o; |
| 5640 | } |
| 5641 | }; |
| 5642 | |
| 5643 | inline flatbuffers::Offset<PowOptions> CreatePowOptions( |
| 5644 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5645 | PowOptionsBuilder builder_(_fbb); |
| 5646 | return builder_.Finish(); |
| 5647 | } |
| 5648 | |
| 5649 | struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5650 | typedef FakeQuantOptionsBuilder Builder; |
| 5651 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5652 | VT_MIN = 4, |
| 5653 | VT_MAX = 6, |
| 5654 | VT_NUM_BITS = 8, |
| 5655 | VT_NARROW_RANGE = 10 |
| 5656 | }; |
| 5657 | float min() const { |
| 5658 | return GetField<float>(VT_MIN, 0.0f); |
| 5659 | } |
| 5660 | float max() const { |
| 5661 | return GetField<float>(VT_MAX, 0.0f); |
| 5662 | } |
| 5663 | int32_t num_bits() const { |
| 5664 | return GetField<int32_t>(VT_NUM_BITS, 0); |
| 5665 | } |
| 5666 | bool narrow_range() const { |
| 5667 | return GetField<uint8_t>(VT_NARROW_RANGE, 0) != 0; |
| 5668 | } |
| 5669 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5670 | return VerifyTableStart(verifier) && |
| 5671 | VerifyField<float>(verifier, VT_MIN) && |
| 5672 | VerifyField<float>(verifier, VT_MAX) && |
| 5673 | VerifyField<int32_t>(verifier, VT_NUM_BITS) && |
| 5674 | VerifyField<uint8_t>(verifier, VT_NARROW_RANGE) && |
| 5675 | verifier.EndTable(); |
| 5676 | } |
| 5677 | }; |
| 5678 | |
| 5679 | struct FakeQuantOptionsBuilder { |
| 5680 | typedef FakeQuantOptions Table; |
| 5681 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5682 | flatbuffers::uoffset_t start_; |
| 5683 | void add_min(float min) { |
| 5684 | fbb_.AddElement<float>(FakeQuantOptions::VT_MIN, min, 0.0f); |
| 5685 | } |
| 5686 | void add_max(float max) { |
| 5687 | fbb_.AddElement<float>(FakeQuantOptions::VT_MAX, max, 0.0f); |
| 5688 | } |
| 5689 | void add_num_bits(int32_t num_bits) { |
| 5690 | fbb_.AddElement<int32_t>(FakeQuantOptions::VT_NUM_BITS, num_bits, 0); |
| 5691 | } |
| 5692 | void add_narrow_range(bool narrow_range) { |
| 5693 | fbb_.AddElement<uint8_t>(FakeQuantOptions::VT_NARROW_RANGE, static_cast<uint8_t>(narrow_range), 0); |
| 5694 | } |
| 5695 | explicit FakeQuantOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5696 | : fbb_(_fbb) { |
| 5697 | start_ = fbb_.StartTable(); |
| 5698 | } |
| 5699 | flatbuffers::Offset<FakeQuantOptions> Finish() { |
| 5700 | const auto end = fbb_.EndTable(start_); |
| 5701 | auto o = flatbuffers::Offset<FakeQuantOptions>(end); |
| 5702 | return o; |
| 5703 | } |
| 5704 | }; |
| 5705 | |
| 5706 | inline flatbuffers::Offset<FakeQuantOptions> CreateFakeQuantOptions( |
| 5707 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5708 | float min = 0.0f, |
| 5709 | float max = 0.0f, |
| 5710 | int32_t num_bits = 0, |
| 5711 | bool narrow_range = false) { |
| 5712 | FakeQuantOptionsBuilder builder_(_fbb); |
| 5713 | builder_.add_num_bits(num_bits); |
| 5714 | builder_.add_max(max); |
| 5715 | builder_.add_min(min); |
| 5716 | builder_.add_narrow_range(narrow_range); |
| 5717 | return builder_.Finish(); |
| 5718 | } |
| 5719 | |
| 5720 | struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5721 | typedef PackOptionsBuilder Builder; |
| 5722 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5723 | VT_VALUES_COUNT = 4, |
| 5724 | VT_AXIS = 6 |
| 5725 | }; |
| 5726 | int32_t values_count() const { |
| 5727 | return GetField<int32_t>(VT_VALUES_COUNT, 0); |
| 5728 | } |
| 5729 | int32_t axis() const { |
| 5730 | return GetField<int32_t>(VT_AXIS, 0); |
| 5731 | } |
| 5732 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5733 | return VerifyTableStart(verifier) && |
| 5734 | VerifyField<int32_t>(verifier, VT_VALUES_COUNT) && |
| 5735 | VerifyField<int32_t>(verifier, VT_AXIS) && |
| 5736 | verifier.EndTable(); |
| 5737 | } |
| 5738 | }; |
| 5739 | |
| 5740 | struct PackOptionsBuilder { |
| 5741 | typedef PackOptions Table; |
| 5742 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5743 | flatbuffers::uoffset_t start_; |
| 5744 | void add_values_count(int32_t values_count) { |
| 5745 | fbb_.AddElement<int32_t>(PackOptions::VT_VALUES_COUNT, values_count, 0); |
| 5746 | } |
| 5747 | void add_axis(int32_t axis) { |
| 5748 | fbb_.AddElement<int32_t>(PackOptions::VT_AXIS, axis, 0); |
| 5749 | } |
| 5750 | explicit PackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5751 | : fbb_(_fbb) { |
| 5752 | start_ = fbb_.StartTable(); |
| 5753 | } |
| 5754 | flatbuffers::Offset<PackOptions> Finish() { |
| 5755 | const auto end = fbb_.EndTable(start_); |
| 5756 | auto o = flatbuffers::Offset<PackOptions>(end); |
| 5757 | return o; |
| 5758 | } |
| 5759 | }; |
| 5760 | |
| 5761 | inline flatbuffers::Offset<PackOptions> CreatePackOptions( |
| 5762 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5763 | int32_t values_count = 0, |
| 5764 | int32_t axis = 0) { |
| 5765 | PackOptionsBuilder builder_(_fbb); |
| 5766 | builder_.add_axis(axis); |
| 5767 | builder_.add_values_count(values_count); |
| 5768 | return builder_.Finish(); |
| 5769 | } |
| 5770 | |
| 5771 | struct LogicalOrOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5772 | typedef LogicalOrOptionsBuilder Builder; |
| 5773 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5774 | return VerifyTableStart(verifier) && |
| 5775 | verifier.EndTable(); |
| 5776 | } |
| 5777 | }; |
| 5778 | |
| 5779 | struct LogicalOrOptionsBuilder { |
| 5780 | typedef LogicalOrOptions Table; |
| 5781 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5782 | flatbuffers::uoffset_t start_; |
| 5783 | explicit LogicalOrOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5784 | : fbb_(_fbb) { |
| 5785 | start_ = fbb_.StartTable(); |
| 5786 | } |
| 5787 | flatbuffers::Offset<LogicalOrOptions> Finish() { |
| 5788 | const auto end = fbb_.EndTable(start_); |
| 5789 | auto o = flatbuffers::Offset<LogicalOrOptions>(end); |
| 5790 | return o; |
| 5791 | } |
| 5792 | }; |
| 5793 | |
| 5794 | inline flatbuffers::Offset<LogicalOrOptions> CreateLogicalOrOptions( |
| 5795 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5796 | LogicalOrOptionsBuilder builder_(_fbb); |
| 5797 | return builder_.Finish(); |
| 5798 | } |
| 5799 | |
| 5800 | struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5801 | typedef OneHotOptionsBuilder Builder; |
| 5802 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5803 | VT_AXIS = 4 |
| 5804 | }; |
| 5805 | int32_t axis() const { |
| 5806 | return GetField<int32_t>(VT_AXIS, 0); |
| 5807 | } |
| 5808 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5809 | return VerifyTableStart(verifier) && |
| 5810 | VerifyField<int32_t>(verifier, VT_AXIS) && |
| 5811 | verifier.EndTable(); |
| 5812 | } |
| 5813 | }; |
| 5814 | |
| 5815 | struct OneHotOptionsBuilder { |
| 5816 | typedef OneHotOptions Table; |
| 5817 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5818 | flatbuffers::uoffset_t start_; |
| 5819 | void add_axis(int32_t axis) { |
| 5820 | fbb_.AddElement<int32_t>(OneHotOptions::VT_AXIS, axis, 0); |
| 5821 | } |
| 5822 | explicit OneHotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5823 | : fbb_(_fbb) { |
| 5824 | start_ = fbb_.StartTable(); |
| 5825 | } |
| 5826 | flatbuffers::Offset<OneHotOptions> Finish() { |
| 5827 | const auto end = fbb_.EndTable(start_); |
| 5828 | auto o = flatbuffers::Offset<OneHotOptions>(end); |
| 5829 | return o; |
| 5830 | } |
| 5831 | }; |
| 5832 | |
| 5833 | inline flatbuffers::Offset<OneHotOptions> CreateOneHotOptions( |
| 5834 | flatbuffers::FlatBufferBuilder &_fbb, |
| 5835 | int32_t axis = 0) { |
| 5836 | OneHotOptionsBuilder builder_(_fbb); |
| 5837 | builder_.add_axis(axis); |
| 5838 | return builder_.Finish(); |
| 5839 | } |
| 5840 | |
| 5841 | struct AbsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5842 | typedef AbsOptionsBuilder Builder; |
| 5843 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5844 | return VerifyTableStart(verifier) && |
| 5845 | verifier.EndTable(); |
| 5846 | } |
| 5847 | }; |
| 5848 | |
| 5849 | struct AbsOptionsBuilder { |
| 5850 | typedef AbsOptions Table; |
| 5851 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5852 | flatbuffers::uoffset_t start_; |
| 5853 | explicit AbsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5854 | : fbb_(_fbb) { |
| 5855 | start_ = fbb_.StartTable(); |
| 5856 | } |
| 5857 | flatbuffers::Offset<AbsOptions> Finish() { |
| 5858 | const auto end = fbb_.EndTable(start_); |
| 5859 | auto o = flatbuffers::Offset<AbsOptions>(end); |
| 5860 | return o; |
| 5861 | } |
| 5862 | }; |
| 5863 | |
| 5864 | inline flatbuffers::Offset<AbsOptions> CreateAbsOptions( |
| 5865 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5866 | AbsOptionsBuilder builder_(_fbb); |
| 5867 | return builder_.Finish(); |
| 5868 | } |
| 5869 | |
| 5870 | struct HardSwishOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5871 | typedef HardSwishOptionsBuilder Builder; |
| 5872 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5873 | return VerifyTableStart(verifier) && |
| 5874 | verifier.EndTable(); |
| 5875 | } |
| 5876 | }; |
| 5877 | |
| 5878 | struct HardSwishOptionsBuilder { |
| 5879 | typedef HardSwishOptions Table; |
| 5880 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5881 | flatbuffers::uoffset_t start_; |
| 5882 | explicit HardSwishOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5883 | : fbb_(_fbb) { |
| 5884 | start_ = fbb_.StartTable(); |
| 5885 | } |
| 5886 | flatbuffers::Offset<HardSwishOptions> Finish() { |
| 5887 | const auto end = fbb_.EndTable(start_); |
| 5888 | auto o = flatbuffers::Offset<HardSwishOptions>(end); |
| 5889 | return o; |
| 5890 | } |
| 5891 | }; |
| 5892 | |
| 5893 | inline flatbuffers::Offset<HardSwishOptions> CreateHardSwishOptions( |
| 5894 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5895 | HardSwishOptionsBuilder builder_(_fbb); |
| 5896 | return builder_.Finish(); |
| 5897 | } |
| 5898 | |
| 5899 | struct LogicalAndOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5900 | typedef LogicalAndOptionsBuilder Builder; |
| 5901 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5902 | return VerifyTableStart(verifier) && |
| 5903 | verifier.EndTable(); |
| 5904 | } |
| 5905 | }; |
| 5906 | |
| 5907 | struct LogicalAndOptionsBuilder { |
| 5908 | typedef LogicalAndOptions Table; |
| 5909 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5910 | flatbuffers::uoffset_t start_; |
| 5911 | explicit LogicalAndOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5912 | : fbb_(_fbb) { |
| 5913 | start_ = fbb_.StartTable(); |
| 5914 | } |
| 5915 | flatbuffers::Offset<LogicalAndOptions> Finish() { |
| 5916 | const auto end = fbb_.EndTable(start_); |
| 5917 | auto o = flatbuffers::Offset<LogicalAndOptions>(end); |
| 5918 | return o; |
| 5919 | } |
| 5920 | }; |
| 5921 | |
| 5922 | inline flatbuffers::Offset<LogicalAndOptions> CreateLogicalAndOptions( |
| 5923 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5924 | LogicalAndOptionsBuilder builder_(_fbb); |
| 5925 | return builder_.Finish(); |
| 5926 | } |
| 5927 | |
| 5928 | struct LogicalNotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5929 | typedef LogicalNotOptionsBuilder Builder; |
| 5930 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5931 | return VerifyTableStart(verifier) && |
| 5932 | verifier.EndTable(); |
| 5933 | } |
| 5934 | }; |
| 5935 | |
| 5936 | struct LogicalNotOptionsBuilder { |
| 5937 | typedef LogicalNotOptions Table; |
| 5938 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5939 | flatbuffers::uoffset_t start_; |
| 5940 | explicit LogicalNotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5941 | : fbb_(_fbb) { |
| 5942 | start_ = fbb_.StartTable(); |
| 5943 | } |
| 5944 | flatbuffers::Offset<LogicalNotOptions> Finish() { |
| 5945 | const auto end = fbb_.EndTable(start_); |
| 5946 | auto o = flatbuffers::Offset<LogicalNotOptions>(end); |
| 5947 | return o; |
| 5948 | } |
| 5949 | }; |
| 5950 | |
| 5951 | inline flatbuffers::Offset<LogicalNotOptions> CreateLogicalNotOptions( |
| 5952 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 5953 | LogicalNotOptionsBuilder builder_(_fbb); |
| 5954 | return builder_.Finish(); |
| 5955 | } |
| 5956 | |
| 5957 | struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 5958 | typedef UnpackOptionsBuilder Builder; |
| 5959 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 5960 | VT_NUM = 4, |
| 5961 | VT_AXIS = 6 |
| 5962 | }; |
| 5963 | int32_t num() const { |
| 5964 | return GetField<int32_t>(VT_NUM, 0); |
| 5965 | } |
| 5966 | int32_t axis() const { |
| 5967 | return GetField<int32_t>(VT_AXIS, 0); |
| 5968 | } |
| 5969 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 5970 | return VerifyTableStart(verifier) && |
| 5971 | VerifyField<int32_t>(verifier, VT_NUM) && |
| 5972 | VerifyField<int32_t>(verifier, VT_AXIS) && |
| 5973 | verifier.EndTable(); |
| 5974 | } |
| 5975 | }; |
| 5976 | |
| 5977 | struct UnpackOptionsBuilder { |
| 5978 | typedef UnpackOptions Table; |
| 5979 | flatbuffers::FlatBufferBuilder &fbb_; |
| 5980 | flatbuffers::uoffset_t start_; |
| 5981 | void add_num(int32_t num) { |
| 5982 | fbb_.AddElement<int32_t>(UnpackOptions::VT_NUM, num, 0); |
| 5983 | } |
| 5984 | void add_axis(int32_t axis) { |
| 5985 | fbb_.AddElement<int32_t>(UnpackOptions::VT_AXIS, axis, 0); |
| 5986 | } |
| 5987 | explicit UnpackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 5988 | : fbb_(_fbb) { |
| 5989 | start_ = fbb_.StartTable(); |
| 5990 | } |
| 5991 | flatbuffers::Offset<UnpackOptions> Finish() { |
| 5992 | const auto end = fbb_.EndTable(start_); |
| 5993 | auto o = flatbuffers::Offset<UnpackOptions>(end); |
| 5994 | return o; |
| 5995 | } |
| 5996 | }; |
| 5997 | |
| 5998 | inline flatbuffers::Offset<UnpackOptions> CreateUnpackOptions( |
| 5999 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6000 | int32_t num = 0, |
| 6001 | int32_t axis = 0) { |
| 6002 | UnpackOptionsBuilder builder_(_fbb); |
| 6003 | builder_.add_axis(axis); |
| 6004 | builder_.add_num(num); |
| 6005 | return builder_.Finish(); |
| 6006 | } |
| 6007 | |
| 6008 | struct FloorDivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6009 | typedef FloorDivOptionsBuilder Builder; |
| 6010 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6011 | return VerifyTableStart(verifier) && |
| 6012 | verifier.EndTable(); |
| 6013 | } |
| 6014 | }; |
| 6015 | |
| 6016 | struct FloorDivOptionsBuilder { |
| 6017 | typedef FloorDivOptions Table; |
| 6018 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6019 | flatbuffers::uoffset_t start_; |
| 6020 | explicit FloorDivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6021 | : fbb_(_fbb) { |
| 6022 | start_ = fbb_.StartTable(); |
| 6023 | } |
| 6024 | flatbuffers::Offset<FloorDivOptions> Finish() { |
| 6025 | const auto end = fbb_.EndTable(start_); |
| 6026 | auto o = flatbuffers::Offset<FloorDivOptions>(end); |
| 6027 | return o; |
| 6028 | } |
| 6029 | }; |
| 6030 | |
| 6031 | inline flatbuffers::Offset<FloorDivOptions> CreateFloorDivOptions( |
| 6032 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6033 | FloorDivOptionsBuilder builder_(_fbb); |
| 6034 | return builder_.Finish(); |
| 6035 | } |
| 6036 | |
| 6037 | struct SquareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6038 | typedef SquareOptionsBuilder Builder; |
| 6039 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6040 | return VerifyTableStart(verifier) && |
| 6041 | verifier.EndTable(); |
| 6042 | } |
| 6043 | }; |
| 6044 | |
| 6045 | struct SquareOptionsBuilder { |
| 6046 | typedef SquareOptions Table; |
| 6047 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6048 | flatbuffers::uoffset_t start_; |
| 6049 | explicit SquareOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6050 | : fbb_(_fbb) { |
| 6051 | start_ = fbb_.StartTable(); |
| 6052 | } |
| 6053 | flatbuffers::Offset<SquareOptions> Finish() { |
| 6054 | const auto end = fbb_.EndTable(start_); |
| 6055 | auto o = flatbuffers::Offset<SquareOptions>(end); |
| 6056 | return o; |
| 6057 | } |
| 6058 | }; |
| 6059 | |
| 6060 | inline flatbuffers::Offset<SquareOptions> CreateSquareOptions( |
| 6061 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6062 | SquareOptionsBuilder builder_(_fbb); |
| 6063 | return builder_.Finish(); |
| 6064 | } |
| 6065 | |
| 6066 | struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6067 | typedef ZerosLikeOptionsBuilder Builder; |
| 6068 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6069 | return VerifyTableStart(verifier) && |
| 6070 | verifier.EndTable(); |
| 6071 | } |
| 6072 | }; |
| 6073 | |
| 6074 | struct ZerosLikeOptionsBuilder { |
| 6075 | typedef ZerosLikeOptions Table; |
| 6076 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6077 | flatbuffers::uoffset_t start_; |
| 6078 | explicit ZerosLikeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6079 | : fbb_(_fbb) { |
| 6080 | start_ = fbb_.StartTable(); |
| 6081 | } |
| 6082 | flatbuffers::Offset<ZerosLikeOptions> Finish() { |
| 6083 | const auto end = fbb_.EndTable(start_); |
| 6084 | auto o = flatbuffers::Offset<ZerosLikeOptions>(end); |
| 6085 | return o; |
| 6086 | } |
| 6087 | }; |
| 6088 | |
| 6089 | inline flatbuffers::Offset<ZerosLikeOptions> CreateZerosLikeOptions( |
| 6090 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6091 | ZerosLikeOptionsBuilder builder_(_fbb); |
| 6092 | return builder_.Finish(); |
| 6093 | } |
| 6094 | |
| 6095 | struct FillOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6096 | typedef FillOptionsBuilder Builder; |
| 6097 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6098 | return VerifyTableStart(verifier) && |
| 6099 | verifier.EndTable(); |
| 6100 | } |
| 6101 | }; |
| 6102 | |
| 6103 | struct FillOptionsBuilder { |
| 6104 | typedef FillOptions Table; |
| 6105 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6106 | flatbuffers::uoffset_t start_; |
| 6107 | explicit FillOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6108 | : fbb_(_fbb) { |
| 6109 | start_ = fbb_.StartTable(); |
| 6110 | } |
| 6111 | flatbuffers::Offset<FillOptions> Finish() { |
| 6112 | const auto end = fbb_.EndTable(start_); |
| 6113 | auto o = flatbuffers::Offset<FillOptions>(end); |
| 6114 | return o; |
| 6115 | } |
| 6116 | }; |
| 6117 | |
| 6118 | inline flatbuffers::Offset<FillOptions> CreateFillOptions( |
| 6119 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6120 | FillOptionsBuilder builder_(_fbb); |
| 6121 | return builder_.Finish(); |
| 6122 | } |
| 6123 | |
| 6124 | struct FloorModOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6125 | typedef FloorModOptionsBuilder Builder; |
| 6126 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6127 | return VerifyTableStart(verifier) && |
| 6128 | verifier.EndTable(); |
| 6129 | } |
| 6130 | }; |
| 6131 | |
| 6132 | struct FloorModOptionsBuilder { |
| 6133 | typedef FloorModOptions Table; |
| 6134 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6135 | flatbuffers::uoffset_t start_; |
| 6136 | explicit FloorModOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6137 | : fbb_(_fbb) { |
| 6138 | start_ = fbb_.StartTable(); |
| 6139 | } |
| 6140 | flatbuffers::Offset<FloorModOptions> Finish() { |
| 6141 | const auto end = fbb_.EndTable(start_); |
| 6142 | auto o = flatbuffers::Offset<FloorModOptions>(end); |
| 6143 | return o; |
| 6144 | } |
| 6145 | }; |
| 6146 | |
| 6147 | inline flatbuffers::Offset<FloorModOptions> CreateFloorModOptions( |
| 6148 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6149 | FloorModOptionsBuilder builder_(_fbb); |
| 6150 | return builder_.Finish(); |
| 6151 | } |
| 6152 | |
| 6153 | struct RangeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6154 | typedef RangeOptionsBuilder Builder; |
| 6155 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6156 | return VerifyTableStart(verifier) && |
| 6157 | verifier.EndTable(); |
| 6158 | } |
| 6159 | }; |
| 6160 | |
| 6161 | struct RangeOptionsBuilder { |
| 6162 | typedef RangeOptions Table; |
| 6163 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6164 | flatbuffers::uoffset_t start_; |
| 6165 | explicit RangeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6166 | : fbb_(_fbb) { |
| 6167 | start_ = fbb_.StartTable(); |
| 6168 | } |
| 6169 | flatbuffers::Offset<RangeOptions> Finish() { |
| 6170 | const auto end = fbb_.EndTable(start_); |
| 6171 | auto o = flatbuffers::Offset<RangeOptions>(end); |
| 6172 | return o; |
| 6173 | } |
| 6174 | }; |
| 6175 | |
| 6176 | inline flatbuffers::Offset<RangeOptions> CreateRangeOptions( |
| 6177 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6178 | RangeOptionsBuilder builder_(_fbb); |
| 6179 | return builder_.Finish(); |
| 6180 | } |
| 6181 | |
| 6182 | struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6183 | typedef LeakyReluOptionsBuilder Builder; |
| 6184 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6185 | VT_ALPHA = 4 |
| 6186 | }; |
| 6187 | float alpha() const { |
| 6188 | return GetField<float>(VT_ALPHA, 0.0f); |
| 6189 | } |
| 6190 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6191 | return VerifyTableStart(verifier) && |
| 6192 | VerifyField<float>(verifier, VT_ALPHA) && |
| 6193 | verifier.EndTable(); |
| 6194 | } |
| 6195 | }; |
| 6196 | |
| 6197 | struct LeakyReluOptionsBuilder { |
| 6198 | typedef LeakyReluOptions Table; |
| 6199 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6200 | flatbuffers::uoffset_t start_; |
| 6201 | void add_alpha(float alpha) { |
| 6202 | fbb_.AddElement<float>(LeakyReluOptions::VT_ALPHA, alpha, 0.0f); |
| 6203 | } |
| 6204 | explicit LeakyReluOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6205 | : fbb_(_fbb) { |
| 6206 | start_ = fbb_.StartTable(); |
| 6207 | } |
| 6208 | flatbuffers::Offset<LeakyReluOptions> Finish() { |
| 6209 | const auto end = fbb_.EndTable(start_); |
| 6210 | auto o = flatbuffers::Offset<LeakyReluOptions>(end); |
| 6211 | return o; |
| 6212 | } |
| 6213 | }; |
| 6214 | |
| 6215 | inline flatbuffers::Offset<LeakyReluOptions> CreateLeakyReluOptions( |
| 6216 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6217 | float alpha = 0.0f) { |
| 6218 | LeakyReluOptionsBuilder builder_(_fbb); |
| 6219 | builder_.add_alpha(alpha); |
| 6220 | return builder_.Finish(); |
| 6221 | } |
| 6222 | |
| 6223 | struct SquaredDifferenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6224 | typedef SquaredDifferenceOptionsBuilder Builder; |
| 6225 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6226 | return VerifyTableStart(verifier) && |
| 6227 | verifier.EndTable(); |
| 6228 | } |
| 6229 | }; |
| 6230 | |
| 6231 | struct SquaredDifferenceOptionsBuilder { |
| 6232 | typedef SquaredDifferenceOptions Table; |
| 6233 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6234 | flatbuffers::uoffset_t start_; |
| 6235 | explicit SquaredDifferenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6236 | : fbb_(_fbb) { |
| 6237 | start_ = fbb_.StartTable(); |
| 6238 | } |
| 6239 | flatbuffers::Offset<SquaredDifferenceOptions> Finish() { |
| 6240 | const auto end = fbb_.EndTable(start_); |
| 6241 | auto o = flatbuffers::Offset<SquaredDifferenceOptions>(end); |
| 6242 | return o; |
| 6243 | } |
| 6244 | }; |
| 6245 | |
| 6246 | inline flatbuffers::Offset<SquaredDifferenceOptions> CreateSquaredDifferenceOptions( |
| 6247 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6248 | SquaredDifferenceOptionsBuilder builder_(_fbb); |
| 6249 | return builder_.Finish(); |
| 6250 | } |
| 6251 | |
| 6252 | struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6253 | typedef MirrorPadOptionsBuilder Builder; |
| 6254 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6255 | VT_MODE = 4 |
| 6256 | }; |
| 6257 | tflite::MirrorPadMode mode() const { |
| 6258 | return static_cast<tflite::MirrorPadMode>(GetField<int8_t>(VT_MODE, 0)); |
| 6259 | } |
| 6260 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6261 | return VerifyTableStart(verifier) && |
| 6262 | VerifyField<int8_t>(verifier, VT_MODE) && |
| 6263 | verifier.EndTable(); |
| 6264 | } |
| 6265 | }; |
| 6266 | |
| 6267 | struct MirrorPadOptionsBuilder { |
| 6268 | typedef MirrorPadOptions Table; |
| 6269 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6270 | flatbuffers::uoffset_t start_; |
| 6271 | void add_mode(tflite::MirrorPadMode mode) { |
| 6272 | fbb_.AddElement<int8_t>(MirrorPadOptions::VT_MODE, static_cast<int8_t>(mode), 0); |
| 6273 | } |
| 6274 | explicit MirrorPadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6275 | : fbb_(_fbb) { |
| 6276 | start_ = fbb_.StartTable(); |
| 6277 | } |
| 6278 | flatbuffers::Offset<MirrorPadOptions> Finish() { |
| 6279 | const auto end = fbb_.EndTable(start_); |
| 6280 | auto o = flatbuffers::Offset<MirrorPadOptions>(end); |
| 6281 | return o; |
| 6282 | } |
| 6283 | }; |
| 6284 | |
| 6285 | inline flatbuffers::Offset<MirrorPadOptions> CreateMirrorPadOptions( |
| 6286 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6287 | tflite::MirrorPadMode mode = tflite::MirrorPadMode_REFLECT) { |
| 6288 | MirrorPadOptionsBuilder builder_(_fbb); |
| 6289 | builder_.add_mode(mode); |
| 6290 | return builder_.Finish(); |
| 6291 | } |
| 6292 | |
| 6293 | struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6294 | typedef UniqueOptionsBuilder Builder; |
| 6295 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6296 | VT_IDX_OUT_TYPE = 4 |
| 6297 | }; |
| 6298 | tflite::TensorType idx_out_type() const { |
| 6299 | return static_cast<tflite::TensorType>(GetField<int8_t>(VT_IDX_OUT_TYPE, 2)); |
| 6300 | } |
| 6301 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6302 | return VerifyTableStart(verifier) && |
| 6303 | VerifyField<int8_t>(verifier, VT_IDX_OUT_TYPE) && |
| 6304 | verifier.EndTable(); |
| 6305 | } |
| 6306 | }; |
| 6307 | |
| 6308 | struct UniqueOptionsBuilder { |
| 6309 | typedef UniqueOptions Table; |
| 6310 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6311 | flatbuffers::uoffset_t start_; |
| 6312 | void add_idx_out_type(tflite::TensorType idx_out_type) { |
| 6313 | fbb_.AddElement<int8_t>(UniqueOptions::VT_IDX_OUT_TYPE, static_cast<int8_t>(idx_out_type), 2); |
| 6314 | } |
| 6315 | explicit UniqueOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6316 | : fbb_(_fbb) { |
| 6317 | start_ = fbb_.StartTable(); |
| 6318 | } |
| 6319 | flatbuffers::Offset<UniqueOptions> Finish() { |
| 6320 | const auto end = fbb_.EndTable(start_); |
| 6321 | auto o = flatbuffers::Offset<UniqueOptions>(end); |
| 6322 | return o; |
| 6323 | } |
| 6324 | }; |
| 6325 | |
| 6326 | inline flatbuffers::Offset<UniqueOptions> CreateUniqueOptions( |
| 6327 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6328 | tflite::TensorType idx_out_type = tflite::TensorType_INT32) { |
| 6329 | UniqueOptionsBuilder builder_(_fbb); |
| 6330 | builder_.add_idx_out_type(idx_out_type); |
| 6331 | return builder_.Finish(); |
| 6332 | } |
| 6333 | |
| 6334 | struct ReverseV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6335 | typedef ReverseV2OptionsBuilder Builder; |
| 6336 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6337 | return VerifyTableStart(verifier) && |
| 6338 | verifier.EndTable(); |
| 6339 | } |
| 6340 | }; |
| 6341 | |
| 6342 | struct ReverseV2OptionsBuilder { |
| 6343 | typedef ReverseV2Options Table; |
| 6344 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6345 | flatbuffers::uoffset_t start_; |
| 6346 | explicit ReverseV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6347 | : fbb_(_fbb) { |
| 6348 | start_ = fbb_.StartTable(); |
| 6349 | } |
| 6350 | flatbuffers::Offset<ReverseV2Options> Finish() { |
| 6351 | const auto end = fbb_.EndTable(start_); |
| 6352 | auto o = flatbuffers::Offset<ReverseV2Options>(end); |
| 6353 | return o; |
| 6354 | } |
| 6355 | }; |
| 6356 | |
| 6357 | inline flatbuffers::Offset<ReverseV2Options> CreateReverseV2Options( |
| 6358 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6359 | ReverseV2OptionsBuilder builder_(_fbb); |
| 6360 | return builder_.Finish(); |
| 6361 | } |
| 6362 | |
| 6363 | struct AddNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6364 | typedef AddNOptionsBuilder Builder; |
| 6365 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6366 | return VerifyTableStart(verifier) && |
| 6367 | verifier.EndTable(); |
| 6368 | } |
| 6369 | }; |
| 6370 | |
| 6371 | struct AddNOptionsBuilder { |
| 6372 | typedef AddNOptions Table; |
| 6373 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6374 | flatbuffers::uoffset_t start_; |
| 6375 | explicit AddNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6376 | : fbb_(_fbb) { |
| 6377 | start_ = fbb_.StartTable(); |
| 6378 | } |
| 6379 | flatbuffers::Offset<AddNOptions> Finish() { |
| 6380 | const auto end = fbb_.EndTable(start_); |
| 6381 | auto o = flatbuffers::Offset<AddNOptions>(end); |
| 6382 | return o; |
| 6383 | } |
| 6384 | }; |
| 6385 | |
| 6386 | inline flatbuffers::Offset<AddNOptions> CreateAddNOptions( |
| 6387 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6388 | AddNOptionsBuilder builder_(_fbb); |
| 6389 | return builder_.Finish(); |
| 6390 | } |
| 6391 | |
| 6392 | struct GatherNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6393 | typedef GatherNdOptionsBuilder Builder; |
| 6394 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6395 | return VerifyTableStart(verifier) && |
| 6396 | verifier.EndTable(); |
| 6397 | } |
| 6398 | }; |
| 6399 | |
| 6400 | struct GatherNdOptionsBuilder { |
| 6401 | typedef GatherNdOptions Table; |
| 6402 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6403 | flatbuffers::uoffset_t start_; |
| 6404 | explicit GatherNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6405 | : fbb_(_fbb) { |
| 6406 | start_ = fbb_.StartTable(); |
| 6407 | } |
| 6408 | flatbuffers::Offset<GatherNdOptions> Finish() { |
| 6409 | const auto end = fbb_.EndTable(start_); |
| 6410 | auto o = flatbuffers::Offset<GatherNdOptions>(end); |
| 6411 | return o; |
| 6412 | } |
| 6413 | }; |
| 6414 | |
| 6415 | inline flatbuffers::Offset<GatherNdOptions> CreateGatherNdOptions( |
| 6416 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6417 | GatherNdOptionsBuilder builder_(_fbb); |
| 6418 | return builder_.Finish(); |
| 6419 | } |
| 6420 | |
| 6421 | struct WhereOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6422 | typedef WhereOptionsBuilder Builder; |
| 6423 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6424 | return VerifyTableStart(verifier) && |
| 6425 | verifier.EndTable(); |
| 6426 | } |
| 6427 | }; |
| 6428 | |
| 6429 | struct WhereOptionsBuilder { |
| 6430 | typedef WhereOptions Table; |
| 6431 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6432 | flatbuffers::uoffset_t start_; |
| 6433 | explicit WhereOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6434 | : fbb_(_fbb) { |
| 6435 | start_ = fbb_.StartTable(); |
| 6436 | } |
| 6437 | flatbuffers::Offset<WhereOptions> Finish() { |
| 6438 | const auto end = fbb_.EndTable(start_); |
| 6439 | auto o = flatbuffers::Offset<WhereOptions>(end); |
| 6440 | return o; |
| 6441 | } |
| 6442 | }; |
| 6443 | |
| 6444 | inline flatbuffers::Offset<WhereOptions> CreateWhereOptions( |
| 6445 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6446 | WhereOptionsBuilder builder_(_fbb); |
| 6447 | return builder_.Finish(); |
| 6448 | } |
| 6449 | |
| 6450 | struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6451 | typedef ReverseSequenceOptionsBuilder Builder; |
| 6452 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6453 | VT_SEQ_DIM = 4, |
| 6454 | VT_BATCH_DIM = 6 |
| 6455 | }; |
| 6456 | int32_t seq_dim() const { |
| 6457 | return GetField<int32_t>(VT_SEQ_DIM, 0); |
| 6458 | } |
| 6459 | int32_t batch_dim() const { |
| 6460 | return GetField<int32_t>(VT_BATCH_DIM, 0); |
| 6461 | } |
| 6462 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6463 | return VerifyTableStart(verifier) && |
| 6464 | VerifyField<int32_t>(verifier, VT_SEQ_DIM) && |
| 6465 | VerifyField<int32_t>(verifier, VT_BATCH_DIM) && |
| 6466 | verifier.EndTable(); |
| 6467 | } |
| 6468 | }; |
| 6469 | |
| 6470 | struct ReverseSequenceOptionsBuilder { |
| 6471 | typedef ReverseSequenceOptions Table; |
| 6472 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6473 | flatbuffers::uoffset_t start_; |
| 6474 | void add_seq_dim(int32_t seq_dim) { |
| 6475 | fbb_.AddElement<int32_t>(ReverseSequenceOptions::VT_SEQ_DIM, seq_dim, 0); |
| 6476 | } |
| 6477 | void add_batch_dim(int32_t batch_dim) { |
| 6478 | fbb_.AddElement<int32_t>(ReverseSequenceOptions::VT_BATCH_DIM, batch_dim, 0); |
| 6479 | } |
| 6480 | explicit ReverseSequenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6481 | : fbb_(_fbb) { |
| 6482 | start_ = fbb_.StartTable(); |
| 6483 | } |
| 6484 | flatbuffers::Offset<ReverseSequenceOptions> Finish() { |
| 6485 | const auto end = fbb_.EndTable(start_); |
| 6486 | auto o = flatbuffers::Offset<ReverseSequenceOptions>(end); |
| 6487 | return o; |
| 6488 | } |
| 6489 | }; |
| 6490 | |
| 6491 | inline flatbuffers::Offset<ReverseSequenceOptions> CreateReverseSequenceOptions( |
| 6492 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6493 | int32_t seq_dim = 0, |
| 6494 | int32_t batch_dim = 0) { |
| 6495 | ReverseSequenceOptionsBuilder builder_(_fbb); |
| 6496 | builder_.add_batch_dim(batch_dim); |
| 6497 | builder_.add_seq_dim(seq_dim); |
| 6498 | return builder_.Finish(); |
| 6499 | } |
| 6500 | |
| 6501 | struct MatrixDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6502 | typedef MatrixDiagOptionsBuilder Builder; |
| 6503 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6504 | return VerifyTableStart(verifier) && |
| 6505 | verifier.EndTable(); |
| 6506 | } |
| 6507 | }; |
| 6508 | |
| 6509 | struct MatrixDiagOptionsBuilder { |
| 6510 | typedef MatrixDiagOptions Table; |
| 6511 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6512 | flatbuffers::uoffset_t start_; |
| 6513 | explicit MatrixDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6514 | : fbb_(_fbb) { |
| 6515 | start_ = fbb_.StartTable(); |
| 6516 | } |
| 6517 | flatbuffers::Offset<MatrixDiagOptions> Finish() { |
| 6518 | const auto end = fbb_.EndTable(start_); |
| 6519 | auto o = flatbuffers::Offset<MatrixDiagOptions>(end); |
| 6520 | return o; |
| 6521 | } |
| 6522 | }; |
| 6523 | |
| 6524 | inline flatbuffers::Offset<MatrixDiagOptions> CreateMatrixDiagOptions( |
| 6525 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6526 | MatrixDiagOptionsBuilder builder_(_fbb); |
| 6527 | return builder_.Finish(); |
| 6528 | } |
| 6529 | |
| 6530 | struct QuantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6531 | typedef QuantizeOptionsBuilder Builder; |
| 6532 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6533 | return VerifyTableStart(verifier) && |
| 6534 | verifier.EndTable(); |
| 6535 | } |
| 6536 | }; |
| 6537 | |
| 6538 | struct QuantizeOptionsBuilder { |
| 6539 | typedef QuantizeOptions Table; |
| 6540 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6541 | flatbuffers::uoffset_t start_; |
| 6542 | explicit QuantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6543 | : fbb_(_fbb) { |
| 6544 | start_ = fbb_.StartTable(); |
| 6545 | } |
| 6546 | flatbuffers::Offset<QuantizeOptions> Finish() { |
| 6547 | const auto end = fbb_.EndTable(start_); |
| 6548 | auto o = flatbuffers::Offset<QuantizeOptions>(end); |
| 6549 | return o; |
| 6550 | } |
| 6551 | }; |
| 6552 | |
| 6553 | inline flatbuffers::Offset<QuantizeOptions> CreateQuantizeOptions( |
| 6554 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6555 | QuantizeOptionsBuilder builder_(_fbb); |
| 6556 | return builder_.Finish(); |
| 6557 | } |
| 6558 | |
| 6559 | struct MatrixSetDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6560 | typedef MatrixSetDiagOptionsBuilder Builder; |
| 6561 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6562 | return VerifyTableStart(verifier) && |
| 6563 | verifier.EndTable(); |
| 6564 | } |
| 6565 | }; |
| 6566 | |
| 6567 | struct MatrixSetDiagOptionsBuilder { |
| 6568 | typedef MatrixSetDiagOptions Table; |
| 6569 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6570 | flatbuffers::uoffset_t start_; |
| 6571 | explicit MatrixSetDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6572 | : fbb_(_fbb) { |
| 6573 | start_ = fbb_.StartTable(); |
| 6574 | } |
| 6575 | flatbuffers::Offset<MatrixSetDiagOptions> Finish() { |
| 6576 | const auto end = fbb_.EndTable(start_); |
| 6577 | auto o = flatbuffers::Offset<MatrixSetDiagOptions>(end); |
| 6578 | return o; |
| 6579 | } |
| 6580 | }; |
| 6581 | |
| 6582 | inline flatbuffers::Offset<MatrixSetDiagOptions> CreateMatrixSetDiagOptions( |
| 6583 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6584 | MatrixSetDiagOptionsBuilder builder_(_fbb); |
| 6585 | return builder_.Finish(); |
| 6586 | } |
| 6587 | |
| 6588 | struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6589 | typedef IfOptionsBuilder Builder; |
| 6590 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6591 | VT_THEN_SUBGRAPH_INDEX = 4, |
| 6592 | VT_ELSE_SUBGRAPH_INDEX = 6 |
| 6593 | }; |
| 6594 | int32_t then_subgraph_index() const { |
| 6595 | return GetField<int32_t>(VT_THEN_SUBGRAPH_INDEX, 0); |
| 6596 | } |
| 6597 | int32_t else_subgraph_index() const { |
| 6598 | return GetField<int32_t>(VT_ELSE_SUBGRAPH_INDEX, 0); |
| 6599 | } |
| 6600 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6601 | return VerifyTableStart(verifier) && |
| 6602 | VerifyField<int32_t>(verifier, VT_THEN_SUBGRAPH_INDEX) && |
| 6603 | VerifyField<int32_t>(verifier, VT_ELSE_SUBGRAPH_INDEX) && |
| 6604 | verifier.EndTable(); |
| 6605 | } |
| 6606 | }; |
| 6607 | |
| 6608 | struct IfOptionsBuilder { |
| 6609 | typedef IfOptions Table; |
| 6610 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6611 | flatbuffers::uoffset_t start_; |
| 6612 | void add_then_subgraph_index(int32_t then_subgraph_index) { |
| 6613 | fbb_.AddElement<int32_t>(IfOptions::VT_THEN_SUBGRAPH_INDEX, then_subgraph_index, 0); |
| 6614 | } |
| 6615 | void add_else_subgraph_index(int32_t else_subgraph_index) { |
| 6616 | fbb_.AddElement<int32_t>(IfOptions::VT_ELSE_SUBGRAPH_INDEX, else_subgraph_index, 0); |
| 6617 | } |
| 6618 | explicit IfOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6619 | : fbb_(_fbb) { |
| 6620 | start_ = fbb_.StartTable(); |
| 6621 | } |
| 6622 | flatbuffers::Offset<IfOptions> Finish() { |
| 6623 | const auto end = fbb_.EndTable(start_); |
| 6624 | auto o = flatbuffers::Offset<IfOptions>(end); |
| 6625 | return o; |
| 6626 | } |
| 6627 | }; |
| 6628 | |
| 6629 | inline flatbuffers::Offset<IfOptions> CreateIfOptions( |
| 6630 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6631 | int32_t then_subgraph_index = 0, |
| 6632 | int32_t else_subgraph_index = 0) { |
| 6633 | IfOptionsBuilder builder_(_fbb); |
| 6634 | builder_.add_else_subgraph_index(else_subgraph_index); |
| 6635 | builder_.add_then_subgraph_index(then_subgraph_index); |
| 6636 | return builder_.Finish(); |
| 6637 | } |
| 6638 | |
| 6639 | struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6640 | typedef WhileOptionsBuilder Builder; |
| 6641 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6642 | VT_COND_SUBGRAPH_INDEX = 4, |
| 6643 | VT_BODY_SUBGRAPH_INDEX = 6 |
| 6644 | }; |
| 6645 | int32_t cond_subgraph_index() const { |
| 6646 | return GetField<int32_t>(VT_COND_SUBGRAPH_INDEX, 0); |
| 6647 | } |
| 6648 | int32_t body_subgraph_index() const { |
| 6649 | return GetField<int32_t>(VT_BODY_SUBGRAPH_INDEX, 0); |
| 6650 | } |
| 6651 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6652 | return VerifyTableStart(verifier) && |
| 6653 | VerifyField<int32_t>(verifier, VT_COND_SUBGRAPH_INDEX) && |
| 6654 | VerifyField<int32_t>(verifier, VT_BODY_SUBGRAPH_INDEX) && |
| 6655 | verifier.EndTable(); |
| 6656 | } |
| 6657 | }; |
| 6658 | |
| 6659 | struct WhileOptionsBuilder { |
| 6660 | typedef WhileOptions Table; |
| 6661 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6662 | flatbuffers::uoffset_t start_; |
| 6663 | void add_cond_subgraph_index(int32_t cond_subgraph_index) { |
| 6664 | fbb_.AddElement<int32_t>(WhileOptions::VT_COND_SUBGRAPH_INDEX, cond_subgraph_index, 0); |
| 6665 | } |
| 6666 | void add_body_subgraph_index(int32_t body_subgraph_index) { |
| 6667 | fbb_.AddElement<int32_t>(WhileOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); |
| 6668 | } |
| 6669 | explicit WhileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6670 | : fbb_(_fbb) { |
| 6671 | start_ = fbb_.StartTable(); |
| 6672 | } |
| 6673 | flatbuffers::Offset<WhileOptions> Finish() { |
| 6674 | const auto end = fbb_.EndTable(start_); |
| 6675 | auto o = flatbuffers::Offset<WhileOptions>(end); |
| 6676 | return o; |
| 6677 | } |
| 6678 | }; |
| 6679 | |
| 6680 | inline flatbuffers::Offset<WhileOptions> CreateWhileOptions( |
| 6681 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6682 | int32_t cond_subgraph_index = 0, |
| 6683 | int32_t body_subgraph_index = 0) { |
| 6684 | WhileOptionsBuilder builder_(_fbb); |
| 6685 | builder_.add_body_subgraph_index(body_subgraph_index); |
| 6686 | builder_.add_cond_subgraph_index(cond_subgraph_index); |
| 6687 | return builder_.Finish(); |
| 6688 | } |
| 6689 | |
| 6690 | struct NonMaxSuppressionV4Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6691 | typedef NonMaxSuppressionV4OptionsBuilder Builder; |
| 6692 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6693 | return VerifyTableStart(verifier) && |
| 6694 | verifier.EndTable(); |
| 6695 | } |
| 6696 | }; |
| 6697 | |
| 6698 | struct NonMaxSuppressionV4OptionsBuilder { |
| 6699 | typedef NonMaxSuppressionV4Options Table; |
| 6700 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6701 | flatbuffers::uoffset_t start_; |
| 6702 | explicit NonMaxSuppressionV4OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6703 | : fbb_(_fbb) { |
| 6704 | start_ = fbb_.StartTable(); |
| 6705 | } |
| 6706 | flatbuffers::Offset<NonMaxSuppressionV4Options> Finish() { |
| 6707 | const auto end = fbb_.EndTable(start_); |
| 6708 | auto o = flatbuffers::Offset<NonMaxSuppressionV4Options>(end); |
| 6709 | return o; |
| 6710 | } |
| 6711 | }; |
| 6712 | |
| 6713 | inline flatbuffers::Offset<NonMaxSuppressionV4Options> CreateNonMaxSuppressionV4Options( |
| 6714 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6715 | NonMaxSuppressionV4OptionsBuilder builder_(_fbb); |
| 6716 | return builder_.Finish(); |
| 6717 | } |
| 6718 | |
| 6719 | struct NonMaxSuppressionV5Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6720 | typedef NonMaxSuppressionV5OptionsBuilder Builder; |
| 6721 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6722 | return VerifyTableStart(verifier) && |
| 6723 | verifier.EndTable(); |
| 6724 | } |
| 6725 | }; |
| 6726 | |
| 6727 | struct NonMaxSuppressionV5OptionsBuilder { |
| 6728 | typedef NonMaxSuppressionV5Options Table; |
| 6729 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6730 | flatbuffers::uoffset_t start_; |
| 6731 | explicit NonMaxSuppressionV5OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6732 | : fbb_(_fbb) { |
| 6733 | start_ = fbb_.StartTable(); |
| 6734 | } |
| 6735 | flatbuffers::Offset<NonMaxSuppressionV5Options> Finish() { |
| 6736 | const auto end = fbb_.EndTable(start_); |
| 6737 | auto o = flatbuffers::Offset<NonMaxSuppressionV5Options>(end); |
| 6738 | return o; |
| 6739 | } |
| 6740 | }; |
| 6741 | |
| 6742 | inline flatbuffers::Offset<NonMaxSuppressionV5Options> CreateNonMaxSuppressionV5Options( |
| 6743 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6744 | NonMaxSuppressionV5OptionsBuilder builder_(_fbb); |
| 6745 | return builder_.Finish(); |
| 6746 | } |
| 6747 | |
| 6748 | struct ScatterNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6749 | typedef ScatterNdOptionsBuilder Builder; |
| 6750 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6751 | return VerifyTableStart(verifier) && |
| 6752 | verifier.EndTable(); |
| 6753 | } |
| 6754 | }; |
| 6755 | |
| 6756 | struct ScatterNdOptionsBuilder { |
| 6757 | typedef ScatterNdOptions Table; |
| 6758 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6759 | flatbuffers::uoffset_t start_; |
| 6760 | explicit ScatterNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6761 | : fbb_(_fbb) { |
| 6762 | start_ = fbb_.StartTable(); |
| 6763 | } |
| 6764 | flatbuffers::Offset<ScatterNdOptions> Finish() { |
| 6765 | const auto end = fbb_.EndTable(start_); |
| 6766 | auto o = flatbuffers::Offset<ScatterNdOptions>(end); |
| 6767 | return o; |
| 6768 | } |
| 6769 | }; |
| 6770 | |
| 6771 | inline flatbuffers::Offset<ScatterNdOptions> CreateScatterNdOptions( |
| 6772 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6773 | ScatterNdOptionsBuilder builder_(_fbb); |
| 6774 | return builder_.Finish(); |
| 6775 | } |
| 6776 | |
| 6777 | struct SelectV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6778 | typedef SelectV2OptionsBuilder Builder; |
| 6779 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6780 | return VerifyTableStart(verifier) && |
| 6781 | verifier.EndTable(); |
| 6782 | } |
| 6783 | }; |
| 6784 | |
| 6785 | struct SelectV2OptionsBuilder { |
| 6786 | typedef SelectV2Options Table; |
| 6787 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6788 | flatbuffers::uoffset_t start_; |
| 6789 | explicit SelectV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6790 | : fbb_(_fbb) { |
| 6791 | start_ = fbb_.StartTable(); |
| 6792 | } |
| 6793 | flatbuffers::Offset<SelectV2Options> Finish() { |
| 6794 | const auto end = fbb_.EndTable(start_); |
| 6795 | auto o = flatbuffers::Offset<SelectV2Options>(end); |
| 6796 | return o; |
| 6797 | } |
| 6798 | }; |
| 6799 | |
| 6800 | inline flatbuffers::Offset<SelectV2Options> CreateSelectV2Options( |
| 6801 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6802 | SelectV2OptionsBuilder builder_(_fbb); |
| 6803 | return builder_.Finish(); |
| 6804 | } |
| 6805 | |
| 6806 | struct DensifyOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6807 | typedef DensifyOptionsBuilder Builder; |
| 6808 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6809 | return VerifyTableStart(verifier) && |
| 6810 | verifier.EndTable(); |
| 6811 | } |
| 6812 | }; |
| 6813 | |
| 6814 | struct DensifyOptionsBuilder { |
| 6815 | typedef DensifyOptions Table; |
| 6816 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6817 | flatbuffers::uoffset_t start_; |
| 6818 | explicit DensifyOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6819 | : fbb_(_fbb) { |
| 6820 | start_ = fbb_.StartTable(); |
| 6821 | } |
| 6822 | flatbuffers::Offset<DensifyOptions> Finish() { |
| 6823 | const auto end = fbb_.EndTable(start_); |
| 6824 | auto o = flatbuffers::Offset<DensifyOptions>(end); |
| 6825 | return o; |
| 6826 | } |
| 6827 | }; |
| 6828 | |
| 6829 | inline flatbuffers::Offset<DensifyOptions> CreateDensifyOptions( |
| 6830 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6831 | DensifyOptionsBuilder builder_(_fbb); |
| 6832 | return builder_.Finish(); |
| 6833 | } |
| 6834 | |
| 6835 | struct SegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6836 | typedef SegmentSumOptionsBuilder Builder; |
| 6837 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6838 | return VerifyTableStart(verifier) && |
| 6839 | verifier.EndTable(); |
| 6840 | } |
| 6841 | }; |
| 6842 | |
| 6843 | struct SegmentSumOptionsBuilder { |
| 6844 | typedef SegmentSumOptions Table; |
| 6845 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6846 | flatbuffers::uoffset_t start_; |
| 6847 | explicit SegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6848 | : fbb_(_fbb) { |
| 6849 | start_ = fbb_.StartTable(); |
| 6850 | } |
| 6851 | flatbuffers::Offset<SegmentSumOptions> Finish() { |
| 6852 | const auto end = fbb_.EndTable(start_); |
| 6853 | auto o = flatbuffers::Offset<SegmentSumOptions>(end); |
| 6854 | return o; |
| 6855 | } |
| 6856 | }; |
| 6857 | |
| 6858 | inline flatbuffers::Offset<SegmentSumOptions> CreateSegmentSumOptions( |
| 6859 | flatbuffers::FlatBufferBuilder &_fbb) { |
| 6860 | SegmentSumOptionsBuilder builder_(_fbb); |
| 6861 | return builder_.Finish(); |
| 6862 | } |
| 6863 | |
| 6864 | struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6865 | typedef BatchMatMulOptionsBuilder Builder; |
| 6866 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6867 | VT_ADJ_X = 4, |
| 6868 | VT_ADJ_Y = 6 |
| 6869 | }; |
| 6870 | bool adj_x() const { |
| 6871 | return GetField<uint8_t>(VT_ADJ_X, 0) != 0; |
| 6872 | } |
| 6873 | bool adj_y() const { |
| 6874 | return GetField<uint8_t>(VT_ADJ_Y, 0) != 0; |
| 6875 | } |
| 6876 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6877 | return VerifyTableStart(verifier) && |
| 6878 | VerifyField<uint8_t>(verifier, VT_ADJ_X) && |
| 6879 | VerifyField<uint8_t>(verifier, VT_ADJ_Y) && |
| 6880 | verifier.EndTable(); |
| 6881 | } |
| 6882 | }; |
| 6883 | |
| 6884 | struct BatchMatMulOptionsBuilder { |
| 6885 | typedef BatchMatMulOptions Table; |
| 6886 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6887 | flatbuffers::uoffset_t start_; |
| 6888 | void add_adj_x(bool adj_x) { |
| 6889 | fbb_.AddElement<uint8_t>(BatchMatMulOptions::VT_ADJ_X, static_cast<uint8_t>(adj_x), 0); |
| 6890 | } |
| 6891 | void add_adj_y(bool adj_y) { |
| 6892 | fbb_.AddElement<uint8_t>(BatchMatMulOptions::VT_ADJ_Y, static_cast<uint8_t>(adj_y), 0); |
| 6893 | } |
| 6894 | explicit BatchMatMulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6895 | : fbb_(_fbb) { |
| 6896 | start_ = fbb_.StartTable(); |
| 6897 | } |
| 6898 | flatbuffers::Offset<BatchMatMulOptions> Finish() { |
| 6899 | const auto end = fbb_.EndTable(start_); |
| 6900 | auto o = flatbuffers::Offset<BatchMatMulOptions>(end); |
| 6901 | return o; |
| 6902 | } |
| 6903 | }; |
| 6904 | |
| 6905 | inline flatbuffers::Offset<BatchMatMulOptions> CreateBatchMatMulOptions( |
| 6906 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6907 | bool adj_x = false, |
| 6908 | bool adj_y = false) { |
| 6909 | BatchMatMulOptionsBuilder builder_(_fbb); |
| 6910 | builder_.add_adj_y(adj_y); |
| 6911 | builder_.add_adj_x(adj_x); |
| 6912 | return builder_.Finish(); |
| 6913 | } |
| 6914 | |
| 6915 | struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6916 | typedef OperatorCodeBuilder Builder; |
| 6917 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6918 | VT_BUILTIN_CODE = 4, |
| 6919 | VT_CUSTOM_CODE = 6, |
| 6920 | VT_VERSION = 8 |
| 6921 | }; |
| 6922 | tflite::BuiltinOperator builtin_code() const { |
| 6923 | return static_cast<tflite::BuiltinOperator>(GetField<int8_t>(VT_BUILTIN_CODE, 0)); |
| 6924 | } |
| 6925 | const flatbuffers::String *custom_code() const { |
| 6926 | return GetPointer<const flatbuffers::String *>(VT_CUSTOM_CODE); |
| 6927 | } |
| 6928 | int32_t version() const { |
| 6929 | return GetField<int32_t>(VT_VERSION, 1); |
| 6930 | } |
| 6931 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 6932 | return VerifyTableStart(verifier) && |
| 6933 | VerifyField<int8_t>(verifier, VT_BUILTIN_CODE) && |
| 6934 | VerifyOffset(verifier, VT_CUSTOM_CODE) && |
| 6935 | verifier.VerifyString(custom_code()) && |
| 6936 | VerifyField<int32_t>(verifier, VT_VERSION) && |
| 6937 | verifier.EndTable(); |
| 6938 | } |
| 6939 | }; |
| 6940 | |
| 6941 | struct OperatorCodeBuilder { |
| 6942 | typedef OperatorCode Table; |
| 6943 | flatbuffers::FlatBufferBuilder &fbb_; |
| 6944 | flatbuffers::uoffset_t start_; |
| 6945 | void add_builtin_code(tflite::BuiltinOperator builtin_code) { |
| 6946 | fbb_.AddElement<int8_t>(OperatorCode::VT_BUILTIN_CODE, static_cast<int8_t>(builtin_code), 0); |
| 6947 | } |
| 6948 | void add_custom_code(flatbuffers::Offset<flatbuffers::String> custom_code) { |
| 6949 | fbb_.AddOffset(OperatorCode::VT_CUSTOM_CODE, custom_code); |
| 6950 | } |
| 6951 | void add_version(int32_t version) { |
| 6952 | fbb_.AddElement<int32_t>(OperatorCode::VT_VERSION, version, 1); |
| 6953 | } |
| 6954 | explicit OperatorCodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 6955 | : fbb_(_fbb) { |
| 6956 | start_ = fbb_.StartTable(); |
| 6957 | } |
| 6958 | flatbuffers::Offset<OperatorCode> Finish() { |
| 6959 | const auto end = fbb_.EndTable(start_); |
| 6960 | auto o = flatbuffers::Offset<OperatorCode>(end); |
| 6961 | return o; |
| 6962 | } |
| 6963 | }; |
| 6964 | |
| 6965 | inline flatbuffers::Offset<OperatorCode> CreateOperatorCode( |
| 6966 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6967 | tflite::BuiltinOperator builtin_code = tflite::BuiltinOperator_ADD, |
| 6968 | flatbuffers::Offset<flatbuffers::String> custom_code = 0, |
| 6969 | int32_t version = 1) { |
| 6970 | OperatorCodeBuilder builder_(_fbb); |
| 6971 | builder_.add_version(version); |
| 6972 | builder_.add_custom_code(custom_code); |
| 6973 | builder_.add_builtin_code(builtin_code); |
| 6974 | return builder_.Finish(); |
| 6975 | } |
| 6976 | |
| 6977 | inline flatbuffers::Offset<OperatorCode> CreateOperatorCodeDirect( |
| 6978 | flatbuffers::FlatBufferBuilder &_fbb, |
| 6979 | tflite::BuiltinOperator builtin_code = tflite::BuiltinOperator_ADD, |
| 6980 | const char *custom_code = nullptr, |
| 6981 | int32_t version = 1) { |
| 6982 | auto custom_code__ = custom_code ? _fbb.CreateString(custom_code) : 0; |
| 6983 | return tflite::CreateOperatorCode( |
| 6984 | _fbb, |
| 6985 | builtin_code, |
| 6986 | custom_code__, |
| 6987 | version); |
| 6988 | } |
| 6989 | |
| 6990 | struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 6991 | typedef OperatorBuilder Builder; |
| 6992 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 6993 | VT_OPCODE_INDEX = 4, |
| 6994 | VT_INPUTS = 6, |
| 6995 | VT_OUTPUTS = 8, |
| 6996 | VT_BUILTIN_OPTIONS_TYPE = 10, |
| 6997 | VT_BUILTIN_OPTIONS = 12, |
| 6998 | VT_CUSTOM_OPTIONS = 14, |
| 6999 | VT_CUSTOM_OPTIONS_FORMAT = 16, |
| 7000 | VT_MUTATING_VARIABLE_INPUTS = 18, |
| 7001 | VT_INTERMEDIATES = 20 |
| 7002 | }; |
| 7003 | uint32_t opcode_index() const { |
| 7004 | return GetField<uint32_t>(VT_OPCODE_INDEX, 0); |
| 7005 | } |
| 7006 | const flatbuffers::Vector<int32_t> *inputs() const { |
| 7007 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_INPUTS); |
| 7008 | } |
| 7009 | const flatbuffers::Vector<int32_t> *outputs() const { |
| 7010 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_OUTPUTS); |
| 7011 | } |
| 7012 | tflite::BuiltinOptions builtin_options_type() const { |
| 7013 | return static_cast<tflite::BuiltinOptions>(GetField<uint8_t>(VT_BUILTIN_OPTIONS_TYPE, 0)); |
| 7014 | } |
| 7015 | const void *builtin_options() const { |
| 7016 | return GetPointer<const void *>(VT_BUILTIN_OPTIONS); |
| 7017 | } |
| 7018 | template<typename T> const T *builtin_options_as() const; |
| 7019 | const tflite::Conv2DOptions *builtin_options_as_Conv2DOptions() const { |
| 7020 | return builtin_options_type() == tflite::BuiltinOptions_Conv2DOptions ? static_cast<const tflite::Conv2DOptions *>(builtin_options()) : nullptr; |
| 7021 | } |
| 7022 | const tflite::DepthwiseConv2DOptions *builtin_options_as_DepthwiseConv2DOptions() const { |
| 7023 | return builtin_options_type() == tflite::BuiltinOptions_DepthwiseConv2DOptions ? static_cast<const tflite::DepthwiseConv2DOptions *>(builtin_options()) : nullptr; |
| 7024 | } |
| 7025 | const tflite::ConcatEmbeddingsOptions *builtin_options_as_ConcatEmbeddingsOptions() const { |
| 7026 | return builtin_options_type() == tflite::BuiltinOptions_ConcatEmbeddingsOptions ? static_cast<const tflite::ConcatEmbeddingsOptions *>(builtin_options()) : nullptr; |
| 7027 | } |
| 7028 | const tflite::LSHProjectionOptions *builtin_options_as_LSHProjectionOptions() const { |
| 7029 | return builtin_options_type() == tflite::BuiltinOptions_LSHProjectionOptions ? static_cast<const tflite::LSHProjectionOptions *>(builtin_options()) : nullptr; |
| 7030 | } |
| 7031 | const tflite::Pool2DOptions *builtin_options_as_Pool2DOptions() const { |
| 7032 | return builtin_options_type() == tflite::BuiltinOptions_Pool2DOptions ? static_cast<const tflite::Pool2DOptions *>(builtin_options()) : nullptr; |
| 7033 | } |
| 7034 | const tflite::SVDFOptions *builtin_options_as_SVDFOptions() const { |
| 7035 | return builtin_options_type() == tflite::BuiltinOptions_SVDFOptions ? static_cast<const tflite::SVDFOptions *>(builtin_options()) : nullptr; |
| 7036 | } |
| 7037 | const tflite::RNNOptions *builtin_options_as_RNNOptions() const { |
| 7038 | return builtin_options_type() == tflite::BuiltinOptions_RNNOptions ? static_cast<const tflite::RNNOptions *>(builtin_options()) : nullptr; |
| 7039 | } |
| 7040 | const tflite::FullyConnectedOptions *builtin_options_as_FullyConnectedOptions() const { |
| 7041 | return builtin_options_type() == tflite::BuiltinOptions_FullyConnectedOptions ? static_cast<const tflite::FullyConnectedOptions *>(builtin_options()) : nullptr; |
| 7042 | } |
| 7043 | const tflite::SoftmaxOptions *builtin_options_as_SoftmaxOptions() const { |
| 7044 | return builtin_options_type() == tflite::BuiltinOptions_SoftmaxOptions ? static_cast<const tflite::SoftmaxOptions *>(builtin_options()) : nullptr; |
| 7045 | } |
| 7046 | const tflite::ConcatenationOptions *builtin_options_as_ConcatenationOptions() const { |
| 7047 | return builtin_options_type() == tflite::BuiltinOptions_ConcatenationOptions ? static_cast<const tflite::ConcatenationOptions *>(builtin_options()) : nullptr; |
| 7048 | } |
| 7049 | const tflite::AddOptions *builtin_options_as_AddOptions() const { |
| 7050 | return builtin_options_type() == tflite::BuiltinOptions_AddOptions ? static_cast<const tflite::AddOptions *>(builtin_options()) : nullptr; |
| 7051 | } |
| 7052 | const tflite::L2NormOptions *builtin_options_as_L2NormOptions() const { |
| 7053 | return builtin_options_type() == tflite::BuiltinOptions_L2NormOptions ? static_cast<const tflite::L2NormOptions *>(builtin_options()) : nullptr; |
| 7054 | } |
| 7055 | const tflite::LocalResponseNormalizationOptions *builtin_options_as_LocalResponseNormalizationOptions() const { |
| 7056 | return builtin_options_type() == tflite::BuiltinOptions_LocalResponseNormalizationOptions ? static_cast<const tflite::LocalResponseNormalizationOptions *>(builtin_options()) : nullptr; |
| 7057 | } |
| 7058 | const tflite::LSTMOptions *builtin_options_as_LSTMOptions() const { |
| 7059 | return builtin_options_type() == tflite::BuiltinOptions_LSTMOptions ? static_cast<const tflite::LSTMOptions *>(builtin_options()) : nullptr; |
| 7060 | } |
| 7061 | const tflite::ResizeBilinearOptions *builtin_options_as_ResizeBilinearOptions() const { |
| 7062 | return builtin_options_type() == tflite::BuiltinOptions_ResizeBilinearOptions ? static_cast<const tflite::ResizeBilinearOptions *>(builtin_options()) : nullptr; |
| 7063 | } |
| 7064 | const tflite::CallOptions *builtin_options_as_CallOptions() const { |
| 7065 | return builtin_options_type() == tflite::BuiltinOptions_CallOptions ? static_cast<const tflite::CallOptions *>(builtin_options()) : nullptr; |
| 7066 | } |
| 7067 | const tflite::ReshapeOptions *builtin_options_as_ReshapeOptions() const { |
| 7068 | return builtin_options_type() == tflite::BuiltinOptions_ReshapeOptions ? static_cast<const tflite::ReshapeOptions *>(builtin_options()) : nullptr; |
| 7069 | } |
| 7070 | const tflite::SkipGramOptions *builtin_options_as_SkipGramOptions() const { |
| 7071 | return builtin_options_type() == tflite::BuiltinOptions_SkipGramOptions ? static_cast<const tflite::SkipGramOptions *>(builtin_options()) : nullptr; |
| 7072 | } |
| 7073 | const tflite::SpaceToDepthOptions *builtin_options_as_SpaceToDepthOptions() const { |
| 7074 | return builtin_options_type() == tflite::BuiltinOptions_SpaceToDepthOptions ? static_cast<const tflite::SpaceToDepthOptions *>(builtin_options()) : nullptr; |
| 7075 | } |
| 7076 | const tflite::EmbeddingLookupSparseOptions *builtin_options_as_EmbeddingLookupSparseOptions() const { |
| 7077 | return builtin_options_type() == tflite::BuiltinOptions_EmbeddingLookupSparseOptions ? static_cast<const tflite::EmbeddingLookupSparseOptions *>(builtin_options()) : nullptr; |
| 7078 | } |
| 7079 | const tflite::MulOptions *builtin_options_as_MulOptions() const { |
| 7080 | return builtin_options_type() == tflite::BuiltinOptions_MulOptions ? static_cast<const tflite::MulOptions *>(builtin_options()) : nullptr; |
| 7081 | } |
| 7082 | const tflite::PadOptions *builtin_options_as_PadOptions() const { |
| 7083 | return builtin_options_type() == tflite::BuiltinOptions_PadOptions ? static_cast<const tflite::PadOptions *>(builtin_options()) : nullptr; |
| 7084 | } |
| 7085 | const tflite::GatherOptions *builtin_options_as_GatherOptions() const { |
| 7086 | return builtin_options_type() == tflite::BuiltinOptions_GatherOptions ? static_cast<const tflite::GatherOptions *>(builtin_options()) : nullptr; |
| 7087 | } |
| 7088 | const tflite::BatchToSpaceNDOptions *builtin_options_as_BatchToSpaceNDOptions() const { |
| 7089 | return builtin_options_type() == tflite::BuiltinOptions_BatchToSpaceNDOptions ? static_cast<const tflite::BatchToSpaceNDOptions *>(builtin_options()) : nullptr; |
| 7090 | } |
| 7091 | const tflite::SpaceToBatchNDOptions *builtin_options_as_SpaceToBatchNDOptions() const { |
| 7092 | return builtin_options_type() == tflite::BuiltinOptions_SpaceToBatchNDOptions ? static_cast<const tflite::SpaceToBatchNDOptions *>(builtin_options()) : nullptr; |
| 7093 | } |
| 7094 | const tflite::TransposeOptions *builtin_options_as_TransposeOptions() const { |
| 7095 | return builtin_options_type() == tflite::BuiltinOptions_TransposeOptions ? static_cast<const tflite::TransposeOptions *>(builtin_options()) : nullptr; |
| 7096 | } |
| 7097 | const tflite::ReducerOptions *builtin_options_as_ReducerOptions() const { |
| 7098 | return builtin_options_type() == tflite::BuiltinOptions_ReducerOptions ? static_cast<const tflite::ReducerOptions *>(builtin_options()) : nullptr; |
| 7099 | } |
| 7100 | const tflite::SubOptions *builtin_options_as_SubOptions() const { |
| 7101 | return builtin_options_type() == tflite::BuiltinOptions_SubOptions ? static_cast<const tflite::SubOptions *>(builtin_options()) : nullptr; |
| 7102 | } |
| 7103 | const tflite::DivOptions *builtin_options_as_DivOptions() const { |
| 7104 | return builtin_options_type() == tflite::BuiltinOptions_DivOptions ? static_cast<const tflite::DivOptions *>(builtin_options()) : nullptr; |
| 7105 | } |
| 7106 | const tflite::SqueezeOptions *builtin_options_as_SqueezeOptions() const { |
| 7107 | return builtin_options_type() == tflite::BuiltinOptions_SqueezeOptions ? static_cast<const tflite::SqueezeOptions *>(builtin_options()) : nullptr; |
| 7108 | } |
| 7109 | const tflite::SequenceRNNOptions *builtin_options_as_SequenceRNNOptions() const { |
| 7110 | return builtin_options_type() == tflite::BuiltinOptions_SequenceRNNOptions ? static_cast<const tflite::SequenceRNNOptions *>(builtin_options()) : nullptr; |
| 7111 | } |
| 7112 | const tflite::StridedSliceOptions *builtin_options_as_StridedSliceOptions() const { |
| 7113 | return builtin_options_type() == tflite::BuiltinOptions_StridedSliceOptions ? static_cast<const tflite::StridedSliceOptions *>(builtin_options()) : nullptr; |
| 7114 | } |
| 7115 | const tflite::ExpOptions *builtin_options_as_ExpOptions() const { |
| 7116 | return builtin_options_type() == tflite::BuiltinOptions_ExpOptions ? static_cast<const tflite::ExpOptions *>(builtin_options()) : nullptr; |
| 7117 | } |
| 7118 | const tflite::TopKV2Options *builtin_options_as_TopKV2Options() const { |
| 7119 | return builtin_options_type() == tflite::BuiltinOptions_TopKV2Options ? static_cast<const tflite::TopKV2Options *>(builtin_options()) : nullptr; |
| 7120 | } |
| 7121 | const tflite::SplitOptions *builtin_options_as_SplitOptions() const { |
| 7122 | return builtin_options_type() == tflite::BuiltinOptions_SplitOptions ? static_cast<const tflite::SplitOptions *>(builtin_options()) : nullptr; |
| 7123 | } |
| 7124 | const tflite::LogSoftmaxOptions *builtin_options_as_LogSoftmaxOptions() const { |
| 7125 | return builtin_options_type() == tflite::BuiltinOptions_LogSoftmaxOptions ? static_cast<const tflite::LogSoftmaxOptions *>(builtin_options()) : nullptr; |
| 7126 | } |
| 7127 | const tflite::CastOptions *builtin_options_as_CastOptions() const { |
| 7128 | return builtin_options_type() == tflite::BuiltinOptions_CastOptions ? static_cast<const tflite::CastOptions *>(builtin_options()) : nullptr; |
| 7129 | } |
| 7130 | const tflite::DequantizeOptions *builtin_options_as_DequantizeOptions() const { |
| 7131 | return builtin_options_type() == tflite::BuiltinOptions_DequantizeOptions ? static_cast<const tflite::DequantizeOptions *>(builtin_options()) : nullptr; |
| 7132 | } |
| 7133 | const tflite::MaximumMinimumOptions *builtin_options_as_MaximumMinimumOptions() const { |
| 7134 | return builtin_options_type() == tflite::BuiltinOptions_MaximumMinimumOptions ? static_cast<const tflite::MaximumMinimumOptions *>(builtin_options()) : nullptr; |
| 7135 | } |
| 7136 | const tflite::ArgMaxOptions *builtin_options_as_ArgMaxOptions() const { |
| 7137 | return builtin_options_type() == tflite::BuiltinOptions_ArgMaxOptions ? static_cast<const tflite::ArgMaxOptions *>(builtin_options()) : nullptr; |
| 7138 | } |
| 7139 | const tflite::LessOptions *builtin_options_as_LessOptions() const { |
| 7140 | return builtin_options_type() == tflite::BuiltinOptions_LessOptions ? static_cast<const tflite::LessOptions *>(builtin_options()) : nullptr; |
| 7141 | } |
| 7142 | const tflite::NegOptions *builtin_options_as_NegOptions() const { |
| 7143 | return builtin_options_type() == tflite::BuiltinOptions_NegOptions ? static_cast<const tflite::NegOptions *>(builtin_options()) : nullptr; |
| 7144 | } |
| 7145 | const tflite::PadV2Options *builtin_options_as_PadV2Options() const { |
| 7146 | return builtin_options_type() == tflite::BuiltinOptions_PadV2Options ? static_cast<const tflite::PadV2Options *>(builtin_options()) : nullptr; |
| 7147 | } |
| 7148 | const tflite::GreaterOptions *builtin_options_as_GreaterOptions() const { |
| 7149 | return builtin_options_type() == tflite::BuiltinOptions_GreaterOptions ? static_cast<const tflite::GreaterOptions *>(builtin_options()) : nullptr; |
| 7150 | } |
| 7151 | const tflite::GreaterEqualOptions *builtin_options_as_GreaterEqualOptions() const { |
| 7152 | return builtin_options_type() == tflite::BuiltinOptions_GreaterEqualOptions ? static_cast<const tflite::GreaterEqualOptions *>(builtin_options()) : nullptr; |
| 7153 | } |
| 7154 | const tflite::LessEqualOptions *builtin_options_as_LessEqualOptions() const { |
| 7155 | return builtin_options_type() == tflite::BuiltinOptions_LessEqualOptions ? static_cast<const tflite::LessEqualOptions *>(builtin_options()) : nullptr; |
| 7156 | } |
| 7157 | const tflite::SelectOptions *builtin_options_as_SelectOptions() const { |
| 7158 | return builtin_options_type() == tflite::BuiltinOptions_SelectOptions ? static_cast<const tflite::SelectOptions *>(builtin_options()) : nullptr; |
| 7159 | } |
| 7160 | const tflite::SliceOptions *builtin_options_as_SliceOptions() const { |
| 7161 | return builtin_options_type() == tflite::BuiltinOptions_SliceOptions ? static_cast<const tflite::SliceOptions *>(builtin_options()) : nullptr; |
| 7162 | } |
| 7163 | const tflite::TransposeConvOptions *builtin_options_as_TransposeConvOptions() const { |
| 7164 | return builtin_options_type() == tflite::BuiltinOptions_TransposeConvOptions ? static_cast<const tflite::TransposeConvOptions *>(builtin_options()) : nullptr; |
| 7165 | } |
| 7166 | const tflite::SparseToDenseOptions *builtin_options_as_SparseToDenseOptions() const { |
| 7167 | return builtin_options_type() == tflite::BuiltinOptions_SparseToDenseOptions ? static_cast<const tflite::SparseToDenseOptions *>(builtin_options()) : nullptr; |
| 7168 | } |
| 7169 | const tflite::TileOptions *builtin_options_as_TileOptions() const { |
| 7170 | return builtin_options_type() == tflite::BuiltinOptions_TileOptions ? static_cast<const tflite::TileOptions *>(builtin_options()) : nullptr; |
| 7171 | } |
| 7172 | const tflite::ExpandDimsOptions *builtin_options_as_ExpandDimsOptions() const { |
| 7173 | return builtin_options_type() == tflite::BuiltinOptions_ExpandDimsOptions ? static_cast<const tflite::ExpandDimsOptions *>(builtin_options()) : nullptr; |
| 7174 | } |
| 7175 | const tflite::EqualOptions *builtin_options_as_EqualOptions() const { |
| 7176 | return builtin_options_type() == tflite::BuiltinOptions_EqualOptions ? static_cast<const tflite::EqualOptions *>(builtin_options()) : nullptr; |
| 7177 | } |
| 7178 | const tflite::NotEqualOptions *builtin_options_as_NotEqualOptions() const { |
| 7179 | return builtin_options_type() == tflite::BuiltinOptions_NotEqualOptions ? static_cast<const tflite::NotEqualOptions *>(builtin_options()) : nullptr; |
| 7180 | } |
| 7181 | const tflite::ShapeOptions *builtin_options_as_ShapeOptions() const { |
| 7182 | return builtin_options_type() == tflite::BuiltinOptions_ShapeOptions ? static_cast<const tflite::ShapeOptions *>(builtin_options()) : nullptr; |
| 7183 | } |
| 7184 | const tflite::PowOptions *builtin_options_as_PowOptions() const { |
| 7185 | return builtin_options_type() == tflite::BuiltinOptions_PowOptions ? static_cast<const tflite::PowOptions *>(builtin_options()) : nullptr; |
| 7186 | } |
| 7187 | const tflite::ArgMinOptions *builtin_options_as_ArgMinOptions() const { |
| 7188 | return builtin_options_type() == tflite::BuiltinOptions_ArgMinOptions ? static_cast<const tflite::ArgMinOptions *>(builtin_options()) : nullptr; |
| 7189 | } |
| 7190 | const tflite::FakeQuantOptions *builtin_options_as_FakeQuantOptions() const { |
| 7191 | return builtin_options_type() == tflite::BuiltinOptions_FakeQuantOptions ? static_cast<const tflite::FakeQuantOptions *>(builtin_options()) : nullptr; |
| 7192 | } |
| 7193 | const tflite::PackOptions *builtin_options_as_PackOptions() const { |
| 7194 | return builtin_options_type() == tflite::BuiltinOptions_PackOptions ? static_cast<const tflite::PackOptions *>(builtin_options()) : nullptr; |
| 7195 | } |
| 7196 | const tflite::LogicalOrOptions *builtin_options_as_LogicalOrOptions() const { |
| 7197 | return builtin_options_type() == tflite::BuiltinOptions_LogicalOrOptions ? static_cast<const tflite::LogicalOrOptions *>(builtin_options()) : nullptr; |
| 7198 | } |
| 7199 | const tflite::OneHotOptions *builtin_options_as_OneHotOptions() const { |
| 7200 | return builtin_options_type() == tflite::BuiltinOptions_OneHotOptions ? static_cast<const tflite::OneHotOptions *>(builtin_options()) : nullptr; |
| 7201 | } |
| 7202 | const tflite::LogicalAndOptions *builtin_options_as_LogicalAndOptions() const { |
| 7203 | return builtin_options_type() == tflite::BuiltinOptions_LogicalAndOptions ? static_cast<const tflite::LogicalAndOptions *>(builtin_options()) : nullptr; |
| 7204 | } |
| 7205 | const tflite::LogicalNotOptions *builtin_options_as_LogicalNotOptions() const { |
| 7206 | return builtin_options_type() == tflite::BuiltinOptions_LogicalNotOptions ? static_cast<const tflite::LogicalNotOptions *>(builtin_options()) : nullptr; |
| 7207 | } |
| 7208 | const tflite::UnpackOptions *builtin_options_as_UnpackOptions() const { |
| 7209 | return builtin_options_type() == tflite::BuiltinOptions_UnpackOptions ? static_cast<const tflite::UnpackOptions *>(builtin_options()) : nullptr; |
| 7210 | } |
| 7211 | const tflite::FloorDivOptions *builtin_options_as_FloorDivOptions() const { |
| 7212 | return builtin_options_type() == tflite::BuiltinOptions_FloorDivOptions ? static_cast<const tflite::FloorDivOptions *>(builtin_options()) : nullptr; |
| 7213 | } |
| 7214 | const tflite::SquareOptions *builtin_options_as_SquareOptions() const { |
| 7215 | return builtin_options_type() == tflite::BuiltinOptions_SquareOptions ? static_cast<const tflite::SquareOptions *>(builtin_options()) : nullptr; |
| 7216 | } |
| 7217 | const tflite::ZerosLikeOptions *builtin_options_as_ZerosLikeOptions() const { |
| 7218 | return builtin_options_type() == tflite::BuiltinOptions_ZerosLikeOptions ? static_cast<const tflite::ZerosLikeOptions *>(builtin_options()) : nullptr; |
| 7219 | } |
| 7220 | const tflite::FillOptions *builtin_options_as_FillOptions() const { |
| 7221 | return builtin_options_type() == tflite::BuiltinOptions_FillOptions ? static_cast<const tflite::FillOptions *>(builtin_options()) : nullptr; |
| 7222 | } |
| 7223 | const tflite::BidirectionalSequenceLSTMOptions *builtin_options_as_BidirectionalSequenceLSTMOptions() const { |
| 7224 | return builtin_options_type() == tflite::BuiltinOptions_BidirectionalSequenceLSTMOptions ? static_cast<const tflite::BidirectionalSequenceLSTMOptions *>(builtin_options()) : nullptr; |
| 7225 | } |
| 7226 | const tflite::BidirectionalSequenceRNNOptions *builtin_options_as_BidirectionalSequenceRNNOptions() const { |
| 7227 | return builtin_options_type() == tflite::BuiltinOptions_BidirectionalSequenceRNNOptions ? static_cast<const tflite::BidirectionalSequenceRNNOptions *>(builtin_options()) : nullptr; |
| 7228 | } |
| 7229 | const tflite::UnidirectionalSequenceLSTMOptions *builtin_options_as_UnidirectionalSequenceLSTMOptions() const { |
| 7230 | return builtin_options_type() == tflite::BuiltinOptions_UnidirectionalSequenceLSTMOptions ? static_cast<const tflite::UnidirectionalSequenceLSTMOptions *>(builtin_options()) : nullptr; |
| 7231 | } |
| 7232 | const tflite::FloorModOptions *builtin_options_as_FloorModOptions() const { |
| 7233 | return builtin_options_type() == tflite::BuiltinOptions_FloorModOptions ? static_cast<const tflite::FloorModOptions *>(builtin_options()) : nullptr; |
| 7234 | } |
| 7235 | const tflite::RangeOptions *builtin_options_as_RangeOptions() const { |
| 7236 | return builtin_options_type() == tflite::BuiltinOptions_RangeOptions ? static_cast<const tflite::RangeOptions *>(builtin_options()) : nullptr; |
| 7237 | } |
| 7238 | const tflite::ResizeNearestNeighborOptions *builtin_options_as_ResizeNearestNeighborOptions() const { |
| 7239 | return builtin_options_type() == tflite::BuiltinOptions_ResizeNearestNeighborOptions ? static_cast<const tflite::ResizeNearestNeighborOptions *>(builtin_options()) : nullptr; |
| 7240 | } |
| 7241 | const tflite::LeakyReluOptions *builtin_options_as_LeakyReluOptions() const { |
| 7242 | return builtin_options_type() == tflite::BuiltinOptions_LeakyReluOptions ? static_cast<const tflite::LeakyReluOptions *>(builtin_options()) : nullptr; |
| 7243 | } |
| 7244 | const tflite::SquaredDifferenceOptions *builtin_options_as_SquaredDifferenceOptions() const { |
| 7245 | return builtin_options_type() == tflite::BuiltinOptions_SquaredDifferenceOptions ? static_cast<const tflite::SquaredDifferenceOptions *>(builtin_options()) : nullptr; |
| 7246 | } |
| 7247 | const tflite::MirrorPadOptions *builtin_options_as_MirrorPadOptions() const { |
| 7248 | return builtin_options_type() == tflite::BuiltinOptions_MirrorPadOptions ? static_cast<const tflite::MirrorPadOptions *>(builtin_options()) : nullptr; |
| 7249 | } |
| 7250 | const tflite::AbsOptions *builtin_options_as_AbsOptions() const { |
| 7251 | return builtin_options_type() == tflite::BuiltinOptions_AbsOptions ? static_cast<const tflite::AbsOptions *>(builtin_options()) : nullptr; |
| 7252 | } |
| 7253 | const tflite::SplitVOptions *builtin_options_as_SplitVOptions() const { |
| 7254 | return builtin_options_type() == tflite::BuiltinOptions_SplitVOptions ? static_cast<const tflite::SplitVOptions *>(builtin_options()) : nullptr; |
| 7255 | } |
| 7256 | const tflite::UniqueOptions *builtin_options_as_UniqueOptions() const { |
| 7257 | return builtin_options_type() == tflite::BuiltinOptions_UniqueOptions ? static_cast<const tflite::UniqueOptions *>(builtin_options()) : nullptr; |
| 7258 | } |
| 7259 | const tflite::ReverseV2Options *builtin_options_as_ReverseV2Options() const { |
| 7260 | return builtin_options_type() == tflite::BuiltinOptions_ReverseV2Options ? static_cast<const tflite::ReverseV2Options *>(builtin_options()) : nullptr; |
| 7261 | } |
| 7262 | const tflite::AddNOptions *builtin_options_as_AddNOptions() const { |
| 7263 | return builtin_options_type() == tflite::BuiltinOptions_AddNOptions ? static_cast<const tflite::AddNOptions *>(builtin_options()) : nullptr; |
| 7264 | } |
| 7265 | const tflite::GatherNdOptions *builtin_options_as_GatherNdOptions() const { |
| 7266 | return builtin_options_type() == tflite::BuiltinOptions_GatherNdOptions ? static_cast<const tflite::GatherNdOptions *>(builtin_options()) : nullptr; |
| 7267 | } |
| 7268 | const tflite::CosOptions *builtin_options_as_CosOptions() const { |
| 7269 | return builtin_options_type() == tflite::BuiltinOptions_CosOptions ? static_cast<const tflite::CosOptions *>(builtin_options()) : nullptr; |
| 7270 | } |
| 7271 | const tflite::WhereOptions *builtin_options_as_WhereOptions() const { |
| 7272 | return builtin_options_type() == tflite::BuiltinOptions_WhereOptions ? static_cast<const tflite::WhereOptions *>(builtin_options()) : nullptr; |
| 7273 | } |
| 7274 | const tflite::RankOptions *builtin_options_as_RankOptions() const { |
| 7275 | return builtin_options_type() == tflite::BuiltinOptions_RankOptions ? static_cast<const tflite::RankOptions *>(builtin_options()) : nullptr; |
| 7276 | } |
| 7277 | const tflite::ReverseSequenceOptions *builtin_options_as_ReverseSequenceOptions() const { |
| 7278 | return builtin_options_type() == tflite::BuiltinOptions_ReverseSequenceOptions ? static_cast<const tflite::ReverseSequenceOptions *>(builtin_options()) : nullptr; |
| 7279 | } |
| 7280 | const tflite::MatrixDiagOptions *builtin_options_as_MatrixDiagOptions() const { |
| 7281 | return builtin_options_type() == tflite::BuiltinOptions_MatrixDiagOptions ? static_cast<const tflite::MatrixDiagOptions *>(builtin_options()) : nullptr; |
| 7282 | } |
| 7283 | const tflite::QuantizeOptions *builtin_options_as_QuantizeOptions() const { |
| 7284 | return builtin_options_type() == tflite::BuiltinOptions_QuantizeOptions ? static_cast<const tflite::QuantizeOptions *>(builtin_options()) : nullptr; |
| 7285 | } |
| 7286 | const tflite::MatrixSetDiagOptions *builtin_options_as_MatrixSetDiagOptions() const { |
| 7287 | return builtin_options_type() == tflite::BuiltinOptions_MatrixSetDiagOptions ? static_cast<const tflite::MatrixSetDiagOptions *>(builtin_options()) : nullptr; |
| 7288 | } |
| 7289 | const tflite::HardSwishOptions *builtin_options_as_HardSwishOptions() const { |
| 7290 | return builtin_options_type() == tflite::BuiltinOptions_HardSwishOptions ? static_cast<const tflite::HardSwishOptions *>(builtin_options()) : nullptr; |
| 7291 | } |
| 7292 | const tflite::IfOptions *builtin_options_as_IfOptions() const { |
| 7293 | return builtin_options_type() == tflite::BuiltinOptions_IfOptions ? static_cast<const tflite::IfOptions *>(builtin_options()) : nullptr; |
| 7294 | } |
| 7295 | const tflite::WhileOptions *builtin_options_as_WhileOptions() const { |
| 7296 | return builtin_options_type() == tflite::BuiltinOptions_WhileOptions ? static_cast<const tflite::WhileOptions *>(builtin_options()) : nullptr; |
| 7297 | } |
| 7298 | const tflite::DepthToSpaceOptions *builtin_options_as_DepthToSpaceOptions() const { |
| 7299 | return builtin_options_type() == tflite::BuiltinOptions_DepthToSpaceOptions ? static_cast<const tflite::DepthToSpaceOptions *>(builtin_options()) : nullptr; |
| 7300 | } |
| 7301 | const tflite::NonMaxSuppressionV4Options *builtin_options_as_NonMaxSuppressionV4Options() const { |
| 7302 | return builtin_options_type() == tflite::BuiltinOptions_NonMaxSuppressionV4Options ? static_cast<const tflite::NonMaxSuppressionV4Options *>(builtin_options()) : nullptr; |
| 7303 | } |
| 7304 | const tflite::NonMaxSuppressionV5Options *builtin_options_as_NonMaxSuppressionV5Options() const { |
| 7305 | return builtin_options_type() == tflite::BuiltinOptions_NonMaxSuppressionV5Options ? static_cast<const tflite::NonMaxSuppressionV5Options *>(builtin_options()) : nullptr; |
| 7306 | } |
| 7307 | const tflite::ScatterNdOptions *builtin_options_as_ScatterNdOptions() const { |
| 7308 | return builtin_options_type() == tflite::BuiltinOptions_ScatterNdOptions ? static_cast<const tflite::ScatterNdOptions *>(builtin_options()) : nullptr; |
| 7309 | } |
| 7310 | const tflite::SelectV2Options *builtin_options_as_SelectV2Options() const { |
| 7311 | return builtin_options_type() == tflite::BuiltinOptions_SelectV2Options ? static_cast<const tflite::SelectV2Options *>(builtin_options()) : nullptr; |
| 7312 | } |
| 7313 | const tflite::DensifyOptions *builtin_options_as_DensifyOptions() const { |
| 7314 | return builtin_options_type() == tflite::BuiltinOptions_DensifyOptions ? static_cast<const tflite::DensifyOptions *>(builtin_options()) : nullptr; |
| 7315 | } |
| 7316 | const tflite::SegmentSumOptions *builtin_options_as_SegmentSumOptions() const { |
| 7317 | return builtin_options_type() == tflite::BuiltinOptions_SegmentSumOptions ? static_cast<const tflite::SegmentSumOptions *>(builtin_options()) : nullptr; |
| 7318 | } |
| 7319 | const tflite::BatchMatMulOptions *builtin_options_as_BatchMatMulOptions() const { |
| 7320 | return builtin_options_type() == tflite::BuiltinOptions_BatchMatMulOptions ? static_cast<const tflite::BatchMatMulOptions *>(builtin_options()) : nullptr; |
| 7321 | } |
| 7322 | const flatbuffers::Vector<uint8_t> *custom_options() const { |
| 7323 | return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_CUSTOM_OPTIONS); |
| 7324 | } |
| 7325 | tflite::CustomOptionsFormat custom_options_format() const { |
| 7326 | return static_cast<tflite::CustomOptionsFormat>(GetField<int8_t>(VT_CUSTOM_OPTIONS_FORMAT, 0)); |
| 7327 | } |
| 7328 | const flatbuffers::Vector<uint8_t> *mutating_variable_inputs() const { |
| 7329 | return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_MUTATING_VARIABLE_INPUTS); |
| 7330 | } |
| 7331 | const flatbuffers::Vector<int32_t> *intermediates() const { |
| 7332 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_INTERMEDIATES); |
| 7333 | } |
| 7334 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 7335 | return VerifyTableStart(verifier) && |
| 7336 | VerifyField<uint32_t>(verifier, VT_OPCODE_INDEX) && |
| 7337 | VerifyOffset(verifier, VT_INPUTS) && |
| 7338 | verifier.VerifyVector(inputs()) && |
| 7339 | VerifyOffset(verifier, VT_OUTPUTS) && |
| 7340 | verifier.VerifyVector(outputs()) && |
| 7341 | VerifyField<uint8_t>(verifier, VT_BUILTIN_OPTIONS_TYPE) && |
| 7342 | VerifyOffset(verifier, VT_BUILTIN_OPTIONS) && |
| 7343 | VerifyBuiltinOptions(verifier, builtin_options(), builtin_options_type()) && |
| 7344 | VerifyOffset(verifier, VT_CUSTOM_OPTIONS) && |
| 7345 | verifier.VerifyVector(custom_options()) && |
| 7346 | VerifyField<int8_t>(verifier, VT_CUSTOM_OPTIONS_FORMAT) && |
| 7347 | VerifyOffset(verifier, VT_MUTATING_VARIABLE_INPUTS) && |
| 7348 | verifier.VerifyVector(mutating_variable_inputs()) && |
| 7349 | VerifyOffset(verifier, VT_INTERMEDIATES) && |
| 7350 | verifier.VerifyVector(intermediates()) && |
| 7351 | verifier.EndTable(); |
| 7352 | } |
| 7353 | }; |
| 7354 | |
| 7355 | template<> inline const tflite::Conv2DOptions *Operator::builtin_options_as<tflite::Conv2DOptions>() const { |
| 7356 | return builtin_options_as_Conv2DOptions(); |
| 7357 | } |
| 7358 | |
| 7359 | template<> inline const tflite::DepthwiseConv2DOptions *Operator::builtin_options_as<tflite::DepthwiseConv2DOptions>() const { |
| 7360 | return builtin_options_as_DepthwiseConv2DOptions(); |
| 7361 | } |
| 7362 | |
| 7363 | template<> inline const tflite::ConcatEmbeddingsOptions *Operator::builtin_options_as<tflite::ConcatEmbeddingsOptions>() const { |
| 7364 | return builtin_options_as_ConcatEmbeddingsOptions(); |
| 7365 | } |
| 7366 | |
| 7367 | template<> inline const tflite::LSHProjectionOptions *Operator::builtin_options_as<tflite::LSHProjectionOptions>() const { |
| 7368 | return builtin_options_as_LSHProjectionOptions(); |
| 7369 | } |
| 7370 | |
| 7371 | template<> inline const tflite::Pool2DOptions *Operator::builtin_options_as<tflite::Pool2DOptions>() const { |
| 7372 | return builtin_options_as_Pool2DOptions(); |
| 7373 | } |
| 7374 | |
| 7375 | template<> inline const tflite::SVDFOptions *Operator::builtin_options_as<tflite::SVDFOptions>() const { |
| 7376 | return builtin_options_as_SVDFOptions(); |
| 7377 | } |
| 7378 | |
| 7379 | template<> inline const tflite::RNNOptions *Operator::builtin_options_as<tflite::RNNOptions>() const { |
| 7380 | return builtin_options_as_RNNOptions(); |
| 7381 | } |
| 7382 | |
| 7383 | template<> inline const tflite::FullyConnectedOptions *Operator::builtin_options_as<tflite::FullyConnectedOptions>() const { |
| 7384 | return builtin_options_as_FullyConnectedOptions(); |
| 7385 | } |
| 7386 | |
| 7387 | template<> inline const tflite::SoftmaxOptions *Operator::builtin_options_as<tflite::SoftmaxOptions>() const { |
| 7388 | return builtin_options_as_SoftmaxOptions(); |
| 7389 | } |
| 7390 | |
| 7391 | template<> inline const tflite::ConcatenationOptions *Operator::builtin_options_as<tflite::ConcatenationOptions>() const { |
| 7392 | return builtin_options_as_ConcatenationOptions(); |
| 7393 | } |
| 7394 | |
| 7395 | template<> inline const tflite::AddOptions *Operator::builtin_options_as<tflite::AddOptions>() const { |
| 7396 | return builtin_options_as_AddOptions(); |
| 7397 | } |
| 7398 | |
| 7399 | template<> inline const tflite::L2NormOptions *Operator::builtin_options_as<tflite::L2NormOptions>() const { |
| 7400 | return builtin_options_as_L2NormOptions(); |
| 7401 | } |
| 7402 | |
| 7403 | template<> inline const tflite::LocalResponseNormalizationOptions *Operator::builtin_options_as<tflite::LocalResponseNormalizationOptions>() const { |
| 7404 | return builtin_options_as_LocalResponseNormalizationOptions(); |
| 7405 | } |
| 7406 | |
| 7407 | template<> inline const tflite::LSTMOptions *Operator::builtin_options_as<tflite::LSTMOptions>() const { |
| 7408 | return builtin_options_as_LSTMOptions(); |
| 7409 | } |
| 7410 | |
| 7411 | template<> inline const tflite::ResizeBilinearOptions *Operator::builtin_options_as<tflite::ResizeBilinearOptions>() const { |
| 7412 | return builtin_options_as_ResizeBilinearOptions(); |
| 7413 | } |
| 7414 | |
| 7415 | template<> inline const tflite::CallOptions *Operator::builtin_options_as<tflite::CallOptions>() const { |
| 7416 | return builtin_options_as_CallOptions(); |
| 7417 | } |
| 7418 | |
| 7419 | template<> inline const tflite::ReshapeOptions *Operator::builtin_options_as<tflite::ReshapeOptions>() const { |
| 7420 | return builtin_options_as_ReshapeOptions(); |
| 7421 | } |
| 7422 | |
| 7423 | template<> inline const tflite::SkipGramOptions *Operator::builtin_options_as<tflite::SkipGramOptions>() const { |
| 7424 | return builtin_options_as_SkipGramOptions(); |
| 7425 | } |
| 7426 | |
| 7427 | template<> inline const tflite::SpaceToDepthOptions *Operator::builtin_options_as<tflite::SpaceToDepthOptions>() const { |
| 7428 | return builtin_options_as_SpaceToDepthOptions(); |
| 7429 | } |
| 7430 | |
| 7431 | template<> inline const tflite::EmbeddingLookupSparseOptions *Operator::builtin_options_as<tflite::EmbeddingLookupSparseOptions>() const { |
| 7432 | return builtin_options_as_EmbeddingLookupSparseOptions(); |
| 7433 | } |
| 7434 | |
| 7435 | template<> inline const tflite::MulOptions *Operator::builtin_options_as<tflite::MulOptions>() const { |
| 7436 | return builtin_options_as_MulOptions(); |
| 7437 | } |
| 7438 | |
| 7439 | template<> inline const tflite::PadOptions *Operator::builtin_options_as<tflite::PadOptions>() const { |
| 7440 | return builtin_options_as_PadOptions(); |
| 7441 | } |
| 7442 | |
| 7443 | template<> inline const tflite::GatherOptions *Operator::builtin_options_as<tflite::GatherOptions>() const { |
| 7444 | return builtin_options_as_GatherOptions(); |
| 7445 | } |
| 7446 | |
| 7447 | template<> inline const tflite::BatchToSpaceNDOptions *Operator::builtin_options_as<tflite::BatchToSpaceNDOptions>() const { |
| 7448 | return builtin_options_as_BatchToSpaceNDOptions(); |
| 7449 | } |
| 7450 | |
| 7451 | template<> inline const tflite::SpaceToBatchNDOptions *Operator::builtin_options_as<tflite::SpaceToBatchNDOptions>() const { |
| 7452 | return builtin_options_as_SpaceToBatchNDOptions(); |
| 7453 | } |
| 7454 | |
| 7455 | template<> inline const tflite::TransposeOptions *Operator::builtin_options_as<tflite::TransposeOptions>() const { |
| 7456 | return builtin_options_as_TransposeOptions(); |
| 7457 | } |
| 7458 | |
| 7459 | template<> inline const tflite::ReducerOptions *Operator::builtin_options_as<tflite::ReducerOptions>() const { |
| 7460 | return builtin_options_as_ReducerOptions(); |
| 7461 | } |
| 7462 | |
| 7463 | template<> inline const tflite::SubOptions *Operator::builtin_options_as<tflite::SubOptions>() const { |
| 7464 | return builtin_options_as_SubOptions(); |
| 7465 | } |
| 7466 | |
| 7467 | template<> inline const tflite::DivOptions *Operator::builtin_options_as<tflite::DivOptions>() const { |
| 7468 | return builtin_options_as_DivOptions(); |
| 7469 | } |
| 7470 | |
| 7471 | template<> inline const tflite::SqueezeOptions *Operator::builtin_options_as<tflite::SqueezeOptions>() const { |
| 7472 | return builtin_options_as_SqueezeOptions(); |
| 7473 | } |
| 7474 | |
| 7475 | template<> inline const tflite::SequenceRNNOptions *Operator::builtin_options_as<tflite::SequenceRNNOptions>() const { |
| 7476 | return builtin_options_as_SequenceRNNOptions(); |
| 7477 | } |
| 7478 | |
| 7479 | template<> inline const tflite::StridedSliceOptions *Operator::builtin_options_as<tflite::StridedSliceOptions>() const { |
| 7480 | return builtin_options_as_StridedSliceOptions(); |
| 7481 | } |
| 7482 | |
| 7483 | template<> inline const tflite::ExpOptions *Operator::builtin_options_as<tflite::ExpOptions>() const { |
| 7484 | return builtin_options_as_ExpOptions(); |
| 7485 | } |
| 7486 | |
| 7487 | template<> inline const tflite::TopKV2Options *Operator::builtin_options_as<tflite::TopKV2Options>() const { |
| 7488 | return builtin_options_as_TopKV2Options(); |
| 7489 | } |
| 7490 | |
| 7491 | template<> inline const tflite::SplitOptions *Operator::builtin_options_as<tflite::SplitOptions>() const { |
| 7492 | return builtin_options_as_SplitOptions(); |
| 7493 | } |
| 7494 | |
| 7495 | template<> inline const tflite::LogSoftmaxOptions *Operator::builtin_options_as<tflite::LogSoftmaxOptions>() const { |
| 7496 | return builtin_options_as_LogSoftmaxOptions(); |
| 7497 | } |
| 7498 | |
| 7499 | template<> inline const tflite::CastOptions *Operator::builtin_options_as<tflite::CastOptions>() const { |
| 7500 | return builtin_options_as_CastOptions(); |
| 7501 | } |
| 7502 | |
| 7503 | template<> inline const tflite::DequantizeOptions *Operator::builtin_options_as<tflite::DequantizeOptions>() const { |
| 7504 | return builtin_options_as_DequantizeOptions(); |
| 7505 | } |
| 7506 | |
| 7507 | template<> inline const tflite::MaximumMinimumOptions *Operator::builtin_options_as<tflite::MaximumMinimumOptions>() const { |
| 7508 | return builtin_options_as_MaximumMinimumOptions(); |
| 7509 | } |
| 7510 | |
| 7511 | template<> inline const tflite::ArgMaxOptions *Operator::builtin_options_as<tflite::ArgMaxOptions>() const { |
| 7512 | return builtin_options_as_ArgMaxOptions(); |
| 7513 | } |
| 7514 | |
| 7515 | template<> inline const tflite::LessOptions *Operator::builtin_options_as<tflite::LessOptions>() const { |
| 7516 | return builtin_options_as_LessOptions(); |
| 7517 | } |
| 7518 | |
| 7519 | template<> inline const tflite::NegOptions *Operator::builtin_options_as<tflite::NegOptions>() const { |
| 7520 | return builtin_options_as_NegOptions(); |
| 7521 | } |
| 7522 | |
| 7523 | template<> inline const tflite::PadV2Options *Operator::builtin_options_as<tflite::PadV2Options>() const { |
| 7524 | return builtin_options_as_PadV2Options(); |
| 7525 | } |
| 7526 | |
| 7527 | template<> inline const tflite::GreaterOptions *Operator::builtin_options_as<tflite::GreaterOptions>() const { |
| 7528 | return builtin_options_as_GreaterOptions(); |
| 7529 | } |
| 7530 | |
| 7531 | template<> inline const tflite::GreaterEqualOptions *Operator::builtin_options_as<tflite::GreaterEqualOptions>() const { |
| 7532 | return builtin_options_as_GreaterEqualOptions(); |
| 7533 | } |
| 7534 | |
| 7535 | template<> inline const tflite::LessEqualOptions *Operator::builtin_options_as<tflite::LessEqualOptions>() const { |
| 7536 | return builtin_options_as_LessEqualOptions(); |
| 7537 | } |
| 7538 | |
| 7539 | template<> inline const tflite::SelectOptions *Operator::builtin_options_as<tflite::SelectOptions>() const { |
| 7540 | return builtin_options_as_SelectOptions(); |
| 7541 | } |
| 7542 | |
| 7543 | template<> inline const tflite::SliceOptions *Operator::builtin_options_as<tflite::SliceOptions>() const { |
| 7544 | return builtin_options_as_SliceOptions(); |
| 7545 | } |
| 7546 | |
| 7547 | template<> inline const tflite::TransposeConvOptions *Operator::builtin_options_as<tflite::TransposeConvOptions>() const { |
| 7548 | return builtin_options_as_TransposeConvOptions(); |
| 7549 | } |
| 7550 | |
| 7551 | template<> inline const tflite::SparseToDenseOptions *Operator::builtin_options_as<tflite::SparseToDenseOptions>() const { |
| 7552 | return builtin_options_as_SparseToDenseOptions(); |
| 7553 | } |
| 7554 | |
| 7555 | template<> inline const tflite::TileOptions *Operator::builtin_options_as<tflite::TileOptions>() const { |
| 7556 | return builtin_options_as_TileOptions(); |
| 7557 | } |
| 7558 | |
| 7559 | template<> inline const tflite::ExpandDimsOptions *Operator::builtin_options_as<tflite::ExpandDimsOptions>() const { |
| 7560 | return builtin_options_as_ExpandDimsOptions(); |
| 7561 | } |
| 7562 | |
| 7563 | template<> inline const tflite::EqualOptions *Operator::builtin_options_as<tflite::EqualOptions>() const { |
| 7564 | return builtin_options_as_EqualOptions(); |
| 7565 | } |
| 7566 | |
| 7567 | template<> inline const tflite::NotEqualOptions *Operator::builtin_options_as<tflite::NotEqualOptions>() const { |
| 7568 | return builtin_options_as_NotEqualOptions(); |
| 7569 | } |
| 7570 | |
| 7571 | template<> inline const tflite::ShapeOptions *Operator::builtin_options_as<tflite::ShapeOptions>() const { |
| 7572 | return builtin_options_as_ShapeOptions(); |
| 7573 | } |
| 7574 | |
| 7575 | template<> inline const tflite::PowOptions *Operator::builtin_options_as<tflite::PowOptions>() const { |
| 7576 | return builtin_options_as_PowOptions(); |
| 7577 | } |
| 7578 | |
| 7579 | template<> inline const tflite::ArgMinOptions *Operator::builtin_options_as<tflite::ArgMinOptions>() const { |
| 7580 | return builtin_options_as_ArgMinOptions(); |
| 7581 | } |
| 7582 | |
| 7583 | template<> inline const tflite::FakeQuantOptions *Operator::builtin_options_as<tflite::FakeQuantOptions>() const { |
| 7584 | return builtin_options_as_FakeQuantOptions(); |
| 7585 | } |
| 7586 | |
| 7587 | template<> inline const tflite::PackOptions *Operator::builtin_options_as<tflite::PackOptions>() const { |
| 7588 | return builtin_options_as_PackOptions(); |
| 7589 | } |
| 7590 | |
| 7591 | template<> inline const tflite::LogicalOrOptions *Operator::builtin_options_as<tflite::LogicalOrOptions>() const { |
| 7592 | return builtin_options_as_LogicalOrOptions(); |
| 7593 | } |
| 7594 | |
| 7595 | template<> inline const tflite::OneHotOptions *Operator::builtin_options_as<tflite::OneHotOptions>() const { |
| 7596 | return builtin_options_as_OneHotOptions(); |
| 7597 | } |
| 7598 | |
| 7599 | template<> inline const tflite::LogicalAndOptions *Operator::builtin_options_as<tflite::LogicalAndOptions>() const { |
| 7600 | return builtin_options_as_LogicalAndOptions(); |
| 7601 | } |
| 7602 | |
| 7603 | template<> inline const tflite::LogicalNotOptions *Operator::builtin_options_as<tflite::LogicalNotOptions>() const { |
| 7604 | return builtin_options_as_LogicalNotOptions(); |
| 7605 | } |
| 7606 | |
| 7607 | template<> inline const tflite::UnpackOptions *Operator::builtin_options_as<tflite::UnpackOptions>() const { |
| 7608 | return builtin_options_as_UnpackOptions(); |
| 7609 | } |
| 7610 | |
| 7611 | template<> inline const tflite::FloorDivOptions *Operator::builtin_options_as<tflite::FloorDivOptions>() const { |
| 7612 | return builtin_options_as_FloorDivOptions(); |
| 7613 | } |
| 7614 | |
| 7615 | template<> inline const tflite::SquareOptions *Operator::builtin_options_as<tflite::SquareOptions>() const { |
| 7616 | return builtin_options_as_SquareOptions(); |
| 7617 | } |
| 7618 | |
| 7619 | template<> inline const tflite::ZerosLikeOptions *Operator::builtin_options_as<tflite::ZerosLikeOptions>() const { |
| 7620 | return builtin_options_as_ZerosLikeOptions(); |
| 7621 | } |
| 7622 | |
| 7623 | template<> inline const tflite::FillOptions *Operator::builtin_options_as<tflite::FillOptions>() const { |
| 7624 | return builtin_options_as_FillOptions(); |
| 7625 | } |
| 7626 | |
| 7627 | template<> inline const tflite::BidirectionalSequenceLSTMOptions *Operator::builtin_options_as<tflite::BidirectionalSequenceLSTMOptions>() const { |
| 7628 | return builtin_options_as_BidirectionalSequenceLSTMOptions(); |
| 7629 | } |
| 7630 | |
| 7631 | template<> inline const tflite::BidirectionalSequenceRNNOptions *Operator::builtin_options_as<tflite::BidirectionalSequenceRNNOptions>() const { |
| 7632 | return builtin_options_as_BidirectionalSequenceRNNOptions(); |
| 7633 | } |
| 7634 | |
| 7635 | template<> inline const tflite::UnidirectionalSequenceLSTMOptions *Operator::builtin_options_as<tflite::UnidirectionalSequenceLSTMOptions>() const { |
| 7636 | return builtin_options_as_UnidirectionalSequenceLSTMOptions(); |
| 7637 | } |
| 7638 | |
| 7639 | template<> inline const tflite::FloorModOptions *Operator::builtin_options_as<tflite::FloorModOptions>() const { |
| 7640 | return builtin_options_as_FloorModOptions(); |
| 7641 | } |
| 7642 | |
| 7643 | template<> inline const tflite::RangeOptions *Operator::builtin_options_as<tflite::RangeOptions>() const { |
| 7644 | return builtin_options_as_RangeOptions(); |
| 7645 | } |
| 7646 | |
| 7647 | template<> inline const tflite::ResizeNearestNeighborOptions *Operator::builtin_options_as<tflite::ResizeNearestNeighborOptions>() const { |
| 7648 | return builtin_options_as_ResizeNearestNeighborOptions(); |
| 7649 | } |
| 7650 | |
| 7651 | template<> inline const tflite::LeakyReluOptions *Operator::builtin_options_as<tflite::LeakyReluOptions>() const { |
| 7652 | return builtin_options_as_LeakyReluOptions(); |
| 7653 | } |
| 7654 | |
| 7655 | template<> inline const tflite::SquaredDifferenceOptions *Operator::builtin_options_as<tflite::SquaredDifferenceOptions>() const { |
| 7656 | return builtin_options_as_SquaredDifferenceOptions(); |
| 7657 | } |
| 7658 | |
| 7659 | template<> inline const tflite::MirrorPadOptions *Operator::builtin_options_as<tflite::MirrorPadOptions>() const { |
| 7660 | return builtin_options_as_MirrorPadOptions(); |
| 7661 | } |
| 7662 | |
| 7663 | template<> inline const tflite::AbsOptions *Operator::builtin_options_as<tflite::AbsOptions>() const { |
| 7664 | return builtin_options_as_AbsOptions(); |
| 7665 | } |
| 7666 | |
| 7667 | template<> inline const tflite::SplitVOptions *Operator::builtin_options_as<tflite::SplitVOptions>() const { |
| 7668 | return builtin_options_as_SplitVOptions(); |
| 7669 | } |
| 7670 | |
| 7671 | template<> inline const tflite::UniqueOptions *Operator::builtin_options_as<tflite::UniqueOptions>() const { |
| 7672 | return builtin_options_as_UniqueOptions(); |
| 7673 | } |
| 7674 | |
| 7675 | template<> inline const tflite::ReverseV2Options *Operator::builtin_options_as<tflite::ReverseV2Options>() const { |
| 7676 | return builtin_options_as_ReverseV2Options(); |
| 7677 | } |
| 7678 | |
| 7679 | template<> inline const tflite::AddNOptions *Operator::builtin_options_as<tflite::AddNOptions>() const { |
| 7680 | return builtin_options_as_AddNOptions(); |
| 7681 | } |
| 7682 | |
| 7683 | template<> inline const tflite::GatherNdOptions *Operator::builtin_options_as<tflite::GatherNdOptions>() const { |
| 7684 | return builtin_options_as_GatherNdOptions(); |
| 7685 | } |
| 7686 | |
| 7687 | template<> inline const tflite::CosOptions *Operator::builtin_options_as<tflite::CosOptions>() const { |
| 7688 | return builtin_options_as_CosOptions(); |
| 7689 | } |
| 7690 | |
| 7691 | template<> inline const tflite::WhereOptions *Operator::builtin_options_as<tflite::WhereOptions>() const { |
| 7692 | return builtin_options_as_WhereOptions(); |
| 7693 | } |
| 7694 | |
| 7695 | template<> inline const tflite::RankOptions *Operator::builtin_options_as<tflite::RankOptions>() const { |
| 7696 | return builtin_options_as_RankOptions(); |
| 7697 | } |
| 7698 | |
| 7699 | template<> inline const tflite::ReverseSequenceOptions *Operator::builtin_options_as<tflite::ReverseSequenceOptions>() const { |
| 7700 | return builtin_options_as_ReverseSequenceOptions(); |
| 7701 | } |
| 7702 | |
| 7703 | template<> inline const tflite::MatrixDiagOptions *Operator::builtin_options_as<tflite::MatrixDiagOptions>() const { |
| 7704 | return builtin_options_as_MatrixDiagOptions(); |
| 7705 | } |
| 7706 | |
| 7707 | template<> inline const tflite::QuantizeOptions *Operator::builtin_options_as<tflite::QuantizeOptions>() const { |
| 7708 | return builtin_options_as_QuantizeOptions(); |
| 7709 | } |
| 7710 | |
| 7711 | template<> inline const tflite::MatrixSetDiagOptions *Operator::builtin_options_as<tflite::MatrixSetDiagOptions>() const { |
| 7712 | return builtin_options_as_MatrixSetDiagOptions(); |
| 7713 | } |
| 7714 | |
| 7715 | template<> inline const tflite::HardSwishOptions *Operator::builtin_options_as<tflite::HardSwishOptions>() const { |
| 7716 | return builtin_options_as_HardSwishOptions(); |
| 7717 | } |
| 7718 | |
| 7719 | template<> inline const tflite::IfOptions *Operator::builtin_options_as<tflite::IfOptions>() const { |
| 7720 | return builtin_options_as_IfOptions(); |
| 7721 | } |
| 7722 | |
| 7723 | template<> inline const tflite::WhileOptions *Operator::builtin_options_as<tflite::WhileOptions>() const { |
| 7724 | return builtin_options_as_WhileOptions(); |
| 7725 | } |
| 7726 | |
| 7727 | template<> inline const tflite::DepthToSpaceOptions *Operator::builtin_options_as<tflite::DepthToSpaceOptions>() const { |
| 7728 | return builtin_options_as_DepthToSpaceOptions(); |
| 7729 | } |
| 7730 | |
| 7731 | template<> inline const tflite::NonMaxSuppressionV4Options *Operator::builtin_options_as<tflite::NonMaxSuppressionV4Options>() const { |
| 7732 | return builtin_options_as_NonMaxSuppressionV4Options(); |
| 7733 | } |
| 7734 | |
| 7735 | template<> inline const tflite::NonMaxSuppressionV5Options *Operator::builtin_options_as<tflite::NonMaxSuppressionV5Options>() const { |
| 7736 | return builtin_options_as_NonMaxSuppressionV5Options(); |
| 7737 | } |
| 7738 | |
| 7739 | template<> inline const tflite::ScatterNdOptions *Operator::builtin_options_as<tflite::ScatterNdOptions>() const { |
| 7740 | return builtin_options_as_ScatterNdOptions(); |
| 7741 | } |
| 7742 | |
| 7743 | template<> inline const tflite::SelectV2Options *Operator::builtin_options_as<tflite::SelectV2Options>() const { |
| 7744 | return builtin_options_as_SelectV2Options(); |
| 7745 | } |
| 7746 | |
| 7747 | template<> inline const tflite::DensifyOptions *Operator::builtin_options_as<tflite::DensifyOptions>() const { |
| 7748 | return builtin_options_as_DensifyOptions(); |
| 7749 | } |
| 7750 | |
| 7751 | template<> inline const tflite::SegmentSumOptions *Operator::builtin_options_as<tflite::SegmentSumOptions>() const { |
| 7752 | return builtin_options_as_SegmentSumOptions(); |
| 7753 | } |
| 7754 | |
| 7755 | template<> inline const tflite::BatchMatMulOptions *Operator::builtin_options_as<tflite::BatchMatMulOptions>() const { |
| 7756 | return builtin_options_as_BatchMatMulOptions(); |
| 7757 | } |
| 7758 | |
| 7759 | struct OperatorBuilder { |
| 7760 | typedef Operator Table; |
| 7761 | flatbuffers::FlatBufferBuilder &fbb_; |
| 7762 | flatbuffers::uoffset_t start_; |
| 7763 | void add_opcode_index(uint32_t opcode_index) { |
| 7764 | fbb_.AddElement<uint32_t>(Operator::VT_OPCODE_INDEX, opcode_index, 0); |
| 7765 | } |
| 7766 | void add_inputs(flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputs) { |
| 7767 | fbb_.AddOffset(Operator::VT_INPUTS, inputs); |
| 7768 | } |
| 7769 | void add_outputs(flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputs) { |
| 7770 | fbb_.AddOffset(Operator::VT_OUTPUTS, outputs); |
| 7771 | } |
| 7772 | void add_builtin_options_type(tflite::BuiltinOptions builtin_options_type) { |
| 7773 | fbb_.AddElement<uint8_t>(Operator::VT_BUILTIN_OPTIONS_TYPE, static_cast<uint8_t>(builtin_options_type), 0); |
| 7774 | } |
| 7775 | void add_builtin_options(flatbuffers::Offset<void> builtin_options) { |
| 7776 | fbb_.AddOffset(Operator::VT_BUILTIN_OPTIONS, builtin_options); |
| 7777 | } |
| 7778 | void add_custom_options(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> custom_options) { |
| 7779 | fbb_.AddOffset(Operator::VT_CUSTOM_OPTIONS, custom_options); |
| 7780 | } |
| 7781 | void add_custom_options_format(tflite::CustomOptionsFormat custom_options_format) { |
| 7782 | fbb_.AddElement<int8_t>(Operator::VT_CUSTOM_OPTIONS_FORMAT, static_cast<int8_t>(custom_options_format), 0); |
| 7783 | } |
| 7784 | void add_mutating_variable_inputs(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> mutating_variable_inputs) { |
| 7785 | fbb_.AddOffset(Operator::VT_MUTATING_VARIABLE_INPUTS, mutating_variable_inputs); |
| 7786 | } |
| 7787 | void add_intermediates(flatbuffers::Offset<flatbuffers::Vector<int32_t>> intermediates) { |
| 7788 | fbb_.AddOffset(Operator::VT_INTERMEDIATES, intermediates); |
| 7789 | } |
| 7790 | explicit OperatorBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 7791 | : fbb_(_fbb) { |
| 7792 | start_ = fbb_.StartTable(); |
| 7793 | } |
| 7794 | flatbuffers::Offset<Operator> Finish() { |
| 7795 | const auto end = fbb_.EndTable(start_); |
| 7796 | auto o = flatbuffers::Offset<Operator>(end); |
| 7797 | return o; |
| 7798 | } |
| 7799 | }; |
| 7800 | |
| 7801 | inline flatbuffers::Offset<Operator> CreateOperator( |
| 7802 | flatbuffers::FlatBufferBuilder &_fbb, |
| 7803 | uint32_t opcode_index = 0, |
| 7804 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputs = 0, |
| 7805 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputs = 0, |
| 7806 | tflite::BuiltinOptions builtin_options_type = tflite::BuiltinOptions_NONE, |
| 7807 | flatbuffers::Offset<void> builtin_options = 0, |
| 7808 | flatbuffers::Offset<flatbuffers::Vector<uint8_t>> custom_options = 0, |
| 7809 | tflite::CustomOptionsFormat custom_options_format = tflite::CustomOptionsFormat_FLEXBUFFERS, |
| 7810 | flatbuffers::Offset<flatbuffers::Vector<uint8_t>> mutating_variable_inputs = 0, |
| 7811 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> intermediates = 0) { |
| 7812 | OperatorBuilder builder_(_fbb); |
| 7813 | builder_.add_intermediates(intermediates); |
| 7814 | builder_.add_mutating_variable_inputs(mutating_variable_inputs); |
| 7815 | builder_.add_custom_options(custom_options); |
| 7816 | builder_.add_builtin_options(builtin_options); |
| 7817 | builder_.add_outputs(outputs); |
| 7818 | builder_.add_inputs(inputs); |
| 7819 | builder_.add_opcode_index(opcode_index); |
| 7820 | builder_.add_custom_options_format(custom_options_format); |
| 7821 | builder_.add_builtin_options_type(builtin_options_type); |
| 7822 | return builder_.Finish(); |
| 7823 | } |
| 7824 | |
| 7825 | inline flatbuffers::Offset<Operator> CreateOperatorDirect( |
| 7826 | flatbuffers::FlatBufferBuilder &_fbb, |
| 7827 | uint32_t opcode_index = 0, |
| 7828 | const std::vector<int32_t> *inputs = nullptr, |
| 7829 | const std::vector<int32_t> *outputs = nullptr, |
| 7830 | tflite::BuiltinOptions builtin_options_type = tflite::BuiltinOptions_NONE, |
| 7831 | flatbuffers::Offset<void> builtin_options = 0, |
| 7832 | const std::vector<uint8_t> *custom_options = nullptr, |
| 7833 | tflite::CustomOptionsFormat custom_options_format = tflite::CustomOptionsFormat_FLEXBUFFERS, |
| 7834 | const std::vector<uint8_t> *mutating_variable_inputs = nullptr, |
| 7835 | const std::vector<int32_t> *intermediates = nullptr) { |
| 7836 | auto inputs__ = inputs ? _fbb.CreateVector<int32_t>(*inputs) : 0; |
| 7837 | auto outputs__ = outputs ? _fbb.CreateVector<int32_t>(*outputs) : 0; |
| 7838 | auto custom_options__ = custom_options ? _fbb.CreateVector<uint8_t>(*custom_options) : 0; |
| 7839 | auto mutating_variable_inputs__ = mutating_variable_inputs ? _fbb.CreateVector<uint8_t>(*mutating_variable_inputs) : 0; |
| 7840 | auto intermediates__ = intermediates ? _fbb.CreateVector<int32_t>(*intermediates) : 0; |
| 7841 | return tflite::CreateOperator( |
| 7842 | _fbb, |
| 7843 | opcode_index, |
| 7844 | inputs__, |
| 7845 | outputs__, |
| 7846 | builtin_options_type, |
| 7847 | builtin_options, |
| 7848 | custom_options__, |
| 7849 | custom_options_format, |
| 7850 | mutating_variable_inputs__, |
| 7851 | intermediates__); |
| 7852 | } |
| 7853 | |
| 7854 | struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 7855 | typedef SubGraphBuilder Builder; |
| 7856 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 7857 | VT_TENSORS = 4, |
| 7858 | VT_INPUTS = 6, |
| 7859 | VT_OUTPUTS = 8, |
| 7860 | VT_OPERATORS = 10, |
| 7861 | VT_NAME = 12 |
| 7862 | }; |
| 7863 | const flatbuffers::Vector<flatbuffers::Offset<tflite::Tensor>> *tensors() const { |
| 7864 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::Tensor>> *>(VT_TENSORS); |
| 7865 | } |
| 7866 | const flatbuffers::Vector<int32_t> *inputs() const { |
| 7867 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_INPUTS); |
| 7868 | } |
| 7869 | const flatbuffers::Vector<int32_t> *outputs() const { |
| 7870 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_OUTPUTS); |
| 7871 | } |
| 7872 | const flatbuffers::Vector<flatbuffers::Offset<tflite::Operator>> *operators() const { |
| 7873 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::Operator>> *>(VT_OPERATORS); |
| 7874 | } |
| 7875 | const flatbuffers::String *name() const { |
| 7876 | return GetPointer<const flatbuffers::String *>(VT_NAME); |
| 7877 | } |
| 7878 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 7879 | return VerifyTableStart(verifier) && |
| 7880 | VerifyOffset(verifier, VT_TENSORS) && |
| 7881 | verifier.VerifyVector(tensors()) && |
| 7882 | verifier.VerifyVectorOfTables(tensors()) && |
| 7883 | VerifyOffset(verifier, VT_INPUTS) && |
| 7884 | verifier.VerifyVector(inputs()) && |
| 7885 | VerifyOffset(verifier, VT_OUTPUTS) && |
| 7886 | verifier.VerifyVector(outputs()) && |
| 7887 | VerifyOffset(verifier, VT_OPERATORS) && |
| 7888 | verifier.VerifyVector(operators()) && |
| 7889 | verifier.VerifyVectorOfTables(operators()) && |
| 7890 | VerifyOffset(verifier, VT_NAME) && |
| 7891 | verifier.VerifyString(name()) && |
| 7892 | verifier.EndTable(); |
| 7893 | } |
| 7894 | }; |
| 7895 | |
| 7896 | struct SubGraphBuilder { |
| 7897 | typedef SubGraph Table; |
| 7898 | flatbuffers::FlatBufferBuilder &fbb_; |
| 7899 | flatbuffers::uoffset_t start_; |
| 7900 | void add_tensors(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Tensor>>> tensors) { |
| 7901 | fbb_.AddOffset(SubGraph::VT_TENSORS, tensors); |
| 7902 | } |
| 7903 | void add_inputs(flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputs) { |
| 7904 | fbb_.AddOffset(SubGraph::VT_INPUTS, inputs); |
| 7905 | } |
| 7906 | void add_outputs(flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputs) { |
| 7907 | fbb_.AddOffset(SubGraph::VT_OUTPUTS, outputs); |
| 7908 | } |
| 7909 | void add_operators(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Operator>>> operators) { |
| 7910 | fbb_.AddOffset(SubGraph::VT_OPERATORS, operators); |
| 7911 | } |
| 7912 | void add_name(flatbuffers::Offset<flatbuffers::String> name) { |
| 7913 | fbb_.AddOffset(SubGraph::VT_NAME, name); |
| 7914 | } |
| 7915 | explicit SubGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 7916 | : fbb_(_fbb) { |
| 7917 | start_ = fbb_.StartTable(); |
| 7918 | } |
| 7919 | flatbuffers::Offset<SubGraph> Finish() { |
| 7920 | const auto end = fbb_.EndTable(start_); |
| 7921 | auto o = flatbuffers::Offset<SubGraph>(end); |
| 7922 | return o; |
| 7923 | } |
| 7924 | }; |
| 7925 | |
| 7926 | inline flatbuffers::Offset<SubGraph> CreateSubGraph( |
| 7927 | flatbuffers::FlatBufferBuilder &_fbb, |
| 7928 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Tensor>>> tensors = 0, |
| 7929 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputs = 0, |
| 7930 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputs = 0, |
| 7931 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Operator>>> operators = 0, |
| 7932 | flatbuffers::Offset<flatbuffers::String> name = 0) { |
| 7933 | SubGraphBuilder builder_(_fbb); |
| 7934 | builder_.add_name(name); |
| 7935 | builder_.add_operators(operators); |
| 7936 | builder_.add_outputs(outputs); |
| 7937 | builder_.add_inputs(inputs); |
| 7938 | builder_.add_tensors(tensors); |
| 7939 | return builder_.Finish(); |
| 7940 | } |
| 7941 | |
| 7942 | inline flatbuffers::Offset<SubGraph> CreateSubGraphDirect( |
| 7943 | flatbuffers::FlatBufferBuilder &_fbb, |
| 7944 | const std::vector<flatbuffers::Offset<tflite::Tensor>> *tensors = nullptr, |
| 7945 | const std::vector<int32_t> *inputs = nullptr, |
| 7946 | const std::vector<int32_t> *outputs = nullptr, |
| 7947 | const std::vector<flatbuffers::Offset<tflite::Operator>> *operators = nullptr, |
| 7948 | const char *name = nullptr) { |
| 7949 | auto tensors__ = tensors ? _fbb.CreateVector<flatbuffers::Offset<tflite::Tensor>>(*tensors) : 0; |
| 7950 | auto inputs__ = inputs ? _fbb.CreateVector<int32_t>(*inputs) : 0; |
| 7951 | auto outputs__ = outputs ? _fbb.CreateVector<int32_t>(*outputs) : 0; |
| 7952 | auto operators__ = operators ? _fbb.CreateVector<flatbuffers::Offset<tflite::Operator>>(*operators) : 0; |
| 7953 | auto name__ = name ? _fbb.CreateString(name) : 0; |
| 7954 | return tflite::CreateSubGraph( |
| 7955 | _fbb, |
| 7956 | tensors__, |
| 7957 | inputs__, |
| 7958 | outputs__, |
| 7959 | operators__, |
| 7960 | name__); |
| 7961 | } |
| 7962 | |
| 7963 | struct Buffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 7964 | typedef BufferBuilder Builder; |
| 7965 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 7966 | VT_DATA = 4 |
| 7967 | }; |
| 7968 | const flatbuffers::Vector<uint8_t> *data() const { |
| 7969 | return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_DATA); |
| 7970 | } |
| 7971 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 7972 | return VerifyTableStart(verifier) && |
| 7973 | VerifyOffset(verifier, VT_DATA) && |
| 7974 | verifier.VerifyVector(data()) && |
| 7975 | verifier.EndTable(); |
| 7976 | } |
| 7977 | }; |
| 7978 | |
| 7979 | struct BufferBuilder { |
| 7980 | typedef Buffer Table; |
| 7981 | flatbuffers::FlatBufferBuilder &fbb_; |
| 7982 | flatbuffers::uoffset_t start_; |
| 7983 | void add_data(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> data) { |
| 7984 | fbb_.AddOffset(Buffer::VT_DATA, data); |
| 7985 | } |
| 7986 | explicit BufferBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 7987 | : fbb_(_fbb) { |
| 7988 | start_ = fbb_.StartTable(); |
| 7989 | } |
| 7990 | flatbuffers::Offset<Buffer> Finish() { |
| 7991 | const auto end = fbb_.EndTable(start_); |
| 7992 | auto o = flatbuffers::Offset<Buffer>(end); |
| 7993 | return o; |
| 7994 | } |
| 7995 | }; |
| 7996 | |
| 7997 | inline flatbuffers::Offset<Buffer> CreateBuffer( |
| 7998 | flatbuffers::FlatBufferBuilder &_fbb, |
| 7999 | flatbuffers::Offset<flatbuffers::Vector<uint8_t>> data = 0) { |
| 8000 | BufferBuilder builder_(_fbb); |
| 8001 | builder_.add_data(data); |
| 8002 | return builder_.Finish(); |
| 8003 | } |
| 8004 | |
| 8005 | inline flatbuffers::Offset<Buffer> CreateBufferDirect( |
| 8006 | flatbuffers::FlatBufferBuilder &_fbb, |
| 8007 | const std::vector<uint8_t> *data = nullptr) { |
| 8008 | if (data) { _fbb.ForceVectorAlignment(data->size(), sizeof(uint8_t), 16); } |
| 8009 | auto data__ = data ? _fbb.CreateVector<uint8_t>(*data) : 0; |
| 8010 | return tflite::CreateBuffer( |
| 8011 | _fbb, |
| 8012 | data__); |
| 8013 | } |
| 8014 | |
| 8015 | struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 8016 | typedef MetadataBuilder Builder; |
| 8017 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 8018 | VT_NAME = 4, |
| 8019 | VT_BUFFER = 6 |
| 8020 | }; |
| 8021 | const flatbuffers::String *name() const { |
| 8022 | return GetPointer<const flatbuffers::String *>(VT_NAME); |
| 8023 | } |
| 8024 | uint32_t buffer() const { |
| 8025 | return GetField<uint32_t>(VT_BUFFER, 0); |
| 8026 | } |
| 8027 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 8028 | return VerifyTableStart(verifier) && |
| 8029 | VerifyOffset(verifier, VT_NAME) && |
| 8030 | verifier.VerifyString(name()) && |
| 8031 | VerifyField<uint32_t>(verifier, VT_BUFFER) && |
| 8032 | verifier.EndTable(); |
| 8033 | } |
| 8034 | }; |
| 8035 | |
| 8036 | struct MetadataBuilder { |
| 8037 | typedef Metadata Table; |
| 8038 | flatbuffers::FlatBufferBuilder &fbb_; |
| 8039 | flatbuffers::uoffset_t start_; |
| 8040 | void add_name(flatbuffers::Offset<flatbuffers::String> name) { |
| 8041 | fbb_.AddOffset(Metadata::VT_NAME, name); |
| 8042 | } |
| 8043 | void add_buffer(uint32_t buffer) { |
| 8044 | fbb_.AddElement<uint32_t>(Metadata::VT_BUFFER, buffer, 0); |
| 8045 | } |
| 8046 | explicit MetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 8047 | : fbb_(_fbb) { |
| 8048 | start_ = fbb_.StartTable(); |
| 8049 | } |
| 8050 | flatbuffers::Offset<Metadata> Finish() { |
| 8051 | const auto end = fbb_.EndTable(start_); |
| 8052 | auto o = flatbuffers::Offset<Metadata>(end); |
| 8053 | return o; |
| 8054 | } |
| 8055 | }; |
| 8056 | |
| 8057 | inline flatbuffers::Offset<Metadata> CreateMetadata( |
| 8058 | flatbuffers::FlatBufferBuilder &_fbb, |
| 8059 | flatbuffers::Offset<flatbuffers::String> name = 0, |
| 8060 | uint32_t buffer = 0) { |
| 8061 | MetadataBuilder builder_(_fbb); |
| 8062 | builder_.add_buffer(buffer); |
| 8063 | builder_.add_name(name); |
| 8064 | return builder_.Finish(); |
| 8065 | } |
| 8066 | |
| 8067 | inline flatbuffers::Offset<Metadata> CreateMetadataDirect( |
| 8068 | flatbuffers::FlatBufferBuilder &_fbb, |
| 8069 | const char *name = nullptr, |
| 8070 | uint32_t buffer = 0) { |
| 8071 | auto name__ = name ? _fbb.CreateString(name) : 0; |
| 8072 | return tflite::CreateMetadata( |
| 8073 | _fbb, |
| 8074 | name__, |
| 8075 | buffer); |
| 8076 | } |
| 8077 | |
| 8078 | struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
| 8079 | typedef ModelBuilder Builder; |
| 8080 | enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
| 8081 | VT_VERSION = 4, |
| 8082 | VT_OPERATOR_CODES = 6, |
| 8083 | VT_SUBGRAPHS = 8, |
| 8084 | VT_DESCRIPTION = 10, |
| 8085 | VT_BUFFERS = 12, |
| 8086 | VT_METADATA_BUFFER = 14, |
| 8087 | VT_METADATA = 16 |
| 8088 | }; |
| 8089 | uint32_t version() const { |
| 8090 | return GetField<uint32_t>(VT_VERSION, 0); |
| 8091 | } |
| 8092 | const flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>> *operator_codes() const { |
| 8093 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>> *>(VT_OPERATOR_CODES); |
| 8094 | } |
| 8095 | const flatbuffers::Vector<flatbuffers::Offset<tflite::SubGraph>> *subgraphs() const { |
| 8096 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::SubGraph>> *>(VT_SUBGRAPHS); |
| 8097 | } |
| 8098 | const flatbuffers::String *description() const { |
| 8099 | return GetPointer<const flatbuffers::String *>(VT_DESCRIPTION); |
| 8100 | } |
| 8101 | const flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer>> *buffers() const { |
| 8102 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer>> *>(VT_BUFFERS); |
| 8103 | } |
| 8104 | const flatbuffers::Vector<int32_t> *metadata_buffer() const { |
| 8105 | return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_METADATA_BUFFER); |
| 8106 | } |
| 8107 | const flatbuffers::Vector<flatbuffers::Offset<tflite::Metadata>> *metadata() const { |
| 8108 | return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<tflite::Metadata>> *>(VT_METADATA); |
| 8109 | } |
| 8110 | bool Verify(flatbuffers::Verifier &verifier) const { |
| 8111 | return VerifyTableStart(verifier) && |
| 8112 | VerifyField<uint32_t>(verifier, VT_VERSION) && |
| 8113 | VerifyOffset(verifier, VT_OPERATOR_CODES) && |
| 8114 | verifier.VerifyVector(operator_codes()) && |
| 8115 | verifier.VerifyVectorOfTables(operator_codes()) && |
| 8116 | VerifyOffset(verifier, VT_SUBGRAPHS) && |
| 8117 | verifier.VerifyVector(subgraphs()) && |
| 8118 | verifier.VerifyVectorOfTables(subgraphs()) && |
| 8119 | VerifyOffset(verifier, VT_DESCRIPTION) && |
| 8120 | verifier.VerifyString(description()) && |
| 8121 | VerifyOffset(verifier, VT_BUFFERS) && |
| 8122 | verifier.VerifyVector(buffers()) && |
| 8123 | verifier.VerifyVectorOfTables(buffers()) && |
| 8124 | VerifyOffset(verifier, VT_METADATA_BUFFER) && |
| 8125 | verifier.VerifyVector(metadata_buffer()) && |
| 8126 | VerifyOffset(verifier, VT_METADATA) && |
| 8127 | verifier.VerifyVector(metadata()) && |
| 8128 | verifier.VerifyVectorOfTables(metadata()) && |
| 8129 | verifier.EndTable(); |
| 8130 | } |
| 8131 | }; |
| 8132 | |
| 8133 | struct ModelBuilder { |
| 8134 | typedef Model Table; |
| 8135 | flatbuffers::FlatBufferBuilder &fbb_; |
| 8136 | flatbuffers::uoffset_t start_; |
| 8137 | void add_version(uint32_t version) { |
| 8138 | fbb_.AddElement<uint32_t>(Model::VT_VERSION, version, 0); |
| 8139 | } |
| 8140 | void add_operator_codes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>>> operator_codes) { |
| 8141 | fbb_.AddOffset(Model::VT_OPERATOR_CODES, operator_codes); |
| 8142 | } |
| 8143 | void add_subgraphs(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::SubGraph>>> subgraphs) { |
| 8144 | fbb_.AddOffset(Model::VT_SUBGRAPHS, subgraphs); |
| 8145 | } |
| 8146 | void add_description(flatbuffers::Offset<flatbuffers::String> description) { |
| 8147 | fbb_.AddOffset(Model::VT_DESCRIPTION, description); |
| 8148 | } |
| 8149 | void add_buffers(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer>>> buffers) { |
| 8150 | fbb_.AddOffset(Model::VT_BUFFERS, buffers); |
| 8151 | } |
| 8152 | void add_metadata_buffer(flatbuffers::Offset<flatbuffers::Vector<int32_t>> metadata_buffer) { |
| 8153 | fbb_.AddOffset(Model::VT_METADATA_BUFFER, metadata_buffer); |
| 8154 | } |
| 8155 | void add_metadata(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Metadata>>> metadata) { |
| 8156 | fbb_.AddOffset(Model::VT_METADATA, metadata); |
| 8157 | } |
| 8158 | explicit ModelBuilder(flatbuffers::FlatBufferBuilder &_fbb) |
| 8159 | : fbb_(_fbb) { |
| 8160 | start_ = fbb_.StartTable(); |
| 8161 | } |
| 8162 | flatbuffers::Offset<Model> Finish() { |
| 8163 | const auto end = fbb_.EndTable(start_); |
| 8164 | auto o = flatbuffers::Offset<Model>(end); |
| 8165 | return o; |
| 8166 | } |
| 8167 | }; |
| 8168 | |
| 8169 | inline flatbuffers::Offset<Model> CreateModel( |
| 8170 | flatbuffers::FlatBufferBuilder &_fbb, |
| 8171 | uint32_t version = 0, |
| 8172 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>>> operator_codes = 0, |
| 8173 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::SubGraph>>> subgraphs = 0, |
| 8174 | flatbuffers::Offset<flatbuffers::String> description = 0, |
| 8175 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer>>> buffers = 0, |
| 8176 | flatbuffers::Offset<flatbuffers::Vector<int32_t>> metadata_buffer = 0, |
| 8177 | flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<tflite::Metadata>>> metadata = 0) { |
| 8178 | ModelBuilder builder_(_fbb); |
| 8179 | builder_.add_metadata(metadata); |
| 8180 | builder_.add_metadata_buffer(metadata_buffer); |
| 8181 | builder_.add_buffers(buffers); |
| 8182 | builder_.add_description(description); |
| 8183 | builder_.add_subgraphs(subgraphs); |
| 8184 | builder_.add_operator_codes(operator_codes); |
| 8185 | builder_.add_version(version); |
| 8186 | return builder_.Finish(); |
| 8187 | } |
| 8188 | |
| 8189 | inline flatbuffers::Offset<Model> CreateModelDirect( |
| 8190 | flatbuffers::FlatBufferBuilder &_fbb, |
| 8191 | uint32_t version = 0, |
| 8192 | const std::vector<flatbuffers::Offset<tflite::OperatorCode>> *operator_codes = nullptr, |
| 8193 | const std::vector<flatbuffers::Offset<tflite::SubGraph>> *subgraphs = nullptr, |
| 8194 | const char *description = nullptr, |
| 8195 | const std::vector<flatbuffers::Offset<tflite::Buffer>> *buffers = nullptr, |
| 8196 | const std::vector<int32_t> *metadata_buffer = nullptr, |
| 8197 | const std::vector<flatbuffers::Offset<tflite::Metadata>> *metadata = nullptr) { |
| 8198 | auto operator_codes__ = operator_codes ? _fbb.CreateVector<flatbuffers::Offset<tflite::OperatorCode>>(*operator_codes) : 0; |
| 8199 | auto subgraphs__ = subgraphs ? _fbb.CreateVector<flatbuffers::Offset<tflite::SubGraph>>(*subgraphs) : 0; |
| 8200 | auto description__ = description ? _fbb.CreateString(description) : 0; |
| 8201 | auto buffers__ = buffers ? _fbb.CreateVector<flatbuffers::Offset<tflite::Buffer>>(*buffers) : 0; |
| 8202 | auto metadata_buffer__ = metadata_buffer ? _fbb.CreateVector<int32_t>(*metadata_buffer) : 0; |
| 8203 | auto metadata__ = metadata ? _fbb.CreateVector<flatbuffers::Offset<tflite::Metadata>>(*metadata) : 0; |
| 8204 | return tflite::CreateModel( |
| 8205 | _fbb, |
| 8206 | version, |
| 8207 | operator_codes__, |
| 8208 | subgraphs__, |
| 8209 | description__, |
| 8210 | buffers__, |
| 8211 | metadata_buffer__, |
| 8212 | metadata__); |
| 8213 | } |
| 8214 | |
| 8215 | inline bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, QuantizationDetails type) { |
| 8216 | switch (type) { |
| 8217 | case QuantizationDetails_NONE: { |
| 8218 | return true; |
| 8219 | } |
| 8220 | case QuantizationDetails_CustomQuantization: { |
| 8221 | auto ptr = reinterpret_cast<const tflite::CustomQuantization *>(obj); |
| 8222 | return verifier.VerifyTable(ptr); |
| 8223 | } |
| 8224 | default: return true; |
| 8225 | } |
| 8226 | } |
| 8227 | |
| 8228 | inline bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) { |
| 8229 | if (!values || !types) return !values && !types; |
| 8230 | if (values->size() != types->size()) return false; |
| 8231 | for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { |
| 8232 | if (!VerifyQuantizationDetails( |
| 8233 | verifier, values->Get(i), types->GetEnum<QuantizationDetails>(i))) { |
| 8234 | return false; |
| 8235 | } |
| 8236 | } |
| 8237 | return true; |
| 8238 | } |
| 8239 | |
| 8240 | inline bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, SparseIndexVector type) { |
| 8241 | switch (type) { |
| 8242 | case SparseIndexVector_NONE: { |
| 8243 | return true; |
| 8244 | } |
| 8245 | case SparseIndexVector_Int32Vector: { |
| 8246 | auto ptr = reinterpret_cast<const tflite::Int32Vector *>(obj); |
| 8247 | return verifier.VerifyTable(ptr); |
| 8248 | } |
| 8249 | case SparseIndexVector_Uint16Vector: { |
| 8250 | auto ptr = reinterpret_cast<const tflite::Uint16Vector *>(obj); |
| 8251 | return verifier.VerifyTable(ptr); |
| 8252 | } |
| 8253 | case SparseIndexVector_Uint8Vector: { |
| 8254 | auto ptr = reinterpret_cast<const tflite::Uint8Vector *>(obj); |
| 8255 | return verifier.VerifyTable(ptr); |
| 8256 | } |
| 8257 | default: return true; |
| 8258 | } |
| 8259 | } |
| 8260 | |
| 8261 | inline bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) { |
| 8262 | if (!values || !types) return !values && !types; |
| 8263 | if (values->size() != types->size()) return false; |
| 8264 | for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { |
| 8265 | if (!VerifySparseIndexVector( |
| 8266 | verifier, values->Get(i), types->GetEnum<SparseIndexVector>(i))) { |
| 8267 | return false; |
| 8268 | } |
| 8269 | } |
| 8270 | return true; |
| 8271 | } |
| 8272 | |
| 8273 | inline bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type) { |
| 8274 | switch (type) { |
| 8275 | case BuiltinOptions_NONE: { |
| 8276 | return true; |
| 8277 | } |
| 8278 | case BuiltinOptions_Conv2DOptions: { |
| 8279 | auto ptr = reinterpret_cast<const tflite::Conv2DOptions *>(obj); |
| 8280 | return verifier.VerifyTable(ptr); |
| 8281 | } |
| 8282 | case BuiltinOptions_DepthwiseConv2DOptions: { |
| 8283 | auto ptr = reinterpret_cast<const tflite::DepthwiseConv2DOptions *>(obj); |
| 8284 | return verifier.VerifyTable(ptr); |
| 8285 | } |
| 8286 | case BuiltinOptions_ConcatEmbeddingsOptions: { |
| 8287 | auto ptr = reinterpret_cast<const tflite::ConcatEmbeddingsOptions *>(obj); |
| 8288 | return verifier.VerifyTable(ptr); |
| 8289 | } |
| 8290 | case BuiltinOptions_LSHProjectionOptions: { |
| 8291 | auto ptr = reinterpret_cast<const tflite::LSHProjectionOptions *>(obj); |
| 8292 | return verifier.VerifyTable(ptr); |
| 8293 | } |
| 8294 | case BuiltinOptions_Pool2DOptions: { |
| 8295 | auto ptr = reinterpret_cast<const tflite::Pool2DOptions *>(obj); |
| 8296 | return verifier.VerifyTable(ptr); |
| 8297 | } |
| 8298 | case BuiltinOptions_SVDFOptions: { |
| 8299 | auto ptr = reinterpret_cast<const tflite::SVDFOptions *>(obj); |
| 8300 | return verifier.VerifyTable(ptr); |
| 8301 | } |
| 8302 | case BuiltinOptions_RNNOptions: { |
| 8303 | auto ptr = reinterpret_cast<const tflite::RNNOptions *>(obj); |
| 8304 | return verifier.VerifyTable(ptr); |
| 8305 | } |
| 8306 | case BuiltinOptions_FullyConnectedOptions: { |
| 8307 | auto ptr = reinterpret_cast<const tflite::FullyConnectedOptions *>(obj); |
| 8308 | return verifier.VerifyTable(ptr); |
| 8309 | } |
| 8310 | case BuiltinOptions_SoftmaxOptions: { |
| 8311 | auto ptr = reinterpret_cast<const tflite::SoftmaxOptions *>(obj); |
| 8312 | return verifier.VerifyTable(ptr); |
| 8313 | } |
| 8314 | case BuiltinOptions_ConcatenationOptions: { |
| 8315 | auto ptr = reinterpret_cast<const tflite::ConcatenationOptions *>(obj); |
| 8316 | return verifier.VerifyTable(ptr); |
| 8317 | } |
| 8318 | case BuiltinOptions_AddOptions: { |
| 8319 | auto ptr = reinterpret_cast<const tflite::AddOptions *>(obj); |
| 8320 | return verifier.VerifyTable(ptr); |
| 8321 | } |
| 8322 | case BuiltinOptions_L2NormOptions: { |
| 8323 | auto ptr = reinterpret_cast<const tflite::L2NormOptions *>(obj); |
| 8324 | return verifier.VerifyTable(ptr); |
| 8325 | } |
| 8326 | case BuiltinOptions_LocalResponseNormalizationOptions: { |
| 8327 | auto ptr = reinterpret_cast<const tflite::LocalResponseNormalizationOptions *>(obj); |
| 8328 | return verifier.VerifyTable(ptr); |
| 8329 | } |
| 8330 | case BuiltinOptions_LSTMOptions: { |
| 8331 | auto ptr = reinterpret_cast<const tflite::LSTMOptions *>(obj); |
| 8332 | return verifier.VerifyTable(ptr); |
| 8333 | } |
| 8334 | case BuiltinOptions_ResizeBilinearOptions: { |
| 8335 | auto ptr = reinterpret_cast<const tflite::ResizeBilinearOptions *>(obj); |
| 8336 | return verifier.VerifyTable(ptr); |
| 8337 | } |
| 8338 | case BuiltinOptions_CallOptions: { |
| 8339 | auto ptr = reinterpret_cast<const tflite::CallOptions *>(obj); |
| 8340 | return verifier.VerifyTable(ptr); |
| 8341 | } |
| 8342 | case BuiltinOptions_ReshapeOptions: { |
| 8343 | auto ptr = reinterpret_cast<const tflite::ReshapeOptions *>(obj); |
| 8344 | return verifier.VerifyTable(ptr); |
| 8345 | } |
| 8346 | case BuiltinOptions_SkipGramOptions: { |
| 8347 | auto ptr = reinterpret_cast<const tflite::SkipGramOptions *>(obj); |
| 8348 | return verifier.VerifyTable(ptr); |
| 8349 | } |
| 8350 | case BuiltinOptions_SpaceToDepthOptions: { |
| 8351 | auto ptr = reinterpret_cast<const tflite::SpaceToDepthOptions *>(obj); |
| 8352 | return verifier.VerifyTable(ptr); |
| 8353 | } |
| 8354 | case BuiltinOptions_EmbeddingLookupSparseOptions: { |
| 8355 | auto ptr = reinterpret_cast<const tflite::EmbeddingLookupSparseOptions *>(obj); |
| 8356 | return verifier.VerifyTable(ptr); |
| 8357 | } |
| 8358 | case BuiltinOptions_MulOptions: { |
| 8359 | auto ptr = reinterpret_cast<const tflite::MulOptions *>(obj); |
| 8360 | return verifier.VerifyTable(ptr); |
| 8361 | } |
| 8362 | case BuiltinOptions_PadOptions: { |
| 8363 | auto ptr = reinterpret_cast<const tflite::PadOptions *>(obj); |
| 8364 | return verifier.VerifyTable(ptr); |
| 8365 | } |
| 8366 | case BuiltinOptions_GatherOptions: { |
| 8367 | auto ptr = reinterpret_cast<const tflite::GatherOptions *>(obj); |
| 8368 | return verifier.VerifyTable(ptr); |
| 8369 | } |
| 8370 | case BuiltinOptions_BatchToSpaceNDOptions: { |
| 8371 | auto ptr = reinterpret_cast<const tflite::BatchToSpaceNDOptions *>(obj); |
| 8372 | return verifier.VerifyTable(ptr); |
| 8373 | } |
| 8374 | case BuiltinOptions_SpaceToBatchNDOptions: { |
| 8375 | auto ptr = reinterpret_cast<const tflite::SpaceToBatchNDOptions *>(obj); |
| 8376 | return verifier.VerifyTable(ptr); |
| 8377 | } |
| 8378 | case BuiltinOptions_TransposeOptions: { |
| 8379 | auto ptr = reinterpret_cast<const tflite::TransposeOptions *>(obj); |
| 8380 | return verifier.VerifyTable(ptr); |
| 8381 | } |
| 8382 | case BuiltinOptions_ReducerOptions: { |
| 8383 | auto ptr = reinterpret_cast<const tflite::ReducerOptions *>(obj); |
| 8384 | return verifier.VerifyTable(ptr); |
| 8385 | } |
| 8386 | case BuiltinOptions_SubOptions: { |
| 8387 | auto ptr = reinterpret_cast<const tflite::SubOptions *>(obj); |
| 8388 | return verifier.VerifyTable(ptr); |
| 8389 | } |
| 8390 | case BuiltinOptions_DivOptions: { |
| 8391 | auto ptr = reinterpret_cast<const tflite::DivOptions *>(obj); |
| 8392 | return verifier.VerifyTable(ptr); |
| 8393 | } |
| 8394 | case BuiltinOptions_SqueezeOptions: { |
| 8395 | auto ptr = reinterpret_cast<const tflite::SqueezeOptions *>(obj); |
| 8396 | return verifier.VerifyTable(ptr); |
| 8397 | } |
| 8398 | case BuiltinOptions_SequenceRNNOptions: { |
| 8399 | auto ptr = reinterpret_cast<const tflite::SequenceRNNOptions *>(obj); |
| 8400 | return verifier.VerifyTable(ptr); |
| 8401 | } |
| 8402 | case BuiltinOptions_StridedSliceOptions: { |
| 8403 | auto ptr = reinterpret_cast<const tflite::StridedSliceOptions *>(obj); |
| 8404 | return verifier.VerifyTable(ptr); |
| 8405 | } |
| 8406 | case BuiltinOptions_ExpOptions: { |
| 8407 | auto ptr = reinterpret_cast<const tflite::ExpOptions *>(obj); |
| 8408 | return verifier.VerifyTable(ptr); |
| 8409 | } |
| 8410 | case BuiltinOptions_TopKV2Options: { |
| 8411 | auto ptr = reinterpret_cast<const tflite::TopKV2Options *>(obj); |
| 8412 | return verifier.VerifyTable(ptr); |
| 8413 | } |
| 8414 | case BuiltinOptions_SplitOptions: { |
| 8415 | auto ptr = reinterpret_cast<const tflite::SplitOptions *>(obj); |
| 8416 | return verifier.VerifyTable(ptr); |
| 8417 | } |
| 8418 | case BuiltinOptions_LogSoftmaxOptions: { |
| 8419 | auto ptr = reinterpret_cast<const tflite::LogSoftmaxOptions *>(obj); |
| 8420 | return verifier.VerifyTable(ptr); |
| 8421 | } |
| 8422 | case BuiltinOptions_CastOptions: { |
| 8423 | auto ptr = reinterpret_cast<const tflite::CastOptions *>(obj); |
| 8424 | return verifier.VerifyTable(ptr); |
| 8425 | } |
| 8426 | case BuiltinOptions_DequantizeOptions: { |
| 8427 | auto ptr = reinterpret_cast<const tflite::DequantizeOptions *>(obj); |
| 8428 | return verifier.VerifyTable(ptr); |
| 8429 | } |
| 8430 | case BuiltinOptions_MaximumMinimumOptions: { |
| 8431 | auto ptr = reinterpret_cast<const tflite::MaximumMinimumOptions *>(obj); |
| 8432 | return verifier.VerifyTable(ptr); |
| 8433 | } |
| 8434 | case BuiltinOptions_ArgMaxOptions: { |
| 8435 | auto ptr = reinterpret_cast<const tflite::ArgMaxOptions *>(obj); |
| 8436 | return verifier.VerifyTable(ptr); |
| 8437 | } |
| 8438 | case BuiltinOptions_LessOptions: { |
| 8439 | auto ptr = reinterpret_cast<const tflite::LessOptions *>(obj); |
| 8440 | return verifier.VerifyTable(ptr); |
| 8441 | } |
| 8442 | case BuiltinOptions_NegOptions: { |
| 8443 | auto ptr = reinterpret_cast<const tflite::NegOptions *>(obj); |
| 8444 | return verifier.VerifyTable(ptr); |
| 8445 | } |
| 8446 | case BuiltinOptions_PadV2Options: { |
| 8447 | auto ptr = reinterpret_cast<const tflite::PadV2Options *>(obj); |
| 8448 | return verifier.VerifyTable(ptr); |
| 8449 | } |
| 8450 | case BuiltinOptions_GreaterOptions: { |
| 8451 | auto ptr = reinterpret_cast<const tflite::GreaterOptions *>(obj); |
| 8452 | return verifier.VerifyTable(ptr); |
| 8453 | } |
| 8454 | case BuiltinOptions_GreaterEqualOptions: { |
| 8455 | auto ptr = reinterpret_cast<const tflite::GreaterEqualOptions *>(obj); |
| 8456 | return verifier.VerifyTable(ptr); |
| 8457 | } |
| 8458 | case BuiltinOptions_LessEqualOptions: { |
| 8459 | auto ptr = reinterpret_cast<const tflite::LessEqualOptions *>(obj); |
| 8460 | return verifier.VerifyTable(ptr); |
| 8461 | } |
| 8462 | case BuiltinOptions_SelectOptions: { |
| 8463 | auto ptr = reinterpret_cast<const tflite::SelectOptions *>(obj); |
| 8464 | return verifier.VerifyTable(ptr); |
| 8465 | } |
| 8466 | case BuiltinOptions_SliceOptions: { |
| 8467 | auto ptr = reinterpret_cast<const tflite::SliceOptions *>(obj); |
| 8468 | return verifier.VerifyTable(ptr); |
| 8469 | } |
| 8470 | case BuiltinOptions_TransposeConvOptions: { |
| 8471 | auto ptr = reinterpret_cast<const tflite::TransposeConvOptions *>(obj); |
| 8472 | return verifier.VerifyTable(ptr); |
| 8473 | } |
| 8474 | case BuiltinOptions_SparseToDenseOptions: { |
| 8475 | auto ptr = reinterpret_cast<const tflite::SparseToDenseOptions *>(obj); |
| 8476 | return verifier.VerifyTable(ptr); |
| 8477 | } |
| 8478 | case BuiltinOptions_TileOptions: { |
| 8479 | auto ptr = reinterpret_cast<const tflite::TileOptions *>(obj); |
| 8480 | return verifier.VerifyTable(ptr); |
| 8481 | } |
| 8482 | case BuiltinOptions_ExpandDimsOptions: { |
| 8483 | auto ptr = reinterpret_cast<const tflite::ExpandDimsOptions *>(obj); |
| 8484 | return verifier.VerifyTable(ptr); |
| 8485 | } |
| 8486 | case BuiltinOptions_EqualOptions: { |
| 8487 | auto ptr = reinterpret_cast<const tflite::EqualOptions *>(obj); |
| 8488 | return verifier.VerifyTable(ptr); |
| 8489 | } |
| 8490 | case BuiltinOptions_NotEqualOptions: { |
| 8491 | auto ptr = reinterpret_cast<const tflite::NotEqualOptions *>(obj); |
| 8492 | return verifier.VerifyTable(ptr); |
| 8493 | } |
| 8494 | case BuiltinOptions_ShapeOptions: { |
| 8495 | auto ptr = reinterpret_cast<const tflite::ShapeOptions *>(obj); |
| 8496 | return verifier.VerifyTable(ptr); |
| 8497 | } |
| 8498 | case BuiltinOptions_PowOptions: { |
| 8499 | auto ptr = reinterpret_cast<const tflite::PowOptions *>(obj); |
| 8500 | return verifier.VerifyTable(ptr); |
| 8501 | } |
| 8502 | case BuiltinOptions_ArgMinOptions: { |
| 8503 | auto ptr = reinterpret_cast<const tflite::ArgMinOptions *>(obj); |
| 8504 | return verifier.VerifyTable(ptr); |
| 8505 | } |
| 8506 | case BuiltinOptions_FakeQuantOptions: { |
| 8507 | auto ptr = reinterpret_cast<const tflite::FakeQuantOptions *>(obj); |
| 8508 | return verifier.VerifyTable(ptr); |
| 8509 | } |
| 8510 | case BuiltinOptions_PackOptions: { |
| 8511 | auto ptr = reinterpret_cast<const tflite::PackOptions *>(obj); |
| 8512 | return verifier.VerifyTable(ptr); |
| 8513 | } |
| 8514 | case BuiltinOptions_LogicalOrOptions: { |
| 8515 | auto ptr = reinterpret_cast<const tflite::LogicalOrOptions *>(obj); |
| 8516 | return verifier.VerifyTable(ptr); |
| 8517 | } |
| 8518 | case BuiltinOptions_OneHotOptions: { |
| 8519 | auto ptr = reinterpret_cast<const tflite::OneHotOptions *>(obj); |
| 8520 | return verifier.VerifyTable(ptr); |
| 8521 | } |
| 8522 | case BuiltinOptions_LogicalAndOptions: { |
| 8523 | auto ptr = reinterpret_cast<const tflite::LogicalAndOptions *>(obj); |
| 8524 | return verifier.VerifyTable(ptr); |
| 8525 | } |
| 8526 | case BuiltinOptions_LogicalNotOptions: { |
| 8527 | auto ptr = reinterpret_cast<const tflite::LogicalNotOptions *>(obj); |
| 8528 | return verifier.VerifyTable(ptr); |
| 8529 | } |
| 8530 | case BuiltinOptions_UnpackOptions: { |
| 8531 | auto ptr = reinterpret_cast<const tflite::UnpackOptions *>(obj); |
| 8532 | return verifier.VerifyTable(ptr); |
| 8533 | } |
| 8534 | case BuiltinOptions_FloorDivOptions: { |
| 8535 | auto ptr = reinterpret_cast<const tflite::FloorDivOptions *>(obj); |
| 8536 | return verifier.VerifyTable(ptr); |
| 8537 | } |
| 8538 | case BuiltinOptions_SquareOptions: { |
| 8539 | auto ptr = reinterpret_cast<const tflite::SquareOptions *>(obj); |
| 8540 | return verifier.VerifyTable(ptr); |
| 8541 | } |
| 8542 | case BuiltinOptions_ZerosLikeOptions: { |
| 8543 | auto ptr = reinterpret_cast<const tflite::ZerosLikeOptions *>(obj); |
| 8544 | return verifier.VerifyTable(ptr); |
| 8545 | } |
| 8546 | case BuiltinOptions_FillOptions: { |
| 8547 | auto ptr = reinterpret_cast<const tflite::FillOptions *>(obj); |
| 8548 | return verifier.VerifyTable(ptr); |
| 8549 | } |
| 8550 | case BuiltinOptions_BidirectionalSequenceLSTMOptions: { |
| 8551 | auto ptr = reinterpret_cast<const tflite::BidirectionalSequenceLSTMOptions *>(obj); |
| 8552 | return verifier.VerifyTable(ptr); |
| 8553 | } |
| 8554 | case BuiltinOptions_BidirectionalSequenceRNNOptions: { |
| 8555 | auto ptr = reinterpret_cast<const tflite::BidirectionalSequenceRNNOptions *>(obj); |
| 8556 | return verifier.VerifyTable(ptr); |
| 8557 | } |
| 8558 | case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { |
| 8559 | auto ptr = reinterpret_cast<const tflite::UnidirectionalSequenceLSTMOptions *>(obj); |
| 8560 | return verifier.VerifyTable(ptr); |
| 8561 | } |
| 8562 | case BuiltinOptions_FloorModOptions: { |
| 8563 | auto ptr = reinterpret_cast<const tflite::FloorModOptions *>(obj); |
| 8564 | return verifier.VerifyTable(ptr); |
| 8565 | } |
| 8566 | case BuiltinOptions_RangeOptions: { |
| 8567 | auto ptr = reinterpret_cast<const tflite::RangeOptions *>(obj); |
| 8568 | return verifier.VerifyTable(ptr); |
| 8569 | } |
| 8570 | case BuiltinOptions_ResizeNearestNeighborOptions: { |
| 8571 | auto ptr = reinterpret_cast<const tflite::ResizeNearestNeighborOptions *>(obj); |
| 8572 | return verifier.VerifyTable(ptr); |
| 8573 | } |
| 8574 | case BuiltinOptions_LeakyReluOptions: { |
| 8575 | auto ptr = reinterpret_cast<const tflite::LeakyReluOptions *>(obj); |
| 8576 | return verifier.VerifyTable(ptr); |
| 8577 | } |
| 8578 | case BuiltinOptions_SquaredDifferenceOptions: { |
| 8579 | auto ptr = reinterpret_cast<const tflite::SquaredDifferenceOptions *>(obj); |
| 8580 | return verifier.VerifyTable(ptr); |
| 8581 | } |
| 8582 | case BuiltinOptions_MirrorPadOptions: { |
| 8583 | auto ptr = reinterpret_cast<const tflite::MirrorPadOptions *>(obj); |
| 8584 | return verifier.VerifyTable(ptr); |
| 8585 | } |
| 8586 | case BuiltinOptions_AbsOptions: { |
| 8587 | auto ptr = reinterpret_cast<const tflite::AbsOptions *>(obj); |
| 8588 | return verifier.VerifyTable(ptr); |
| 8589 | } |
| 8590 | case BuiltinOptions_SplitVOptions: { |
| 8591 | auto ptr = reinterpret_cast<const tflite::SplitVOptions *>(obj); |
| 8592 | return verifier.VerifyTable(ptr); |
| 8593 | } |
| 8594 | case BuiltinOptions_UniqueOptions: { |
| 8595 | auto ptr = reinterpret_cast<const tflite::UniqueOptions *>(obj); |
| 8596 | return verifier.VerifyTable(ptr); |
| 8597 | } |
| 8598 | case BuiltinOptions_ReverseV2Options: { |
| 8599 | auto ptr = reinterpret_cast<const tflite::ReverseV2Options *>(obj); |
| 8600 | return verifier.VerifyTable(ptr); |
| 8601 | } |
| 8602 | case BuiltinOptions_AddNOptions: { |
| 8603 | auto ptr = reinterpret_cast<const tflite::AddNOptions *>(obj); |
| 8604 | return verifier.VerifyTable(ptr); |
| 8605 | } |
| 8606 | case BuiltinOptions_GatherNdOptions: { |
| 8607 | auto ptr = reinterpret_cast<const tflite::GatherNdOptions *>(obj); |
| 8608 | return verifier.VerifyTable(ptr); |
| 8609 | } |
| 8610 | case BuiltinOptions_CosOptions: { |
| 8611 | auto ptr = reinterpret_cast<const tflite::CosOptions *>(obj); |
| 8612 | return verifier.VerifyTable(ptr); |
| 8613 | } |
| 8614 | case BuiltinOptions_WhereOptions: { |
| 8615 | auto ptr = reinterpret_cast<const tflite::WhereOptions *>(obj); |
| 8616 | return verifier.VerifyTable(ptr); |
| 8617 | } |
| 8618 | case BuiltinOptions_RankOptions: { |
| 8619 | auto ptr = reinterpret_cast<const tflite::RankOptions *>(obj); |
| 8620 | return verifier.VerifyTable(ptr); |
| 8621 | } |
| 8622 | case BuiltinOptions_ReverseSequenceOptions: { |
| 8623 | auto ptr = reinterpret_cast<const tflite::ReverseSequenceOptions *>(obj); |
| 8624 | return verifier.VerifyTable(ptr); |
| 8625 | } |
| 8626 | case BuiltinOptions_MatrixDiagOptions: { |
| 8627 | auto ptr = reinterpret_cast<const tflite::MatrixDiagOptions *>(obj); |
| 8628 | return verifier.VerifyTable(ptr); |
| 8629 | } |
| 8630 | case BuiltinOptions_QuantizeOptions: { |
| 8631 | auto ptr = reinterpret_cast<const tflite::QuantizeOptions *>(obj); |
| 8632 | return verifier.VerifyTable(ptr); |
| 8633 | } |
| 8634 | case BuiltinOptions_MatrixSetDiagOptions: { |
| 8635 | auto ptr = reinterpret_cast<const tflite::MatrixSetDiagOptions *>(obj); |
| 8636 | return verifier.VerifyTable(ptr); |
| 8637 | } |
| 8638 | case BuiltinOptions_HardSwishOptions: { |
| 8639 | auto ptr = reinterpret_cast<const tflite::HardSwishOptions *>(obj); |
| 8640 | return verifier.VerifyTable(ptr); |
| 8641 | } |
| 8642 | case BuiltinOptions_IfOptions: { |
| 8643 | auto ptr = reinterpret_cast<const tflite::IfOptions *>(obj); |
| 8644 | return verifier.VerifyTable(ptr); |
| 8645 | } |
| 8646 | case BuiltinOptions_WhileOptions: { |
| 8647 | auto ptr = reinterpret_cast<const tflite::WhileOptions *>(obj); |
| 8648 | return verifier.VerifyTable(ptr); |
| 8649 | } |
| 8650 | case BuiltinOptions_DepthToSpaceOptions: { |
| 8651 | auto ptr = reinterpret_cast<const tflite::DepthToSpaceOptions *>(obj); |
| 8652 | return verifier.VerifyTable(ptr); |
| 8653 | } |
| 8654 | case BuiltinOptions_NonMaxSuppressionV4Options: { |
| 8655 | auto ptr = reinterpret_cast<const tflite::NonMaxSuppressionV4Options *>(obj); |
| 8656 | return verifier.VerifyTable(ptr); |
| 8657 | } |
| 8658 | case BuiltinOptions_NonMaxSuppressionV5Options: { |
| 8659 | auto ptr = reinterpret_cast<const tflite::NonMaxSuppressionV5Options *>(obj); |
| 8660 | return verifier.VerifyTable(ptr); |
| 8661 | } |
| 8662 | case BuiltinOptions_ScatterNdOptions: { |
| 8663 | auto ptr = reinterpret_cast<const tflite::ScatterNdOptions *>(obj); |
| 8664 | return verifier.VerifyTable(ptr); |
| 8665 | } |
| 8666 | case BuiltinOptions_SelectV2Options: { |
| 8667 | auto ptr = reinterpret_cast<const tflite::SelectV2Options *>(obj); |
| 8668 | return verifier.VerifyTable(ptr); |
| 8669 | } |
| 8670 | case BuiltinOptions_DensifyOptions: { |
| 8671 | auto ptr = reinterpret_cast<const tflite::DensifyOptions *>(obj); |
| 8672 | return verifier.VerifyTable(ptr); |
| 8673 | } |
| 8674 | case BuiltinOptions_SegmentSumOptions: { |
| 8675 | auto ptr = reinterpret_cast<const tflite::SegmentSumOptions *>(obj); |
| 8676 | return verifier.VerifyTable(ptr); |
| 8677 | } |
| 8678 | case BuiltinOptions_BatchMatMulOptions: { |
| 8679 | auto ptr = reinterpret_cast<const tflite::BatchMatMulOptions *>(obj); |
| 8680 | return verifier.VerifyTable(ptr); |
| 8681 | } |
| 8682 | default: return true; |
| 8683 | } |
| 8684 | } |
| 8685 | |
| 8686 | inline bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) { |
| 8687 | if (!values || !types) return !values && !types; |
| 8688 | if (values->size() != types->size()) return false; |
| 8689 | for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { |
| 8690 | if (!VerifyBuiltinOptions( |
| 8691 | verifier, values->Get(i), types->GetEnum<BuiltinOptions>(i))) { |
| 8692 | return false; |
| 8693 | } |
| 8694 | } |
| 8695 | return true; |
| 8696 | } |
| 8697 | |
| 8698 | inline const tflite::Model *GetModel(const void *buf) { |
| 8699 | return flatbuffers::GetRoot<tflite::Model>(buf); |
| 8700 | } |
| 8701 | |
| 8702 | inline const tflite::Model *GetSizePrefixedModel(const void *buf) { |
| 8703 | return flatbuffers::GetSizePrefixedRoot<tflite::Model>(buf); |
| 8704 | } |
| 8705 | |
| 8706 | inline const char *ModelIdentifier() { |
| 8707 | return "TFL3"; |
| 8708 | } |
| 8709 | |
| 8710 | inline bool ModelBufferHasIdentifier(const void *buf) { |
| 8711 | return flatbuffers::BufferHasIdentifier( |
| 8712 | buf, ModelIdentifier()); |
| 8713 | } |
| 8714 | |
| 8715 | inline bool VerifyModelBuffer( |
| 8716 | flatbuffers::Verifier &verifier) { |
| 8717 | return verifier.VerifyBuffer<tflite::Model>(ModelIdentifier()); |
| 8718 | } |
| 8719 | |
| 8720 | inline bool VerifySizePrefixedModelBuffer( |
| 8721 | flatbuffers::Verifier &verifier) { |
| 8722 | return verifier.VerifySizePrefixedBuffer<tflite::Model>(ModelIdentifier()); |
| 8723 | } |
| 8724 | |
| 8725 | inline const char *ModelExtension() { |
| 8726 | return "tflite"; |
| 8727 | } |
| 8728 | |
| 8729 | inline void FinishModelBuffer( |
| 8730 | flatbuffers::FlatBufferBuilder &fbb, |
| 8731 | flatbuffers::Offset<tflite::Model> root) { |
| 8732 | fbb.Finish(root, ModelIdentifier()); |
| 8733 | } |
| 8734 | |
| 8735 | inline void FinishSizePrefixedModelBuffer( |
| 8736 | flatbuffers::FlatBufferBuilder &fbb, |
| 8737 | flatbuffers::Offset<tflite::Model> root) { |
| 8738 | fbb.FinishSizePrefixed(root, ModelIdentifier()); |
| 8739 | } |
| 8740 | |
| 8741 | } // namespace tflite |
| 8742 | |
| 8743 | #endif // FLATBUFFERS_GENERATED_SCHEMA_TFLITE_H_ |