ai-edge-litert-nightly 1.4.0.dev20250817__cp311-cp311-macosx_12_0_arm64.whl → 2.0.4.dev20251107__cp311-cp311-macosx_12_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ai-edge-litert-nightly might be problematic. Click here for more details.

@@ -27,6 +27,7 @@ class TensorType(object):
27
27
  UINT16 = 16
28
28
  INT4 = 17
29
29
  BFLOAT16 = 18
30
+ INT2 = 19
30
31
 
31
32
 
32
33
  class QuantizationDetails(object):
@@ -38,9 +39,9 @@ def QuantizationDetailsCreator(unionType, table):
38
39
  from flatbuffers.table import Table
39
40
  if not isinstance(table, Table):
40
41
  return None
41
- if unionType == QuantizationDetails().CustomQuantization:
42
+ if unionType == QuantizationDetails.CustomQuantization:
42
43
  return CustomQuantizationT.InitFromBuf(table.Bytes, table.Pos)
43
- if unionType == QuantizationDetails().BlockwiseQuantization:
44
+ if unionType == QuantizationDetails.BlockwiseQuantization:
44
45
  return BlockwiseQuantizationT.InitFromBuf(table.Bytes, table.Pos)
45
46
  return None
46
47
 
@@ -60,11 +61,11 @@ def SparseIndexVectorCreator(unionType, table):
60
61
  from flatbuffers.table import Table
61
62
  if not isinstance(table, Table):
62
63
  return None
63
- if unionType == SparseIndexVector().Int32Vector:
64
+ if unionType == SparseIndexVector.Int32Vector:
64
65
  return Int32VectorT.InitFromBuf(table.Bytes, table.Pos)
65
- if unionType == SparseIndexVector().Uint16Vector:
66
+ if unionType == SparseIndexVector.Uint16Vector:
66
67
  return Uint16VectorT.InitFromBuf(table.Bytes, table.Pos)
67
- if unionType == SparseIndexVector().Uint8Vector:
68
+ if unionType == SparseIndexVector.Uint8Vector:
68
69
  return Uint8VectorT.InitFromBuf(table.Bytes, table.Pos)
69
70
  return None
70
71
 
@@ -415,257 +416,257 @@ def BuiltinOptionsCreator(unionType, table):
415
416
  from flatbuffers.table import Table
416
417
  if not isinstance(table, Table):
417
418
  return None
418
- if unionType == BuiltinOptions().Conv2DOptions:
419
+ if unionType == BuiltinOptions.Conv2DOptions:
419
420
  return Conv2DOptionsT.InitFromBuf(table.Bytes, table.Pos)
420
- if unionType == BuiltinOptions().DepthwiseConv2DOptions:
421
+ if unionType == BuiltinOptions.DepthwiseConv2DOptions:
421
422
  return DepthwiseConv2DOptionsT.InitFromBuf(table.Bytes, table.Pos)
422
- if unionType == BuiltinOptions().ConcatEmbeddingsOptions:
423
+ if unionType == BuiltinOptions.ConcatEmbeddingsOptions:
423
424
  return ConcatEmbeddingsOptionsT.InitFromBuf(table.Bytes, table.Pos)
424
- if unionType == BuiltinOptions().LSHProjectionOptions:
425
+ if unionType == BuiltinOptions.LSHProjectionOptions:
425
426
  return LSHProjectionOptionsT.InitFromBuf(table.Bytes, table.Pos)
426
- if unionType == BuiltinOptions().Pool2DOptions:
427
+ if unionType == BuiltinOptions.Pool2DOptions:
427
428
  return Pool2DOptionsT.InitFromBuf(table.Bytes, table.Pos)
428
- if unionType == BuiltinOptions().SVDFOptions:
429
+ if unionType == BuiltinOptions.SVDFOptions:
429
430
  return SVDFOptionsT.InitFromBuf(table.Bytes, table.Pos)
430
- if unionType == BuiltinOptions().RNNOptions:
431
+ if unionType == BuiltinOptions.RNNOptions:
431
432
  return RNNOptionsT.InitFromBuf(table.Bytes, table.Pos)
432
- if unionType == BuiltinOptions().FullyConnectedOptions:
433
+ if unionType == BuiltinOptions.FullyConnectedOptions:
433
434
  return FullyConnectedOptionsT.InitFromBuf(table.Bytes, table.Pos)
434
- if unionType == BuiltinOptions().SoftmaxOptions:
435
+ if unionType == BuiltinOptions.SoftmaxOptions:
435
436
  return SoftmaxOptionsT.InitFromBuf(table.Bytes, table.Pos)
436
- if unionType == BuiltinOptions().ConcatenationOptions:
437
+ if unionType == BuiltinOptions.ConcatenationOptions:
437
438
  return ConcatenationOptionsT.InitFromBuf(table.Bytes, table.Pos)
438
- if unionType == BuiltinOptions().AddOptions:
439
+ if unionType == BuiltinOptions.AddOptions:
439
440
  return AddOptionsT.InitFromBuf(table.Bytes, table.Pos)
440
- if unionType == BuiltinOptions().L2NormOptions:
441
+ if unionType == BuiltinOptions.L2NormOptions:
441
442
  return L2NormOptionsT.InitFromBuf(table.Bytes, table.Pos)
442
- if unionType == BuiltinOptions().LocalResponseNormalizationOptions:
443
+ if unionType == BuiltinOptions.LocalResponseNormalizationOptions:
443
444
  return LocalResponseNormalizationOptionsT.InitFromBuf(table.Bytes, table.Pos)
444
- if unionType == BuiltinOptions().LSTMOptions:
445
+ if unionType == BuiltinOptions.LSTMOptions:
445
446
  return LSTMOptionsT.InitFromBuf(table.Bytes, table.Pos)
446
- if unionType == BuiltinOptions().ResizeBilinearOptions:
447
+ if unionType == BuiltinOptions.ResizeBilinearOptions:
447
448
  return ResizeBilinearOptionsT.InitFromBuf(table.Bytes, table.Pos)
448
- if unionType == BuiltinOptions().CallOptions:
449
+ if unionType == BuiltinOptions.CallOptions:
449
450
  return CallOptionsT.InitFromBuf(table.Bytes, table.Pos)
450
- if unionType == BuiltinOptions().ReshapeOptions:
451
+ if unionType == BuiltinOptions.ReshapeOptions:
451
452
  return ReshapeOptionsT.InitFromBuf(table.Bytes, table.Pos)
452
- if unionType == BuiltinOptions().SkipGramOptions:
453
+ if unionType == BuiltinOptions.SkipGramOptions:
453
454
  return SkipGramOptionsT.InitFromBuf(table.Bytes, table.Pos)
454
- if unionType == BuiltinOptions().SpaceToDepthOptions:
455
+ if unionType == BuiltinOptions.SpaceToDepthOptions:
455
456
  return SpaceToDepthOptionsT.InitFromBuf(table.Bytes, table.Pos)
456
- if unionType == BuiltinOptions().EmbeddingLookupSparseOptions:
457
+ if unionType == BuiltinOptions.EmbeddingLookupSparseOptions:
457
458
  return EmbeddingLookupSparseOptionsT.InitFromBuf(table.Bytes, table.Pos)
458
- if unionType == BuiltinOptions().MulOptions:
459
+ if unionType == BuiltinOptions.MulOptions:
459
460
  return MulOptionsT.InitFromBuf(table.Bytes, table.Pos)
460
- if unionType == BuiltinOptions().PadOptions:
461
+ if unionType == BuiltinOptions.PadOptions:
461
462
  return PadOptionsT.InitFromBuf(table.Bytes, table.Pos)
462
- if unionType == BuiltinOptions().GatherOptions:
463
+ if unionType == BuiltinOptions.GatherOptions:
463
464
  return GatherOptionsT.InitFromBuf(table.Bytes, table.Pos)
464
- if unionType == BuiltinOptions().BatchToSpaceNDOptions:
465
+ if unionType == BuiltinOptions.BatchToSpaceNDOptions:
465
466
  return BatchToSpaceNDOptionsT.InitFromBuf(table.Bytes, table.Pos)
466
- if unionType == BuiltinOptions().SpaceToBatchNDOptions:
467
+ if unionType == BuiltinOptions.SpaceToBatchNDOptions:
467
468
  return SpaceToBatchNDOptionsT.InitFromBuf(table.Bytes, table.Pos)
468
- if unionType == BuiltinOptions().TransposeOptions:
469
+ if unionType == BuiltinOptions.TransposeOptions:
469
470
  return TransposeOptionsT.InitFromBuf(table.Bytes, table.Pos)
470
- if unionType == BuiltinOptions().ReducerOptions:
471
+ if unionType == BuiltinOptions.ReducerOptions:
471
472
  return ReducerOptionsT.InitFromBuf(table.Bytes, table.Pos)
472
- if unionType == BuiltinOptions().SubOptions:
473
+ if unionType == BuiltinOptions.SubOptions:
473
474
  return SubOptionsT.InitFromBuf(table.Bytes, table.Pos)
474
- if unionType == BuiltinOptions().DivOptions:
475
+ if unionType == BuiltinOptions.DivOptions:
475
476
  return DivOptionsT.InitFromBuf(table.Bytes, table.Pos)
476
- if unionType == BuiltinOptions().SqueezeOptions:
477
+ if unionType == BuiltinOptions.SqueezeOptions:
477
478
  return SqueezeOptionsT.InitFromBuf(table.Bytes, table.Pos)
478
- if unionType == BuiltinOptions().SequenceRNNOptions:
479
+ if unionType == BuiltinOptions.SequenceRNNOptions:
479
480
  return SequenceRNNOptionsT.InitFromBuf(table.Bytes, table.Pos)
480
- if unionType == BuiltinOptions().StridedSliceOptions:
481
+ if unionType == BuiltinOptions.StridedSliceOptions:
481
482
  return StridedSliceOptionsT.InitFromBuf(table.Bytes, table.Pos)
482
- if unionType == BuiltinOptions().ExpOptions:
483
+ if unionType == BuiltinOptions.ExpOptions:
483
484
  return ExpOptionsT.InitFromBuf(table.Bytes, table.Pos)
484
- if unionType == BuiltinOptions().TopKV2Options:
485
+ if unionType == BuiltinOptions.TopKV2Options:
485
486
  return TopKV2OptionsT.InitFromBuf(table.Bytes, table.Pos)
486
- if unionType == BuiltinOptions().SplitOptions:
487
+ if unionType == BuiltinOptions.SplitOptions:
487
488
  return SplitOptionsT.InitFromBuf(table.Bytes, table.Pos)
488
- if unionType == BuiltinOptions().LogSoftmaxOptions:
489
+ if unionType == BuiltinOptions.LogSoftmaxOptions:
489
490
  return LogSoftmaxOptionsT.InitFromBuf(table.Bytes, table.Pos)
490
- if unionType == BuiltinOptions().CastOptions:
491
+ if unionType == BuiltinOptions.CastOptions:
491
492
  return CastOptionsT.InitFromBuf(table.Bytes, table.Pos)
492
- if unionType == BuiltinOptions().DequantizeOptions:
493
+ if unionType == BuiltinOptions.DequantizeOptions:
493
494
  return DequantizeOptionsT.InitFromBuf(table.Bytes, table.Pos)
494
- if unionType == BuiltinOptions().MaximumMinimumOptions:
495
+ if unionType == BuiltinOptions.MaximumMinimumOptions:
495
496
  return MaximumMinimumOptionsT.InitFromBuf(table.Bytes, table.Pos)
496
- if unionType == BuiltinOptions().ArgMaxOptions:
497
+ if unionType == BuiltinOptions.ArgMaxOptions:
497
498
  return ArgMaxOptionsT.InitFromBuf(table.Bytes, table.Pos)
498
- if unionType == BuiltinOptions().LessOptions:
499
+ if unionType == BuiltinOptions.LessOptions:
499
500
  return LessOptionsT.InitFromBuf(table.Bytes, table.Pos)
500
- if unionType == BuiltinOptions().NegOptions:
501
+ if unionType == BuiltinOptions.NegOptions:
501
502
  return NegOptionsT.InitFromBuf(table.Bytes, table.Pos)
502
- if unionType == BuiltinOptions().PadV2Options:
503
+ if unionType == BuiltinOptions.PadV2Options:
503
504
  return PadV2OptionsT.InitFromBuf(table.Bytes, table.Pos)
504
- if unionType == BuiltinOptions().GreaterOptions:
505
+ if unionType == BuiltinOptions.GreaterOptions:
505
506
  return GreaterOptionsT.InitFromBuf(table.Bytes, table.Pos)
506
- if unionType == BuiltinOptions().GreaterEqualOptions:
507
+ if unionType == BuiltinOptions.GreaterEqualOptions:
507
508
  return GreaterEqualOptionsT.InitFromBuf(table.Bytes, table.Pos)
508
- if unionType == BuiltinOptions().LessEqualOptions:
509
+ if unionType == BuiltinOptions.LessEqualOptions:
509
510
  return LessEqualOptionsT.InitFromBuf(table.Bytes, table.Pos)
510
- if unionType == BuiltinOptions().SelectOptions:
511
+ if unionType == BuiltinOptions.SelectOptions:
511
512
  return SelectOptionsT.InitFromBuf(table.Bytes, table.Pos)
512
- if unionType == BuiltinOptions().SliceOptions:
513
+ if unionType == BuiltinOptions.SliceOptions:
513
514
  return SliceOptionsT.InitFromBuf(table.Bytes, table.Pos)
514
- if unionType == BuiltinOptions().TransposeConvOptions:
515
+ if unionType == BuiltinOptions.TransposeConvOptions:
515
516
  return TransposeConvOptionsT.InitFromBuf(table.Bytes, table.Pos)
516
- if unionType == BuiltinOptions().SparseToDenseOptions:
517
+ if unionType == BuiltinOptions.SparseToDenseOptions:
517
518
  return SparseToDenseOptionsT.InitFromBuf(table.Bytes, table.Pos)
518
- if unionType == BuiltinOptions().TileOptions:
519
+ if unionType == BuiltinOptions.TileOptions:
519
520
  return TileOptionsT.InitFromBuf(table.Bytes, table.Pos)
520
- if unionType == BuiltinOptions().ExpandDimsOptions:
521
+ if unionType == BuiltinOptions.ExpandDimsOptions:
521
522
  return ExpandDimsOptionsT.InitFromBuf(table.Bytes, table.Pos)
522
- if unionType == BuiltinOptions().EqualOptions:
523
+ if unionType == BuiltinOptions.EqualOptions:
523
524
  return EqualOptionsT.InitFromBuf(table.Bytes, table.Pos)
524
- if unionType == BuiltinOptions().NotEqualOptions:
525
+ if unionType == BuiltinOptions.NotEqualOptions:
525
526
  return NotEqualOptionsT.InitFromBuf(table.Bytes, table.Pos)
526
- if unionType == BuiltinOptions().ShapeOptions:
527
+ if unionType == BuiltinOptions.ShapeOptions:
527
528
  return ShapeOptionsT.InitFromBuf(table.Bytes, table.Pos)
528
- if unionType == BuiltinOptions().PowOptions:
529
+ if unionType == BuiltinOptions.PowOptions:
529
530
  return PowOptionsT.InitFromBuf(table.Bytes, table.Pos)
530
- if unionType == BuiltinOptions().ArgMinOptions:
531
+ if unionType == BuiltinOptions.ArgMinOptions:
531
532
  return ArgMinOptionsT.InitFromBuf(table.Bytes, table.Pos)
532
- if unionType == BuiltinOptions().FakeQuantOptions:
533
+ if unionType == BuiltinOptions.FakeQuantOptions:
533
534
  return FakeQuantOptionsT.InitFromBuf(table.Bytes, table.Pos)
534
- if unionType == BuiltinOptions().PackOptions:
535
+ if unionType == BuiltinOptions.PackOptions:
535
536
  return PackOptionsT.InitFromBuf(table.Bytes, table.Pos)
536
- if unionType == BuiltinOptions().LogicalOrOptions:
537
+ if unionType == BuiltinOptions.LogicalOrOptions:
537
538
  return LogicalOrOptionsT.InitFromBuf(table.Bytes, table.Pos)
538
- if unionType == BuiltinOptions().OneHotOptions:
539
+ if unionType == BuiltinOptions.OneHotOptions:
539
540
  return OneHotOptionsT.InitFromBuf(table.Bytes, table.Pos)
540
- if unionType == BuiltinOptions().LogicalAndOptions:
541
+ if unionType == BuiltinOptions.LogicalAndOptions:
541
542
  return LogicalAndOptionsT.InitFromBuf(table.Bytes, table.Pos)
542
- if unionType == BuiltinOptions().LogicalNotOptions:
543
+ if unionType == BuiltinOptions.LogicalNotOptions:
543
544
  return LogicalNotOptionsT.InitFromBuf(table.Bytes, table.Pos)
544
- if unionType == BuiltinOptions().UnpackOptions:
545
+ if unionType == BuiltinOptions.UnpackOptions:
545
546
  return UnpackOptionsT.InitFromBuf(table.Bytes, table.Pos)
546
- if unionType == BuiltinOptions().FloorDivOptions:
547
+ if unionType == BuiltinOptions.FloorDivOptions:
547
548
  return FloorDivOptionsT.InitFromBuf(table.Bytes, table.Pos)
548
- if unionType == BuiltinOptions().SquareOptions:
549
+ if unionType == BuiltinOptions.SquareOptions:
549
550
  return SquareOptionsT.InitFromBuf(table.Bytes, table.Pos)
550
- if unionType == BuiltinOptions().ZerosLikeOptions:
551
+ if unionType == BuiltinOptions.ZerosLikeOptions:
551
552
  return ZerosLikeOptionsT.InitFromBuf(table.Bytes, table.Pos)
552
- if unionType == BuiltinOptions().FillOptions:
553
+ if unionType == BuiltinOptions.FillOptions:
553
554
  return FillOptionsT.InitFromBuf(table.Bytes, table.Pos)
554
- if unionType == BuiltinOptions().BidirectionalSequenceLSTMOptions:
555
+ if unionType == BuiltinOptions.BidirectionalSequenceLSTMOptions:
555
556
  return BidirectionalSequenceLSTMOptionsT.InitFromBuf(table.Bytes, table.Pos)
556
- if unionType == BuiltinOptions().BidirectionalSequenceRNNOptions:
557
+ if unionType == BuiltinOptions.BidirectionalSequenceRNNOptions:
557
558
  return BidirectionalSequenceRNNOptionsT.InitFromBuf(table.Bytes, table.Pos)
558
- if unionType == BuiltinOptions().UnidirectionalSequenceLSTMOptions:
559
+ if unionType == BuiltinOptions.UnidirectionalSequenceLSTMOptions:
559
560
  return UnidirectionalSequenceLSTMOptionsT.InitFromBuf(table.Bytes, table.Pos)
560
- if unionType == BuiltinOptions().FloorModOptions:
561
+ if unionType == BuiltinOptions.FloorModOptions:
561
562
  return FloorModOptionsT.InitFromBuf(table.Bytes, table.Pos)
562
- if unionType == BuiltinOptions().RangeOptions:
563
+ if unionType == BuiltinOptions.RangeOptions:
563
564
  return RangeOptionsT.InitFromBuf(table.Bytes, table.Pos)
564
- if unionType == BuiltinOptions().ResizeNearestNeighborOptions:
565
+ if unionType == BuiltinOptions.ResizeNearestNeighborOptions:
565
566
  return ResizeNearestNeighborOptionsT.InitFromBuf(table.Bytes, table.Pos)
566
- if unionType == BuiltinOptions().LeakyReluOptions:
567
+ if unionType == BuiltinOptions.LeakyReluOptions:
567
568
  return LeakyReluOptionsT.InitFromBuf(table.Bytes, table.Pos)
568
- if unionType == BuiltinOptions().SquaredDifferenceOptions:
569
+ if unionType == BuiltinOptions.SquaredDifferenceOptions:
569
570
  return SquaredDifferenceOptionsT.InitFromBuf(table.Bytes, table.Pos)
570
- if unionType == BuiltinOptions().MirrorPadOptions:
571
+ if unionType == BuiltinOptions.MirrorPadOptions:
571
572
  return MirrorPadOptionsT.InitFromBuf(table.Bytes, table.Pos)
572
- if unionType == BuiltinOptions().AbsOptions:
573
+ if unionType == BuiltinOptions.AbsOptions:
573
574
  return AbsOptionsT.InitFromBuf(table.Bytes, table.Pos)
574
- if unionType == BuiltinOptions().SplitVOptions:
575
+ if unionType == BuiltinOptions.SplitVOptions:
575
576
  return SplitVOptionsT.InitFromBuf(table.Bytes, table.Pos)
576
- if unionType == BuiltinOptions().UniqueOptions:
577
+ if unionType == BuiltinOptions.UniqueOptions:
577
578
  return UniqueOptionsT.InitFromBuf(table.Bytes, table.Pos)
578
- if unionType == BuiltinOptions().ReverseV2Options:
579
+ if unionType == BuiltinOptions.ReverseV2Options:
579
580
  return ReverseV2OptionsT.InitFromBuf(table.Bytes, table.Pos)
580
- if unionType == BuiltinOptions().AddNOptions:
581
+ if unionType == BuiltinOptions.AddNOptions:
581
582
  return AddNOptionsT.InitFromBuf(table.Bytes, table.Pos)
582
- if unionType == BuiltinOptions().GatherNdOptions:
583
+ if unionType == BuiltinOptions.GatherNdOptions:
583
584
  return GatherNdOptionsT.InitFromBuf(table.Bytes, table.Pos)
584
- if unionType == BuiltinOptions().CosOptions:
585
+ if unionType == BuiltinOptions.CosOptions:
585
586
  return CosOptionsT.InitFromBuf(table.Bytes, table.Pos)
586
- if unionType == BuiltinOptions().WhereOptions:
587
+ if unionType == BuiltinOptions.WhereOptions:
587
588
  return WhereOptionsT.InitFromBuf(table.Bytes, table.Pos)
588
- if unionType == BuiltinOptions().RankOptions:
589
+ if unionType == BuiltinOptions.RankOptions:
589
590
  return RankOptionsT.InitFromBuf(table.Bytes, table.Pos)
590
- if unionType == BuiltinOptions().ReverseSequenceOptions:
591
+ if unionType == BuiltinOptions.ReverseSequenceOptions:
591
592
  return ReverseSequenceOptionsT.InitFromBuf(table.Bytes, table.Pos)
592
- if unionType == BuiltinOptions().MatrixDiagOptions:
593
+ if unionType == BuiltinOptions.MatrixDiagOptions:
593
594
  return MatrixDiagOptionsT.InitFromBuf(table.Bytes, table.Pos)
594
- if unionType == BuiltinOptions().QuantizeOptions:
595
+ if unionType == BuiltinOptions.QuantizeOptions:
595
596
  return QuantizeOptionsT.InitFromBuf(table.Bytes, table.Pos)
596
- if unionType == BuiltinOptions().MatrixSetDiagOptions:
597
+ if unionType == BuiltinOptions.MatrixSetDiagOptions:
597
598
  return MatrixSetDiagOptionsT.InitFromBuf(table.Bytes, table.Pos)
598
- if unionType == BuiltinOptions().HardSwishOptions:
599
+ if unionType == BuiltinOptions.HardSwishOptions:
599
600
  return HardSwishOptionsT.InitFromBuf(table.Bytes, table.Pos)
600
- if unionType == BuiltinOptions().IfOptions:
601
+ if unionType == BuiltinOptions.IfOptions:
601
602
  return IfOptionsT.InitFromBuf(table.Bytes, table.Pos)
602
- if unionType == BuiltinOptions().WhileOptions:
603
+ if unionType == BuiltinOptions.WhileOptions:
603
604
  return WhileOptionsT.InitFromBuf(table.Bytes, table.Pos)
604
- if unionType == BuiltinOptions().DepthToSpaceOptions:
605
+ if unionType == BuiltinOptions.DepthToSpaceOptions:
605
606
  return DepthToSpaceOptionsT.InitFromBuf(table.Bytes, table.Pos)
606
- if unionType == BuiltinOptions().NonMaxSuppressionV4Options:
607
+ if unionType == BuiltinOptions.NonMaxSuppressionV4Options:
607
608
  return NonMaxSuppressionV4OptionsT.InitFromBuf(table.Bytes, table.Pos)
608
- if unionType == BuiltinOptions().NonMaxSuppressionV5Options:
609
+ if unionType == BuiltinOptions.NonMaxSuppressionV5Options:
609
610
  return NonMaxSuppressionV5OptionsT.InitFromBuf(table.Bytes, table.Pos)
610
- if unionType == BuiltinOptions().ScatterNdOptions:
611
+ if unionType == BuiltinOptions.ScatterNdOptions:
611
612
  return ScatterNdOptionsT.InitFromBuf(table.Bytes, table.Pos)
612
- if unionType == BuiltinOptions().SelectV2Options:
613
+ if unionType == BuiltinOptions.SelectV2Options:
613
614
  return SelectV2OptionsT.InitFromBuf(table.Bytes, table.Pos)
614
- if unionType == BuiltinOptions().DensifyOptions:
615
+ if unionType == BuiltinOptions.DensifyOptions:
615
616
  return DensifyOptionsT.InitFromBuf(table.Bytes, table.Pos)
616
- if unionType == BuiltinOptions().SegmentSumOptions:
617
+ if unionType == BuiltinOptions.SegmentSumOptions:
617
618
  return SegmentSumOptionsT.InitFromBuf(table.Bytes, table.Pos)
618
- if unionType == BuiltinOptions().BatchMatMulOptions:
619
+ if unionType == BuiltinOptions.BatchMatMulOptions:
619
620
  return BatchMatMulOptionsT.InitFromBuf(table.Bytes, table.Pos)
620
- if unionType == BuiltinOptions().CumsumOptions:
621
+ if unionType == BuiltinOptions.CumsumOptions:
621
622
  return CumsumOptionsT.InitFromBuf(table.Bytes, table.Pos)
622
- if unionType == BuiltinOptions().CallOnceOptions:
623
+ if unionType == BuiltinOptions.CallOnceOptions:
623
624
  return CallOnceOptionsT.InitFromBuf(table.Bytes, table.Pos)
624
- if unionType == BuiltinOptions().BroadcastToOptions:
625
+ if unionType == BuiltinOptions.BroadcastToOptions:
625
626
  return BroadcastToOptionsT.InitFromBuf(table.Bytes, table.Pos)
626
- if unionType == BuiltinOptions().Rfft2dOptions:
627
+ if unionType == BuiltinOptions.Rfft2dOptions:
627
628
  return Rfft2dOptionsT.InitFromBuf(table.Bytes, table.Pos)
628
- if unionType == BuiltinOptions().Conv3DOptions:
629
+ if unionType == BuiltinOptions.Conv3DOptions:
629
630
  return Conv3DOptionsT.InitFromBuf(table.Bytes, table.Pos)
630
- if unionType == BuiltinOptions().HashtableOptions:
631
+ if unionType == BuiltinOptions.HashtableOptions:
631
632
  return HashtableOptionsT.InitFromBuf(table.Bytes, table.Pos)
632
- if unionType == BuiltinOptions().HashtableFindOptions:
633
+ if unionType == BuiltinOptions.HashtableFindOptions:
633
634
  return HashtableFindOptionsT.InitFromBuf(table.Bytes, table.Pos)
634
- if unionType == BuiltinOptions().HashtableImportOptions:
635
+ if unionType == BuiltinOptions.HashtableImportOptions:
635
636
  return HashtableImportOptionsT.InitFromBuf(table.Bytes, table.Pos)
636
- if unionType == BuiltinOptions().HashtableSizeOptions:
637
+ if unionType == BuiltinOptions.HashtableSizeOptions:
637
638
  return HashtableSizeOptionsT.InitFromBuf(table.Bytes, table.Pos)
638
- if unionType == BuiltinOptions().VarHandleOptions:
639
+ if unionType == BuiltinOptions.VarHandleOptions:
639
640
  return VarHandleOptionsT.InitFromBuf(table.Bytes, table.Pos)
640
- if unionType == BuiltinOptions().ReadVariableOptions:
641
+ if unionType == BuiltinOptions.ReadVariableOptions:
641
642
  return ReadVariableOptionsT.InitFromBuf(table.Bytes, table.Pos)
642
- if unionType == BuiltinOptions().AssignVariableOptions:
643
+ if unionType == BuiltinOptions.AssignVariableOptions:
643
644
  return AssignVariableOptionsT.InitFromBuf(table.Bytes, table.Pos)
644
- if unionType == BuiltinOptions().RandomOptions:
645
+ if unionType == BuiltinOptions.RandomOptions:
645
646
  return RandomOptionsT.InitFromBuf(table.Bytes, table.Pos)
646
- if unionType == BuiltinOptions().BucketizeOptions:
647
+ if unionType == BuiltinOptions.BucketizeOptions:
647
648
  return BucketizeOptionsT.InitFromBuf(table.Bytes, table.Pos)
648
- if unionType == BuiltinOptions().GeluOptions:
649
+ if unionType == BuiltinOptions.GeluOptions:
649
650
  return GeluOptionsT.InitFromBuf(table.Bytes, table.Pos)
650
- if unionType == BuiltinOptions().DynamicUpdateSliceOptions:
651
+ if unionType == BuiltinOptions.DynamicUpdateSliceOptions:
651
652
  return DynamicUpdateSliceOptionsT.InitFromBuf(table.Bytes, table.Pos)
652
- if unionType == BuiltinOptions().UnsortedSegmentProdOptions:
653
+ if unionType == BuiltinOptions.UnsortedSegmentProdOptions:
653
654
  return UnsortedSegmentProdOptionsT.InitFromBuf(table.Bytes, table.Pos)
654
- if unionType == BuiltinOptions().UnsortedSegmentMaxOptions:
655
+ if unionType == BuiltinOptions.UnsortedSegmentMaxOptions:
655
656
  return UnsortedSegmentMaxOptionsT.InitFromBuf(table.Bytes, table.Pos)
656
- if unionType == BuiltinOptions().UnsortedSegmentMinOptions:
657
+ if unionType == BuiltinOptions.UnsortedSegmentMinOptions:
657
658
  return UnsortedSegmentMinOptionsT.InitFromBuf(table.Bytes, table.Pos)
658
- if unionType == BuiltinOptions().UnsortedSegmentSumOptions:
659
+ if unionType == BuiltinOptions.UnsortedSegmentSumOptions:
659
660
  return UnsortedSegmentSumOptionsT.InitFromBuf(table.Bytes, table.Pos)
660
- if unionType == BuiltinOptions().ATan2Options:
661
+ if unionType == BuiltinOptions.ATan2Options:
661
662
  return ATan2OptionsT.InitFromBuf(table.Bytes, table.Pos)
662
- if unionType == BuiltinOptions().SignOptions:
663
+ if unionType == BuiltinOptions.SignOptions:
663
664
  return SignOptionsT.InitFromBuf(table.Bytes, table.Pos)
664
- if unionType == BuiltinOptions().BitcastOptions:
665
+ if unionType == BuiltinOptions.BitcastOptions:
665
666
  return BitcastOptionsT.InitFromBuf(table.Bytes, table.Pos)
666
- if unionType == BuiltinOptions().BitwiseXorOptions:
667
+ if unionType == BuiltinOptions.BitwiseXorOptions:
667
668
  return BitwiseXorOptionsT.InitFromBuf(table.Bytes, table.Pos)
668
- if unionType == BuiltinOptions().RightShiftOptions:
669
+ if unionType == BuiltinOptions.RightShiftOptions:
669
670
  return RightShiftOptionsT.InitFromBuf(table.Bytes, table.Pos)
670
671
  return None
671
672
 
@@ -700,51 +701,51 @@ def BuiltinOptions2Creator(unionType, table):
700
701
  from flatbuffers.table import Table
701
702
  if not isinstance(table, Table):
702
703
  return None
703
- if unionType == BuiltinOptions2().StablehloConcatenateOptions:
704
+ if unionType == BuiltinOptions2.StablehloConcatenateOptions:
704
705
  return StablehloConcatenateOptionsT.InitFromBuf(table.Bytes, table.Pos)
705
- if unionType == BuiltinOptions2().StablehloBroadcastInDimOptions:
706
+ if unionType == BuiltinOptions2.StablehloBroadcastInDimOptions:
706
707
  return StablehloBroadcastInDimOptionsT.InitFromBuf(table.Bytes, table.Pos)
707
- if unionType == BuiltinOptions2().StablehloSliceOptions:
708
+ if unionType == BuiltinOptions2.StablehloSliceOptions:
708
709
  return StablehloSliceOptionsT.InitFromBuf(table.Bytes, table.Pos)
709
- if unionType == BuiltinOptions2().StablehloConvolutionOptions:
710
+ if unionType == BuiltinOptions2.StablehloConvolutionOptions:
710
711
  return StablehloConvolutionOptionsT.InitFromBuf(table.Bytes, table.Pos)
711
- if unionType == BuiltinOptions2().StablehloCustomCallOptions:
712
+ if unionType == BuiltinOptions2.StablehloCustomCallOptions:
712
713
  return StablehloCustomCallOptionsT.InitFromBuf(table.Bytes, table.Pos)
713
- if unionType == BuiltinOptions2().StablehloReduceOptions:
714
+ if unionType == BuiltinOptions2.StablehloReduceOptions:
714
715
  return StablehloReduceOptionsT.InitFromBuf(table.Bytes, table.Pos)
715
- if unionType == BuiltinOptions2().StablehloScatterOptions:
716
+ if unionType == BuiltinOptions2.StablehloScatterOptions:
716
717
  return StablehloScatterOptionsT.InitFromBuf(table.Bytes, table.Pos)
717
- if unionType == BuiltinOptions2().StablehloCompareOptions:
718
+ if unionType == BuiltinOptions2.StablehloCompareOptions:
718
719
  return StablehloCompareOptionsT.InitFromBuf(table.Bytes, table.Pos)
719
- if unionType == BuiltinOptions2().StablehloDynamicSliceOptions:
720
+ if unionType == BuiltinOptions2.StablehloDynamicSliceOptions:
720
721
  return StablehloDynamicSliceOptionsT.InitFromBuf(table.Bytes, table.Pos)
721
- if unionType == BuiltinOptions2().StablehloPadOptions:
722
+ if unionType == BuiltinOptions2.StablehloPadOptions:
722
723
  return StablehloPadOptionsT.InitFromBuf(table.Bytes, table.Pos)
723
- if unionType == BuiltinOptions2().StablehloIotaOptions:
724
+ if unionType == BuiltinOptions2.StablehloIotaOptions:
724
725
  return StablehloIotaOptionsT.InitFromBuf(table.Bytes, table.Pos)
725
- if unionType == BuiltinOptions2().StablehloDotGeneralOptions:
726
+ if unionType == BuiltinOptions2.StablehloDotGeneralOptions:
726
727
  return StablehloDotGeneralOptionsT.InitFromBuf(table.Bytes, table.Pos)
727
- if unionType == BuiltinOptions2().StablehloReduceWindowOptions:
728
+ if unionType == BuiltinOptions2.StablehloReduceWindowOptions:
728
729
  return StablehloReduceWindowOptionsT.InitFromBuf(table.Bytes, table.Pos)
729
- if unionType == BuiltinOptions2().StablehloSortOptions:
730
+ if unionType == BuiltinOptions2.StablehloSortOptions:
730
731
  return StablehloSortOptionsT.InitFromBuf(table.Bytes, table.Pos)
731
- if unionType == BuiltinOptions2().StablehloWhileOptions:
732
+ if unionType == BuiltinOptions2.StablehloWhileOptions:
732
733
  return StablehloWhileOptionsT.InitFromBuf(table.Bytes, table.Pos)
733
- if unionType == BuiltinOptions2().StablehloGatherOptions:
734
+ if unionType == BuiltinOptions2.StablehloGatherOptions:
734
735
  return StablehloGatherOptionsT.InitFromBuf(table.Bytes, table.Pos)
735
- if unionType == BuiltinOptions2().StablehloTransposeOptions:
736
+ if unionType == BuiltinOptions2.StablehloTransposeOptions:
736
737
  return StablehloTransposeOptionsT.InitFromBuf(table.Bytes, table.Pos)
737
- if unionType == BuiltinOptions2().DilateOptions:
738
+ if unionType == BuiltinOptions2.DilateOptions:
738
739
  return DilateOptionsT.InitFromBuf(table.Bytes, table.Pos)
739
- if unionType == BuiltinOptions2().StablehloRngBitGeneratorOptions:
740
+ if unionType == BuiltinOptions2.StablehloRngBitGeneratorOptions:
740
741
  return StablehloRngBitGeneratorOptionsT.InitFromBuf(table.Bytes, table.Pos)
741
- if unionType == BuiltinOptions2().ReduceWindowOptions:
742
+ if unionType == BuiltinOptions2.ReduceWindowOptions:
742
743
  return ReduceWindowOptionsT.InitFromBuf(table.Bytes, table.Pos)
743
- if unionType == BuiltinOptions2().StableHLOCompositeOptions:
744
+ if unionType == BuiltinOptions2.StableHLOCompositeOptions:
744
745
  return StableHLOCompositeOptionsT.InitFromBuf(table.Bytes, table.Pos)
745
- if unionType == BuiltinOptions2().StablehloShiftLeftOptions:
746
+ if unionType == BuiltinOptions2.StablehloShiftLeftOptions:
746
747
  return StablehloShiftLeftOptionsT.InitFromBuf(table.Bytes, table.Pos)
747
- if unionType == BuiltinOptions2().StablehloCaseOptions:
748
+ if unionType == BuiltinOptions2.StablehloCaseOptions:
748
749
  return StablehloCaseOptionsT.InitFromBuf(table.Bytes, table.Pos)
749
750
  return None
750
751
 
@@ -903,8 +904,11 @@ except:
903
904
  class CustomQuantizationT(object):
904
905
 
905
906
  # CustomQuantizationT
906
- def __init__(self):
907
- self.custom = None # type: List[int]
907
+ def __init__(
908
+ self,
909
+ custom = None,
910
+ ):
911
+ self.custom = custom # type: Optional[List[int]]
908
912
 
909
913
  @classmethod
910
914
  def InitFromBuf(cls, buf, pos):
@@ -1015,10 +1019,15 @@ def BlockwiseQuantizationEnd(builder):
1015
1019
  class BlockwiseQuantizationT(object):
1016
1020
 
1017
1021
  # BlockwiseQuantizationT
1018
- def __init__(self):
1019
- self.scales = 0 # type: int
1020
- self.zeroPoints = 0 # type: int
1021
- self.blockSize = 0 # type: int
1022
+ def __init__(
1023
+ self,
1024
+ scales = 0,
1025
+ zeroPoints = 0,
1026
+ blockSize = 0,
1027
+ ):
1028
+ self.scales = scales # type: int
1029
+ self.zeroPoints = zeroPoints # type: int
1030
+ self.blockSize = blockSize # type: int
1022
1031
 
1023
1032
  @classmethod
1024
1033
  def InitFromBuf(cls, buf, pos):
@@ -1257,14 +1266,23 @@ except:
1257
1266
  class QuantizationParametersT(object):
1258
1267
 
1259
1268
  # QuantizationParametersT
1260
- def __init__(self):
1261
- self.min = None # type: List[float]
1262
- self.max = None # type: List[float]
1263
- self.scale = None # type: List[float]
1264
- self.zeroPoint = None # type: List[int]
1265
- self.detailsType = 0 # type: int
1266
- self.details = None # type: Union[None, CustomQuantizationT, BlockwiseQuantizationT]
1267
- self.quantizedDimension = 0 # type: int
1269
+ def __init__(
1270
+ self,
1271
+ min = None,
1272
+ max = None,
1273
+ scale = None,
1274
+ zeroPoint = None,
1275
+ detailsType = 0,
1276
+ details = None,
1277
+ quantizedDimension = 0,
1278
+ ):
1279
+ self.min = min # type: Optional[List[float]]
1280
+ self.max = max # type: Optional[List[float]]
1281
+ self.scale = scale # type: Optional[List[float]]
1282
+ self.zeroPoint = zeroPoint # type: Optional[List[int]]
1283
+ self.detailsType = detailsType # type: int
1284
+ self.details = details # type: Union[None, 'CustomQuantizationT', 'BlockwiseQuantizationT']
1285
+ self.quantizedDimension = quantizedDimension # type: int
1268
1286
 
1269
1287
  @classmethod
1270
1288
  def InitFromBuf(cls, buf, pos):
@@ -1442,8 +1460,11 @@ except:
1442
1460
  class Int32VectorT(object):
1443
1461
 
1444
1462
  # Int32VectorT
1445
- def __init__(self):
1446
- self.values = None # type: List[int]
1463
+ def __init__(
1464
+ self,
1465
+ values = None,
1466
+ ):
1467
+ self.values = values # type: Optional[List[int]]
1447
1468
 
1448
1469
  @classmethod
1449
1470
  def InitFromBuf(cls, buf, pos):
@@ -1561,8 +1582,11 @@ except:
1561
1582
  class Uint16VectorT(object):
1562
1583
 
1563
1584
  # Uint16VectorT
1564
- def __init__(self):
1565
- self.values = None # type: List[int]
1585
+ def __init__(
1586
+ self,
1587
+ values = None,
1588
+ ):
1589
+ self.values = values # type: Optional[List[int]]
1566
1590
 
1567
1591
  @classmethod
1568
1592
  def InitFromBuf(cls, buf, pos):
@@ -1680,8 +1704,11 @@ except:
1680
1704
  class Uint8VectorT(object):
1681
1705
 
1682
1706
  # Uint8VectorT
1683
- def __init__(self):
1684
- self.values = None # type: List[int]
1707
+ def __init__(
1708
+ self,
1709
+ values = None,
1710
+ ):
1711
+ self.values = values # type: Optional[List[int]]
1685
1712
 
1686
1713
  @classmethod
1687
1714
  def InitFromBuf(cls, buf, pos):
@@ -1832,13 +1859,21 @@ except:
1832
1859
  class DimensionMetadataT(object):
1833
1860
 
1834
1861
  # DimensionMetadataT
1835
- def __init__(self):
1836
- self.format = 0 # type: int
1837
- self.denseSize = 0 # type: int
1838
- self.arraySegmentsType = 0 # type: int
1839
- self.arraySegments = None # type: Union[None, Int32VectorT, Uint16VectorT, Uint8VectorT]
1840
- self.arrayIndicesType = 0 # type: int
1841
- self.arrayIndices = None # type: Union[None, Int32VectorT, Uint16VectorT, Uint8VectorT]
1862
+ def __init__(
1863
+ self,
1864
+ format = 0,
1865
+ denseSize = 0,
1866
+ arraySegmentsType = 0,
1867
+ arraySegments = None,
1868
+ arrayIndicesType = 0,
1869
+ arrayIndices = None,
1870
+ ):
1871
+ self.format = format # type: int
1872
+ self.denseSize = denseSize # type: int
1873
+ self.arraySegmentsType = arraySegmentsType # type: int
1874
+ self.arraySegments = arraySegments # type: Union[None, 'Int32VectorT', 'Uint16VectorT', 'Uint8VectorT']
1875
+ self.arrayIndicesType = arrayIndicesType # type: int
1876
+ self.arrayIndices = arrayIndices # type: Union[None, 'Int32VectorT', 'Uint16VectorT', 'Uint8VectorT']
1842
1877
 
1843
1878
  @classmethod
1844
1879
  def InitFromBuf(cls, buf, pos):
@@ -2020,10 +2055,15 @@ except:
2020
2055
  class SparsityParametersT(object):
2021
2056
 
2022
2057
  # SparsityParametersT
2023
- def __init__(self):
2024
- self.traversalOrder = None # type: List[int]
2025
- self.blockMap = None # type: List[int]
2026
- self.dimMetadata = None # type: List[DimensionMetadataT]
2058
+ def __init__(
2059
+ self,
2060
+ traversalOrder = None,
2061
+ blockMap = None,
2062
+ dimMetadata = None,
2063
+ ):
2064
+ self.traversalOrder = traversalOrder # type: Optional[List[int]]
2065
+ self.blockMap = blockMap # type: Optional[List[int]]
2066
+ self.dimMetadata = dimMetadata # type: Optional[List[DimensionMetadataT]]
2027
2067
 
2028
2068
  @classmethod
2029
2069
  def InitFromBuf(cls, buf, pos):
@@ -2196,10 +2236,15 @@ except:
2196
2236
  class VariantSubTypeT(object):
2197
2237
 
2198
2238
  # VariantSubTypeT
2199
- def __init__(self):
2200
- self.shape = None # type: List[int]
2201
- self.type = 0 # type: int
2202
- self.hasRank = False # type: bool
2239
+ def __init__(
2240
+ self,
2241
+ shape = None,
2242
+ type = 0,
2243
+ hasRank = False,
2244
+ ):
2245
+ self.shape = shape # type: Optional[List[int]]
2246
+ self.type = type # type: int
2247
+ self.hasRank = hasRank # type: bool
2203
2248
 
2204
2249
  @classmethod
2205
2250
  def InitFromBuf(cls, buf, pos):
@@ -2406,8 +2451,15 @@ class Tensor(object):
2406
2451
  o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
2407
2452
  return o == 0
2408
2453
 
2454
+ # Tensor
2455
+ def ExternalBuffer(self):
2456
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
2457
+ if o != 0:
2458
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
2459
+ return 0
2460
+
2409
2461
  def TensorStart(builder):
2410
- builder.StartObject(10)
2462
+ builder.StartObject(11)
2411
2463
 
2412
2464
  def TensorAddShape(builder, shape):
2413
2465
  builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0)
@@ -2448,6 +2500,9 @@ def TensorAddVariantTensors(builder, variantTensors):
2448
2500
  def TensorStartVariantTensorsVector(builder, numElems):
2449
2501
  return builder.StartVector(4, numElems, 4)
2450
2502
 
2503
+ def TensorAddExternalBuffer(builder, externalBuffer):
2504
+ builder.PrependUint32Slot(10, externalBuffer, 0)
2505
+
2451
2506
  def TensorEnd(builder):
2452
2507
  return builder.EndObject()
2453
2508
 
@@ -2460,17 +2515,31 @@ except:
2460
2515
  class TensorT(object):
2461
2516
 
2462
2517
  # TensorT
2463
- def __init__(self):
2464
- self.shape = None # type: List[int]
2465
- self.type = 0 # type: int
2466
- self.buffer = 0 # type: int
2467
- self.name = None # type: str
2468
- self.quantization = None # type: Optional[QuantizationParametersT]
2469
- self.isVariable = False # type: bool
2470
- self.sparsity = None # type: Optional[SparsityParametersT]
2471
- self.shapeSignature = None # type: List[int]
2472
- self.hasRank = False # type: bool
2473
- self.variantTensors = None # type: List[VariantSubTypeT]
2518
+ def __init__(
2519
+ self,
2520
+ shape = None,
2521
+ type = 0,
2522
+ buffer = 0,
2523
+ name = None,
2524
+ quantization = None,
2525
+ isVariable = False,
2526
+ sparsity = None,
2527
+ shapeSignature = None,
2528
+ hasRank = False,
2529
+ variantTensors = None,
2530
+ externalBuffer = 0,
2531
+ ):
2532
+ self.shape = shape # type: Optional[List[int]]
2533
+ self.type = type # type: int
2534
+ self.buffer = buffer # type: int
2535
+ self.name = name # type: Optional[str]
2536
+ self.quantization = quantization # type: Optional[QuantizationParametersT]
2537
+ self.isVariable = isVariable # type: bool
2538
+ self.sparsity = sparsity # type: Optional[SparsityParametersT]
2539
+ self.shapeSignature = shapeSignature # type: Optional[List[int]]
2540
+ self.hasRank = hasRank # type: bool
2541
+ self.variantTensors = variantTensors # type: Optional[List[VariantSubTypeT]]
2542
+ self.externalBuffer = externalBuffer # type: int
2474
2543
 
2475
2544
  @classmethod
2476
2545
  def InitFromBuf(cls, buf, pos):
@@ -2524,6 +2593,7 @@ class TensorT(object):
2524
2593
  else:
2525
2594
  variantSubType_ = VariantSubTypeT.InitFromObj(tensor.VariantTensors(i))
2526
2595
  self.variantTensors.append(variantSubType_)
2596
+ self.externalBuffer = tensor.ExternalBuffer()
2527
2597
 
2528
2598
  # TensorT
2529
2599
  def Pack(self, builder):
@@ -2574,6 +2644,7 @@ class TensorT(object):
2574
2644
  TensorAddHasRank(builder, self.hasRank)
2575
2645
  if self.variantTensors is not None:
2576
2646
  TensorAddVariantTensors(builder, variantTensors)
2647
+ TensorAddExternalBuffer(builder, self.externalBuffer)
2577
2648
  tensor = TensorEnd(builder)
2578
2649
  return tensor
2579
2650
 
@@ -2767,13 +2838,21 @@ except:
2767
2838
  class StablehloGatherOptionsT(object):
2768
2839
 
2769
2840
  # StablehloGatherOptionsT
2770
- def __init__(self):
2771
- self.offsetDims = None # type: List[int]
2772
- self.collapsedSliceDims = None # type: List[int]
2773
- self.startIndexMap = None # type: List[int]
2774
- self.indexVectorDim = 0 # type: int
2775
- self.sliceSizes = None # type: List[int]
2776
- self.indicesAreSorted = False # type: bool
2841
+ def __init__(
2842
+ self,
2843
+ offsetDims = None,
2844
+ collapsedSliceDims = None,
2845
+ startIndexMap = None,
2846
+ indexVectorDim = 0,
2847
+ sliceSizes = None,
2848
+ indicesAreSorted = False,
2849
+ ):
2850
+ self.offsetDims = offsetDims # type: Optional[List[int]]
2851
+ self.collapsedSliceDims = collapsedSliceDims # type: Optional[List[int]]
2852
+ self.startIndexMap = startIndexMap # type: Optional[List[int]]
2853
+ self.indexVectorDim = indexVectorDim # type: int
2854
+ self.sliceSizes = sliceSizes # type: Optional[List[int]]
2855
+ self.indicesAreSorted = indicesAreSorted # type: bool
2777
2856
 
2778
2857
  @classmethod
2779
2858
  def InitFromBuf(cls, buf, pos):
@@ -2946,8 +3025,11 @@ except:
2946
3025
  class StablehloTransposeOptionsT(object):
2947
3026
 
2948
3027
  # StablehloTransposeOptionsT
2949
- def __init__(self):
2950
- self.permutation = None # type: List[int]
3028
+ def __init__(
3029
+ self,
3030
+ permutation = None,
3031
+ ):
3032
+ self.permutation = permutation # type: Optional[List[int]]
2951
3033
 
2952
3034
  @classmethod
2953
3035
  def InitFromBuf(cls, buf, pos):
@@ -3197,12 +3279,19 @@ except:
3197
3279
  class StablehloDotGeneralOptionsT(object):
3198
3280
 
3199
3281
  # StablehloDotGeneralOptionsT
3200
- def __init__(self):
3201
- self.lhsBatchingDimensions = None # type: List[int]
3202
- self.rhsBatchingDimensions = None # type: List[int]
3203
- self.lhsContractingDimensions = None # type: List[int]
3204
- self.rhsContractingDimensions = None # type: List[int]
3205
- self.precisionConfig = None # type: List[int]
3282
+ def __init__(
3283
+ self,
3284
+ lhsBatchingDimensions = None,
3285
+ rhsBatchingDimensions = None,
3286
+ lhsContractingDimensions = None,
3287
+ rhsContractingDimensions = None,
3288
+ precisionConfig = None,
3289
+ ):
3290
+ self.lhsBatchingDimensions = lhsBatchingDimensions # type: Optional[List[int]]
3291
+ self.rhsBatchingDimensions = rhsBatchingDimensions # type: Optional[List[int]]
3292
+ self.lhsContractingDimensions = lhsContractingDimensions # type: Optional[List[int]]
3293
+ self.rhsContractingDimensions = rhsContractingDimensions # type: Optional[List[int]]
3294
+ self.precisionConfig = precisionConfig # type: Optional[List[int]]
3206
3295
 
3207
3296
  @classmethod
3208
3297
  def InitFromBuf(cls, buf, pos):
@@ -3530,13 +3619,21 @@ except:
3530
3619
  class StablehloReduceWindowOptionsT(object):
3531
3620
 
3532
3621
  # StablehloReduceWindowOptionsT
3533
- def __init__(self):
3534
- self.windowDimensions = None # type: List[int]
3535
- self.windowStrides = None # type: List[int]
3536
- self.baseDilations = None # type: List[int]
3537
- self.windowDilations = None # type: List[int]
3538
- self.padding = None # type: List[int]
3539
- self.bodySubgraphIndex = 0 # type: int
3622
+ def __init__(
3623
+ self,
3624
+ windowDimensions = None,
3625
+ windowStrides = None,
3626
+ baseDilations = None,
3627
+ windowDilations = None,
3628
+ padding = None,
3629
+ bodySubgraphIndex = 0,
3630
+ ):
3631
+ self.windowDimensions = windowDimensions # type: Optional[List[int]]
3632
+ self.windowStrides = windowStrides # type: Optional[List[int]]
3633
+ self.baseDilations = baseDilations # type: Optional[List[int]]
3634
+ self.windowDilations = windowDilations # type: Optional[List[int]]
3635
+ self.padding = padding # type: Optional[List[int]]
3636
+ self.bodySubgraphIndex = bodySubgraphIndex # type: int
3540
3637
 
3541
3638
  @classmethod
3542
3639
  def InitFromBuf(cls, buf, pos):
@@ -3707,9 +3804,13 @@ def StablehloWhileOptionsEnd(builder):
3707
3804
  class StablehloWhileOptionsT(object):
3708
3805
 
3709
3806
  # StablehloWhileOptionsT
3710
- def __init__(self):
3711
- self.condSubgraphIndex = 0 # type: int
3712
- self.bodySubgraphIndex = 0 # type: int
3807
+ def __init__(
3808
+ self,
3809
+ condSubgraphIndex = 0,
3810
+ bodySubgraphIndex = 0,
3811
+ ):
3812
+ self.condSubgraphIndex = condSubgraphIndex # type: int
3813
+ self.bodySubgraphIndex = bodySubgraphIndex # type: int
3713
3814
 
3714
3815
  @classmethod
3715
3816
  def InitFromBuf(cls, buf, pos):
@@ -3807,10 +3908,15 @@ def StablehloSortOptionsEnd(builder):
3807
3908
  class StablehloSortOptionsT(object):
3808
3909
 
3809
3910
  # StablehloSortOptionsT
3810
- def __init__(self):
3811
- self.dimension = 0 # type: int
3812
- self.isStable = False # type: bool
3813
- self.comparatorSubgraphIndex = 0 # type: int
3911
+ def __init__(
3912
+ self,
3913
+ dimension = 0,
3914
+ isStable = False,
3915
+ comparatorSubgraphIndex = 0,
3916
+ ):
3917
+ self.dimension = dimension # type: int
3918
+ self.isStable = isStable # type: bool
3919
+ self.comparatorSubgraphIndex = comparatorSubgraphIndex # type: int
3814
3920
 
3815
3921
  @classmethod
3816
3922
  def InitFromBuf(cls, buf, pos):
@@ -3890,8 +3996,11 @@ def StablehloConcatenateOptionsEnd(builder):
3890
3996
  class StablehloConcatenateOptionsT(object):
3891
3997
 
3892
3998
  # StablehloConcatenateOptionsT
3893
- def __init__(self):
3894
- self.dimension = 0 # type: int
3999
+ def __init__(
4000
+ self,
4001
+ dimension = 0,
4002
+ ):
4003
+ self.dimension = dimension # type: int
3895
4004
 
3896
4005
  @classmethod
3897
4006
  def InitFromBuf(cls, buf, pos):
@@ -3994,8 +4103,11 @@ except:
3994
4103
  class StablehloBroadcastInDimOptionsT(object):
3995
4104
 
3996
4105
  # StablehloBroadcastInDimOptionsT
3997
- def __init__(self):
3998
- self.broadcastDimensions = None # type: List[int]
4106
+ def __init__(
4107
+ self,
4108
+ broadcastDimensions = None,
4109
+ ):
4110
+ self.broadcastDimensions = broadcastDimensions # type: Optional[List[int]]
3999
4111
 
4000
4112
  @classmethod
4001
4113
  def InitFromBuf(cls, buf, pos):
@@ -4096,9 +4208,13 @@ def StablehloCompareOptionsEnd(builder):
4096
4208
  class StablehloCompareOptionsT(object):
4097
4209
 
4098
4210
  # StablehloCompareOptionsT
4099
- def __init__(self):
4100
- self.comparisonDirection = 0 # type: int
4101
- self.compareType = 0 # type: int
4211
+ def __init__(
4212
+ self,
4213
+ comparisonDirection = 0,
4214
+ compareType = 0,
4215
+ ):
4216
+ self.comparisonDirection = comparisonDirection # type: int
4217
+ self.compareType = compareType # type: int
4102
4218
 
4103
4219
  @classmethod
4104
4220
  def InitFromBuf(cls, buf, pos):
@@ -4203,8 +4319,11 @@ except:
4203
4319
  class StablehloDynamicSliceOptionsT(object):
4204
4320
 
4205
4321
  # StablehloDynamicSliceOptionsT
4206
- def __init__(self):
4207
- self.sliceSizes = None # type: List[int]
4322
+ def __init__(
4323
+ self,
4324
+ sliceSizes = None,
4325
+ ):
4326
+ self.sliceSizes = sliceSizes # type: Optional[List[int]]
4208
4327
 
4209
4328
  @classmethod
4210
4329
  def InitFromBuf(cls, buf, pos):
@@ -4388,10 +4507,15 @@ except:
4388
4507
  class StablehloPadOptionsT(object):
4389
4508
 
4390
4509
  # StablehloPadOptionsT
4391
- def __init__(self):
4392
- self.edgePaddingLow = None # type: List[int]
4393
- self.edgePaddingHigh = None # type: List[int]
4394
- self.interiorPadding = None # type: List[int]
4510
+ def __init__(
4511
+ self,
4512
+ edgePaddingLow = None,
4513
+ edgePaddingHigh = None,
4514
+ interiorPadding = None,
4515
+ ):
4516
+ self.edgePaddingLow = edgePaddingLow # type: Optional[List[int]]
4517
+ self.edgePaddingHigh = edgePaddingHigh # type: Optional[List[int]]
4518
+ self.interiorPadding = interiorPadding # type: Optional[List[int]]
4395
4519
 
4396
4520
  @classmethod
4397
4521
  def InitFromBuf(cls, buf, pos):
@@ -4516,8 +4640,11 @@ def StablehloIotaOptionsEnd(builder):
4516
4640
  class StablehloIotaOptionsT(object):
4517
4641
 
4518
4642
  # StablehloIotaOptionsT
4519
- def __init__(self):
4520
- self.iotaDimension = 0 # type: int
4643
+ def __init__(
4644
+ self,
4645
+ iotaDimension = 0,
4646
+ ):
4647
+ self.iotaDimension = iotaDimension # type: int
4521
4648
 
4522
4649
  @classmethod
4523
4650
  def InitFromBuf(cls, buf, pos):
@@ -4693,13 +4820,21 @@ except:
4693
4820
  class StablehloCustomCallOptionsT(object):
4694
4821
 
4695
4822
  # StablehloCustomCallOptionsT
4696
- def __init__(self):
4697
- self.callTargetName = None # type: str
4698
- self.hasSideEffect = False # type: bool
4699
- self.backendConfig = None # type: str
4700
- self.apiVersion = 0 # type: int
4701
- self.calledComputations = None # type: List[int]
4702
- self.customAttributes = None # type: List[int]
4823
+ def __init__(
4824
+ self,
4825
+ callTargetName = None,
4826
+ hasSideEffect = False,
4827
+ backendConfig = None,
4828
+ apiVersion = 0,
4829
+ calledComputations = None,
4830
+ customAttributes = None,
4831
+ ):
4832
+ self.callTargetName = callTargetName # type: Optional[str]
4833
+ self.hasSideEffect = hasSideEffect # type: bool
4834
+ self.backendConfig = backendConfig # type: Optional[str]
4835
+ self.apiVersion = apiVersion # type: int
4836
+ self.calledComputations = calledComputations # type: Optional[List[int]]
4837
+ self.customAttributes = customAttributes # type: Optional[List[int]]
4703
4838
 
4704
4839
  @classmethod
4705
4840
  def InitFromBuf(cls, buf, pos):
@@ -4858,9 +4993,13 @@ except:
4858
4993
  class StablehloReduceOptionsT(object):
4859
4994
 
4860
4995
  # StablehloReduceOptionsT
4861
- def __init__(self):
4862
- self.dimensions = None # type: List[int]
4863
- self.bodySubgraphIndex = 0 # type: int
4996
+ def __init__(
4997
+ self,
4998
+ dimensions = None,
4999
+ bodySubgraphIndex = 0,
5000
+ ):
5001
+ self.dimensions = dimensions # type: Optional[List[int]]
5002
+ self.bodySubgraphIndex = bodySubgraphIndex # type: int
4864
5003
 
4865
5004
  @classmethod
4866
5005
  def InitFromBuf(cls, buf, pos):
@@ -5046,10 +5185,15 @@ except:
5046
5185
  class StablehloSliceOptionsT(object):
5047
5186
 
5048
5187
  # StablehloSliceOptionsT
5049
- def __init__(self):
5050
- self.startIndices = None # type: List[int]
5051
- self.limitIndices = None # type: List[int]
5052
- self.strides = None # type: List[int]
5188
+ def __init__(
5189
+ self,
5190
+ startIndices = None,
5191
+ limitIndices = None,
5192
+ strides = None,
5193
+ ):
5194
+ self.startIndices = startIndices # type: Optional[List[int]]
5195
+ self.limitIndices = limitIndices # type: Optional[List[int]]
5196
+ self.strides = strides # type: Optional[List[int]]
5053
5197
 
5054
5198
  @classmethod
5055
5199
  def InitFromBuf(cls, buf, pos):
@@ -5545,24 +5689,43 @@ except:
5545
5689
  class StablehloConvolutionOptionsT(object):
5546
5690
 
5547
5691
  # StablehloConvolutionOptionsT
5548
- def __init__(self):
5549
- self.windowStrides = None # type: List[int]
5550
- self.padding = None # type: List[int]
5551
- self.lhsDilation = None # type: List[int]
5552
- self.rhsDilation = None # type: List[int]
5553
- self.windowReversal = None # type: List[bool]
5554
- self.inputBatchDimension = 0 # type: int
5555
- self.inputFeatureDimension = 0 # type: int
5556
- self.inputSpatialDimensions = None # type: List[int]
5557
- self.kernelInputFeatureDimension = 0 # type: int
5558
- self.kernelOutputFeatureDimension = 0 # type: int
5559
- self.kernelSpatialDimensions = None # type: List[int]
5560
- self.outputBatchDimension = 0 # type: int
5561
- self.outputFeatureDimension = 0 # type: int
5562
- self.outputSpatialDimensions = None # type: List[int]
5563
- self.featureGroupCount = 0 # type: int
5564
- self.batchGroupCount = 0 # type: int
5565
- self.precisionConfig = None # type: List[int]
5692
+ def __init__(
5693
+ self,
5694
+ windowStrides = None,
5695
+ padding = None,
5696
+ lhsDilation = None,
5697
+ rhsDilation = None,
5698
+ windowReversal = None,
5699
+ inputBatchDimension = 0,
5700
+ inputFeatureDimension = 0,
5701
+ inputSpatialDimensions = None,
5702
+ kernelInputFeatureDimension = 0,
5703
+ kernelOutputFeatureDimension = 0,
5704
+ kernelSpatialDimensions = None,
5705
+ outputBatchDimension = 0,
5706
+ outputFeatureDimension = 0,
5707
+ outputSpatialDimensions = None,
5708
+ featureGroupCount = 0,
5709
+ batchGroupCount = 0,
5710
+ precisionConfig = None,
5711
+ ):
5712
+ self.windowStrides = windowStrides # type: Optional[List[int]]
5713
+ self.padding = padding # type: Optional[List[int]]
5714
+ self.lhsDilation = lhsDilation # type: Optional[List[int]]
5715
+ self.rhsDilation = rhsDilation # type: Optional[List[int]]
5716
+ self.windowReversal = windowReversal # type: Optional[List[bool]]
5717
+ self.inputBatchDimension = inputBatchDimension # type: int
5718
+ self.inputFeatureDimension = inputFeatureDimension # type: int
5719
+ self.inputSpatialDimensions = inputSpatialDimensions # type: Optional[List[int]]
5720
+ self.kernelInputFeatureDimension = kernelInputFeatureDimension # type: int
5721
+ self.kernelOutputFeatureDimension = kernelOutputFeatureDimension # type: int
5722
+ self.kernelSpatialDimensions = kernelSpatialDimensions # type: Optional[List[int]]
5723
+ self.outputBatchDimension = outputBatchDimension # type: int
5724
+ self.outputFeatureDimension = outputFeatureDimension # type: int
5725
+ self.outputSpatialDimensions = outputSpatialDimensions # type: Optional[List[int]]
5726
+ self.featureGroupCount = featureGroupCount # type: int
5727
+ self.batchGroupCount = batchGroupCount # type: int
5728
+ self.precisionConfig = precisionConfig # type: Optional[List[int]]
5566
5729
 
5567
5730
  @classmethod
5568
5731
  def InitFromBuf(cls, buf, pos):
@@ -5938,14 +6101,23 @@ except:
5938
6101
  class StablehloScatterOptionsT(object):
5939
6102
 
5940
6103
  # StablehloScatterOptionsT
5941
- def __init__(self):
5942
- self.indicesAreSorted = False # type: bool
5943
- self.updateWindowDims = None # type: List[int]
5944
- self.insertedWindowDims = None # type: List[int]
5945
- self.scatterDimsToOperandDims = None # type: List[int]
5946
- self.indexVectorDim = 0 # type: int
5947
- self.uniqueIndices = False # type: bool
5948
- self.updateComputationSubgraphIndex = 0 # type: int
6104
+ def __init__(
6105
+ self,
6106
+ indicesAreSorted = False,
6107
+ updateWindowDims = None,
6108
+ insertedWindowDims = None,
6109
+ scatterDimsToOperandDims = None,
6110
+ indexVectorDim = 0,
6111
+ uniqueIndices = False,
6112
+ updateComputationSubgraphIndex = 0,
6113
+ ):
6114
+ self.indicesAreSorted = indicesAreSorted # type: bool
6115
+ self.updateWindowDims = updateWindowDims # type: Optional[List[int]]
6116
+ self.insertedWindowDims = insertedWindowDims # type: Optional[List[int]]
6117
+ self.scatterDimsToOperandDims = scatterDimsToOperandDims # type: Optional[List[int]]
6118
+ self.indexVectorDim = indexVectorDim # type: int
6119
+ self.uniqueIndices = uniqueIndices # type: bool
6120
+ self.updateComputationSubgraphIndex = updateComputationSubgraphIndex # type: int
5949
6121
 
5950
6122
  @classmethod
5951
6123
  def InitFromBuf(cls, buf, pos):
@@ -6105,8 +6277,11 @@ except:
6105
6277
  class StablehloCaseOptionsT(object):
6106
6278
 
6107
6279
  # StablehloCaseOptionsT
6108
- def __init__(self):
6109
- self.branchSubgraphIndices = None # type: List[int]
6280
+ def __init__(
6281
+ self,
6282
+ branchSubgraphIndices = None,
6283
+ ):
6284
+ self.branchSubgraphIndices = branchSubgraphIndices # type: Optional[List[int]]
6110
6285
 
6111
6286
  @classmethod
6112
6287
  def InitFromBuf(cls, buf, pos):
@@ -6197,8 +6372,11 @@ def StablehloRngBitGeneratorOptionsEnd(builder):
6197
6372
  class StablehloRngBitGeneratorOptionsT(object):
6198
6373
 
6199
6374
  # StablehloRngBitGeneratorOptionsT
6200
- def __init__(self):
6201
- self.algorithm = 0 # type: int
6375
+ def __init__(
6376
+ self,
6377
+ algorithm = 0,
6378
+ ):
6379
+ self.algorithm = algorithm # type: int
6202
6380
 
6203
6381
  @classmethod
6204
6382
  def InitFromBuf(cls, buf, pos):
@@ -6334,14 +6512,23 @@ def Conv2DOptionsEnd(builder):
6334
6512
  class Conv2DOptionsT(object):
6335
6513
 
6336
6514
  # Conv2DOptionsT
6337
- def __init__(self):
6338
- self.padding = 0 # type: int
6339
- self.strideW = 0 # type: int
6340
- self.strideH = 0 # type: int
6341
- self.fusedActivationFunction = 0 # type: int
6342
- self.dilationWFactor = 1 # type: int
6343
- self.dilationHFactor = 1 # type: int
6344
- self.quantizedBiasType = 0 # type: int
6515
+ def __init__(
6516
+ self,
6517
+ padding = 0,
6518
+ strideW = 0,
6519
+ strideH = 0,
6520
+ fusedActivationFunction = 0,
6521
+ dilationWFactor = 1,
6522
+ dilationHFactor = 1,
6523
+ quantizedBiasType = 0,
6524
+ ):
6525
+ self.padding = padding # type: int
6526
+ self.strideW = strideW # type: int
6527
+ self.strideH = strideH # type: int
6528
+ self.fusedActivationFunction = fusedActivationFunction # type: int
6529
+ self.dilationWFactor = dilationWFactor # type: int
6530
+ self.dilationHFactor = dilationHFactor # type: int
6531
+ self.quantizedBiasType = quantizedBiasType # type: int
6345
6532
 
6346
6533
  @classmethod
6347
6534
  def InitFromBuf(cls, buf, pos):
@@ -6499,15 +6686,25 @@ def Conv3DOptionsEnd(builder):
6499
6686
  class Conv3DOptionsT(object):
6500
6687
 
6501
6688
  # Conv3DOptionsT
6502
- def __init__(self):
6503
- self.padding = 0 # type: int
6504
- self.strideD = 0 # type: int
6505
- self.strideW = 0 # type: int
6506
- self.strideH = 0 # type: int
6507
- self.fusedActivationFunction = 0 # type: int
6508
- self.dilationDFactor = 1 # type: int
6509
- self.dilationWFactor = 1 # type: int
6510
- self.dilationHFactor = 1 # type: int
6689
+ def __init__(
6690
+ self,
6691
+ padding = 0,
6692
+ strideD = 0,
6693
+ strideW = 0,
6694
+ strideH = 0,
6695
+ fusedActivationFunction = 0,
6696
+ dilationDFactor = 1,
6697
+ dilationWFactor = 1,
6698
+ dilationHFactor = 1,
6699
+ ):
6700
+ self.padding = padding # type: int
6701
+ self.strideD = strideD # type: int
6702
+ self.strideW = strideW # type: int
6703
+ self.strideH = strideH # type: int
6704
+ self.fusedActivationFunction = fusedActivationFunction # type: int
6705
+ self.dilationDFactor = dilationDFactor # type: int
6706
+ self.dilationWFactor = dilationWFactor # type: int
6707
+ self.dilationHFactor = dilationHFactor # type: int
6511
6708
 
6512
6709
  @classmethod
6513
6710
  def InitFromBuf(cls, buf, pos):
@@ -6647,13 +6844,21 @@ def Pool2DOptionsEnd(builder):
6647
6844
  class Pool2DOptionsT(object):
6648
6845
 
6649
6846
  # Pool2DOptionsT
6650
- def __init__(self):
6651
- self.padding = 0 # type: int
6652
- self.strideW = 0 # type: int
6653
- self.strideH = 0 # type: int
6654
- self.filterWidth = 0 # type: int
6655
- self.filterHeight = 0 # type: int
6656
- self.fusedActivationFunction = 0 # type: int
6847
+ def __init__(
6848
+ self,
6849
+ padding = 0,
6850
+ strideW = 0,
6851
+ strideH = 0,
6852
+ filterWidth = 0,
6853
+ filterHeight = 0,
6854
+ fusedActivationFunction = 0,
6855
+ ):
6856
+ self.padding = padding # type: int
6857
+ self.strideW = strideW # type: int
6858
+ self.strideH = strideH # type: int
6859
+ self.filterWidth = filterWidth # type: int
6860
+ self.filterHeight = filterHeight # type: int
6861
+ self.fusedActivationFunction = fusedActivationFunction # type: int
6657
6862
 
6658
6863
  @classmethod
6659
6864
  def InitFromBuf(cls, buf, pos):
@@ -6799,14 +7004,23 @@ def DepthwiseConv2DOptionsEnd(builder):
6799
7004
  class DepthwiseConv2DOptionsT(object):
6800
7005
 
6801
7006
  # DepthwiseConv2DOptionsT
6802
- def __init__(self):
6803
- self.padding = 0 # type: int
6804
- self.strideW = 0 # type: int
6805
- self.strideH = 0 # type: int
6806
- self.depthMultiplier = 0 # type: int
6807
- self.fusedActivationFunction = 0 # type: int
6808
- self.dilationWFactor = 1 # type: int
6809
- self.dilationHFactor = 1 # type: int
7007
+ def __init__(
7008
+ self,
7009
+ padding = 0,
7010
+ strideW = 0,
7011
+ strideH = 0,
7012
+ depthMultiplier = 0,
7013
+ fusedActivationFunction = 0,
7014
+ dilationWFactor = 1,
7015
+ dilationHFactor = 1,
7016
+ ):
7017
+ self.padding = padding # type: int
7018
+ self.strideW = strideW # type: int
7019
+ self.strideH = strideH # type: int
7020
+ self.depthMultiplier = depthMultiplier # type: int
7021
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7022
+ self.dilationWFactor = dilationWFactor # type: int
7023
+ self.dilationHFactor = dilationHFactor # type: int
6810
7024
 
6811
7025
  @classmethod
6812
7026
  def InitFromBuf(cls, buf, pos):
@@ -6964,10 +7178,15 @@ except:
6964
7178
  class ConcatEmbeddingsOptionsT(object):
6965
7179
 
6966
7180
  # ConcatEmbeddingsOptionsT
6967
- def __init__(self):
6968
- self.numChannels = 0 # type: int
6969
- self.numColumnsPerChannel = None # type: List[int]
6970
- self.embeddingDimPerChannel = None # type: List[int]
7181
+ def __init__(
7182
+ self,
7183
+ numChannels = 0,
7184
+ numColumnsPerChannel = None,
7185
+ embeddingDimPerChannel = None,
7186
+ ):
7187
+ self.numChannels = numChannels # type: int
7188
+ self.numColumnsPerChannel = numColumnsPerChannel # type: Optional[List[int]]
7189
+ self.embeddingDimPerChannel = embeddingDimPerChannel # type: Optional[List[int]]
6971
7190
 
6972
7191
  @classmethod
6973
7192
  def InitFromBuf(cls, buf, pos):
@@ -7077,8 +7296,11 @@ def LSHProjectionOptionsEnd(builder):
7077
7296
  class LSHProjectionOptionsT(object):
7078
7297
 
7079
7298
  # LSHProjectionOptionsT
7080
- def __init__(self):
7081
- self.type = 0 # type: int
7299
+ def __init__(
7300
+ self,
7301
+ type = 0,
7302
+ ):
7303
+ self.type = type # type: int
7082
7304
 
7083
7305
  @classmethod
7084
7306
  def InitFromBuf(cls, buf, pos):
@@ -7174,10 +7396,15 @@ def SVDFOptionsEnd(builder):
7174
7396
  class SVDFOptionsT(object):
7175
7397
 
7176
7398
  # SVDFOptionsT
7177
- def __init__(self):
7178
- self.rank = 0 # type: int
7179
- self.fusedActivationFunction = 0 # type: int
7180
- self.asymmetricQuantizeInputs = False # type: bool
7399
+ def __init__(
7400
+ self,
7401
+ rank = 0,
7402
+ fusedActivationFunction = 0,
7403
+ asymmetricQuantizeInputs = False,
7404
+ ):
7405
+ self.rank = rank # type: int
7406
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7407
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
7181
7408
 
7182
7409
  @classmethod
7183
7410
  def InitFromBuf(cls, buf, pos):
@@ -7267,9 +7494,13 @@ def RNNOptionsEnd(builder):
7267
7494
  class RNNOptionsT(object):
7268
7495
 
7269
7496
  # RNNOptionsT
7270
- def __init__(self):
7271
- self.fusedActivationFunction = 0 # type: int
7272
- self.asymmetricQuantizeInputs = False # type: bool
7497
+ def __init__(
7498
+ self,
7499
+ fusedActivationFunction = 0,
7500
+ asymmetricQuantizeInputs = False,
7501
+ ):
7502
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7503
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
7273
7504
 
7274
7505
  @classmethod
7275
7506
  def InitFromBuf(cls, buf, pos):
@@ -7367,10 +7598,15 @@ def SequenceRNNOptionsEnd(builder):
7367
7598
  class SequenceRNNOptionsT(object):
7368
7599
 
7369
7600
  # SequenceRNNOptionsT
7370
- def __init__(self):
7371
- self.timeMajor = False # type: bool
7372
- self.fusedActivationFunction = 0 # type: int
7373
- self.asymmetricQuantizeInputs = False # type: bool
7601
+ def __init__(
7602
+ self,
7603
+ timeMajor = False,
7604
+ fusedActivationFunction = 0,
7605
+ asymmetricQuantizeInputs = False,
7606
+ ):
7607
+ self.timeMajor = timeMajor # type: bool
7608
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7609
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
7374
7610
 
7375
7611
  @classmethod
7376
7612
  def InitFromBuf(cls, buf, pos):
@@ -7480,11 +7716,17 @@ def BidirectionalSequenceRNNOptionsEnd(builder):
7480
7716
  class BidirectionalSequenceRNNOptionsT(object):
7481
7717
 
7482
7718
  # BidirectionalSequenceRNNOptionsT
7483
- def __init__(self):
7484
- self.timeMajor = False # type: bool
7485
- self.fusedActivationFunction = 0 # type: int
7486
- self.mergeOutputs = False # type: bool
7487
- self.asymmetricQuantizeInputs = False # type: bool
7719
+ def __init__(
7720
+ self,
7721
+ timeMajor = False,
7722
+ fusedActivationFunction = 0,
7723
+ mergeOutputs = False,
7724
+ asymmetricQuantizeInputs = False,
7725
+ ):
7726
+ self.timeMajor = timeMajor # type: bool
7727
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7728
+ self.mergeOutputs = mergeOutputs # type: bool
7729
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
7488
7730
 
7489
7731
  @classmethod
7490
7732
  def InitFromBuf(cls, buf, pos):
@@ -7606,12 +7848,19 @@ def FullyConnectedOptionsEnd(builder):
7606
7848
  class FullyConnectedOptionsT(object):
7607
7849
 
7608
7850
  # FullyConnectedOptionsT
7609
- def __init__(self):
7610
- self.fusedActivationFunction = 0 # type: int
7611
- self.weightsFormat = 0 # type: int
7612
- self.keepNumDims = False # type: bool
7613
- self.asymmetricQuantizeInputs = False # type: bool
7614
- self.quantizedBiasType = 0 # type: int
7851
+ def __init__(
7852
+ self,
7853
+ fusedActivationFunction = 0,
7854
+ weightsFormat = 0,
7855
+ keepNumDims = False,
7856
+ asymmetricQuantizeInputs = False,
7857
+ quantizedBiasType = 0,
7858
+ ):
7859
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7860
+ self.weightsFormat = weightsFormat # type: int
7861
+ self.keepNumDims = keepNumDims # type: bool
7862
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
7863
+ self.quantizedBiasType = quantizedBiasType # type: int
7615
7864
 
7616
7865
  @classmethod
7617
7866
  def InitFromBuf(cls, buf, pos):
@@ -7695,8 +7944,11 @@ def SoftmaxOptionsEnd(builder):
7695
7944
  class SoftmaxOptionsT(object):
7696
7945
 
7697
7946
  # SoftmaxOptionsT
7698
- def __init__(self):
7699
- self.beta = 0.0 # type: float
7947
+ def __init__(
7948
+ self,
7949
+ beta = 0.0,
7950
+ ):
7951
+ self.beta = beta # type: float
7700
7952
 
7701
7953
  @classmethod
7702
7954
  def InitFromBuf(cls, buf, pos):
@@ -7782,9 +8034,13 @@ def ConcatenationOptionsEnd(builder):
7782
8034
  class ConcatenationOptionsT(object):
7783
8035
 
7784
8036
  # ConcatenationOptionsT
7785
- def __init__(self):
7786
- self.axis = 0 # type: int
7787
- self.fusedActivationFunction = 0 # type: int
8037
+ def __init__(
8038
+ self,
8039
+ axis = 0,
8040
+ fusedActivationFunction = 0,
8041
+ ):
8042
+ self.axis = axis # type: int
8043
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7788
8044
 
7789
8045
  @classmethod
7790
8046
  def InitFromBuf(cls, buf, pos):
@@ -7872,9 +8128,13 @@ def AddOptionsEnd(builder):
7872
8128
  class AddOptionsT(object):
7873
8129
 
7874
8130
  # AddOptionsT
7875
- def __init__(self):
7876
- self.fusedActivationFunction = 0 # type: int
7877
- self.potScaleInt16 = True # type: bool
8131
+ def __init__(
8132
+ self,
8133
+ fusedActivationFunction = 0,
8134
+ potScaleInt16 = True,
8135
+ ):
8136
+ self.fusedActivationFunction = fusedActivationFunction # type: int
8137
+ self.potScaleInt16 = potScaleInt16 # type: bool
7878
8138
 
7879
8139
  @classmethod
7880
8140
  def InitFromBuf(cls, buf, pos):
@@ -7952,8 +8212,11 @@ def MulOptionsEnd(builder):
7952
8212
  class MulOptionsT(object):
7953
8213
 
7954
8214
  # MulOptionsT
7955
- def __init__(self):
7956
- self.fusedActivationFunction = 0 # type: int
8215
+ def __init__(
8216
+ self,
8217
+ fusedActivationFunction = 0,
8218
+ ):
8219
+ self.fusedActivationFunction = fusedActivationFunction # type: int
7957
8220
 
7958
8221
  @classmethod
7959
8222
  def InitFromBuf(cls, buf, pos):
@@ -8029,8 +8292,11 @@ def L2NormOptionsEnd(builder):
8029
8292
  class L2NormOptionsT(object):
8030
8293
 
8031
8294
  # L2NormOptionsT
8032
- def __init__(self):
8033
- self.fusedActivationFunction = 0 # type: int
8295
+ def __init__(
8296
+ self,
8297
+ fusedActivationFunction = 0,
8298
+ ):
8299
+ self.fusedActivationFunction = fusedActivationFunction # type: int
8034
8300
 
8035
8301
  @classmethod
8036
8302
  def InitFromBuf(cls, buf, pos):
@@ -8136,11 +8402,17 @@ def LocalResponseNormalizationOptionsEnd(builder):
8136
8402
  class LocalResponseNormalizationOptionsT(object):
8137
8403
 
8138
8404
  # LocalResponseNormalizationOptionsT
8139
- def __init__(self):
8140
- self.radius = 0 # type: int
8141
- self.bias = 0.0 # type: float
8142
- self.alpha = 0.0 # type: float
8143
- self.beta = 0.0 # type: float
8405
+ def __init__(
8406
+ self,
8407
+ radius = 0,
8408
+ bias = 0.0,
8409
+ alpha = 0.0,
8410
+ beta = 0.0,
8411
+ ):
8412
+ self.radius = radius # type: int
8413
+ self.bias = bias # type: float
8414
+ self.alpha = alpha # type: float
8415
+ self.beta = beta # type: float
8144
8416
 
8145
8417
  @classmethod
8146
8418
  def InitFromBuf(cls, buf, pos):
@@ -8262,12 +8534,19 @@ def LSTMOptionsEnd(builder):
8262
8534
  class LSTMOptionsT(object):
8263
8535
 
8264
8536
  # LSTMOptionsT
8265
- def __init__(self):
8266
- self.fusedActivationFunction = 0 # type: int
8267
- self.cellClip = 0.0 # type: float
8268
- self.projClip = 0.0 # type: float
8269
- self.kernelType = 0 # type: int
8270
- self.asymmetricQuantizeInputs = False # type: bool
8537
+ def __init__(
8538
+ self,
8539
+ fusedActivationFunction = 0,
8540
+ cellClip = 0.0,
8541
+ projClip = 0.0,
8542
+ kernelType = 0,
8543
+ asymmetricQuantizeInputs = False,
8544
+ ):
8545
+ self.fusedActivationFunction = fusedActivationFunction # type: int
8546
+ self.cellClip = cellClip # type: float
8547
+ self.projClip = projClip # type: float
8548
+ self.kernelType = kernelType # type: int
8549
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
8271
8550
 
8272
8551
  @classmethod
8273
8552
  def InitFromBuf(cls, buf, pos):
@@ -8401,13 +8680,21 @@ def UnidirectionalSequenceLSTMOptionsEnd(builder):
8401
8680
  class UnidirectionalSequenceLSTMOptionsT(object):
8402
8681
 
8403
8682
  # UnidirectionalSequenceLSTMOptionsT
8404
- def __init__(self):
8405
- self.fusedActivationFunction = 0 # type: int
8406
- self.cellClip = 0.0 # type: float
8407
- self.projClip = 0.0 # type: float
8408
- self.timeMajor = False # type: bool
8409
- self.asymmetricQuantizeInputs = False # type: bool
8410
- self.diagonalRecurrentTensors = False # type: bool
8683
+ def __init__(
8684
+ self,
8685
+ fusedActivationFunction = 0,
8686
+ cellClip = 0.0,
8687
+ projClip = 0.0,
8688
+ timeMajor = False,
8689
+ asymmetricQuantizeInputs = False,
8690
+ diagonalRecurrentTensors = False,
8691
+ ):
8692
+ self.fusedActivationFunction = fusedActivationFunction # type: int
8693
+ self.cellClip = cellClip # type: float
8694
+ self.projClip = projClip # type: float
8695
+ self.timeMajor = timeMajor # type: bool
8696
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
8697
+ self.diagonalRecurrentTensors = diagonalRecurrentTensors # type: bool
8411
8698
 
8412
8699
  @classmethod
8413
8700
  def InitFromBuf(cls, buf, pos):
@@ -8543,13 +8830,21 @@ def BidirectionalSequenceLSTMOptionsEnd(builder):
8543
8830
  class BidirectionalSequenceLSTMOptionsT(object):
8544
8831
 
8545
8832
  # BidirectionalSequenceLSTMOptionsT
8546
- def __init__(self):
8547
- self.fusedActivationFunction = 0 # type: int
8548
- self.cellClip = 0.0 # type: float
8549
- self.projClip = 0.0 # type: float
8550
- self.mergeOutputs = False # type: bool
8551
- self.timeMajor = True # type: bool
8552
- self.asymmetricQuantizeInputs = False # type: bool
8833
+ def __init__(
8834
+ self,
8835
+ fusedActivationFunction = 0,
8836
+ cellClip = 0.0,
8837
+ projClip = 0.0,
8838
+ mergeOutputs = False,
8839
+ timeMajor = True,
8840
+ asymmetricQuantizeInputs = False,
8841
+ ):
8842
+ self.fusedActivationFunction = fusedActivationFunction # type: int
8843
+ self.cellClip = cellClip # type: float
8844
+ self.projClip = projClip # type: float
8845
+ self.mergeOutputs = mergeOutputs # type: bool
8846
+ self.timeMajor = timeMajor # type: bool
8847
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
8553
8848
 
8554
8849
  @classmethod
8555
8850
  def InitFromBuf(cls, buf, pos):
@@ -8645,9 +8940,13 @@ def ResizeBilinearOptionsEnd(builder):
8645
8940
  class ResizeBilinearOptionsT(object):
8646
8941
 
8647
8942
  # ResizeBilinearOptionsT
8648
- def __init__(self):
8649
- self.alignCorners = False # type: bool
8650
- self.halfPixelCenters = False # type: bool
8943
+ def __init__(
8944
+ self,
8945
+ alignCorners = False,
8946
+ halfPixelCenters = False,
8947
+ ):
8948
+ self.alignCorners = alignCorners # type: bool
8949
+ self.halfPixelCenters = halfPixelCenters # type: bool
8651
8950
 
8652
8951
  @classmethod
8653
8952
  def InitFromBuf(cls, buf, pos):
@@ -8735,9 +9034,13 @@ def ResizeNearestNeighborOptionsEnd(builder):
8735
9034
  class ResizeNearestNeighborOptionsT(object):
8736
9035
 
8737
9036
  # ResizeNearestNeighborOptionsT
8738
- def __init__(self):
8739
- self.alignCorners = False # type: bool
8740
- self.halfPixelCenters = False # type: bool
9037
+ def __init__(
9038
+ self,
9039
+ alignCorners = False,
9040
+ halfPixelCenters = False,
9041
+ ):
9042
+ self.alignCorners = alignCorners # type: bool
9043
+ self.halfPixelCenters = halfPixelCenters # type: bool
8741
9044
 
8742
9045
  @classmethod
8743
9046
  def InitFromBuf(cls, buf, pos):
@@ -8815,8 +9118,11 @@ def CallOptionsEnd(builder):
8815
9118
  class CallOptionsT(object):
8816
9119
 
8817
9120
  # CallOptionsT
8818
- def __init__(self):
8819
- self.subgraph = 0 # type: int
9121
+ def __init__(
9122
+ self,
9123
+ subgraph = 0,
9124
+ ):
9125
+ self.subgraph = subgraph # type: int
8820
9126
 
8821
9127
  @classmethod
8822
9128
  def InitFromBuf(cls, buf, pos):
@@ -8882,7 +9188,9 @@ def PadOptionsEnd(builder):
8882
9188
  class PadOptionsT(object):
8883
9189
 
8884
9190
  # PadOptionsT
8885
- def __init__(self):
9191
+ def __init__(
9192
+ self,
9193
+ ):
8886
9194
  pass
8887
9195
 
8888
9196
  @classmethod
@@ -8947,7 +9255,9 @@ def PadV2OptionsEnd(builder):
8947
9255
  class PadV2OptionsT(object):
8948
9256
 
8949
9257
  # PadV2OptionsT
8950
- def __init__(self):
9258
+ def __init__(
9259
+ self,
9260
+ ):
8951
9261
  pass
8952
9262
 
8953
9263
  @classmethod
@@ -9049,8 +9359,11 @@ except:
9049
9359
  class ReshapeOptionsT(object):
9050
9360
 
9051
9361
  # ReshapeOptionsT
9052
- def __init__(self):
9053
- self.newShape = None # type: List[int]
9362
+ def __init__(
9363
+ self,
9364
+ newShape = None,
9365
+ ):
9366
+ self.newShape = newShape # type: Optional[List[int]]
9054
9367
 
9055
9368
  @classmethod
9056
9369
  def InitFromBuf(cls, buf, pos):
@@ -9131,7 +9444,9 @@ def SpaceToBatchNDOptionsEnd(builder):
9131
9444
  class SpaceToBatchNDOptionsT(object):
9132
9445
 
9133
9446
  # SpaceToBatchNDOptionsT
9134
- def __init__(self):
9447
+ def __init__(
9448
+ self,
9449
+ ):
9135
9450
  pass
9136
9451
 
9137
9452
  @classmethod
@@ -9196,7 +9511,9 @@ def BatchToSpaceNDOptionsEnd(builder):
9196
9511
  class BatchToSpaceNDOptionsT(object):
9197
9512
 
9198
9513
  # BatchToSpaceNDOptionsT
9199
- def __init__(self):
9514
+ def __init__(
9515
+ self,
9516
+ ):
9200
9517
  pass
9201
9518
 
9202
9519
  @classmethod
@@ -9291,10 +9608,15 @@ def SkipGramOptionsEnd(builder):
9291
9608
  class SkipGramOptionsT(object):
9292
9609
 
9293
9610
  # SkipGramOptionsT
9294
- def __init__(self):
9295
- self.ngramSize = 0 # type: int
9296
- self.maxSkipSize = 0 # type: int
9297
- self.includeAllNgrams = False # type: bool
9611
+ def __init__(
9612
+ self,
9613
+ ngramSize = 0,
9614
+ maxSkipSize = 0,
9615
+ includeAllNgrams = False,
9616
+ ):
9617
+ self.ngramSize = ngramSize # type: int
9618
+ self.maxSkipSize = maxSkipSize # type: int
9619
+ self.includeAllNgrams = includeAllNgrams # type: bool
9298
9620
 
9299
9621
  @classmethod
9300
9622
  def InitFromBuf(cls, buf, pos):
@@ -9374,8 +9696,11 @@ def SpaceToDepthOptionsEnd(builder):
9374
9696
  class SpaceToDepthOptionsT(object):
9375
9697
 
9376
9698
  # SpaceToDepthOptionsT
9377
- def __init__(self):
9378
- self.blockSize = 0 # type: int
9699
+ def __init__(
9700
+ self,
9701
+ blockSize = 0,
9702
+ ):
9703
+ self.blockSize = blockSize # type: int
9379
9704
 
9380
9705
  @classmethod
9381
9706
  def InitFromBuf(cls, buf, pos):
@@ -9451,8 +9776,11 @@ def DepthToSpaceOptionsEnd(builder):
9451
9776
  class DepthToSpaceOptionsT(object):
9452
9777
 
9453
9778
  # DepthToSpaceOptionsT
9454
- def __init__(self):
9455
- self.blockSize = 0 # type: int
9779
+ def __init__(
9780
+ self,
9781
+ blockSize = 0,
9782
+ ):
9783
+ self.blockSize = blockSize # type: int
9456
9784
 
9457
9785
  @classmethod
9458
9786
  def InitFromBuf(cls, buf, pos):
@@ -9538,9 +9866,13 @@ def SubOptionsEnd(builder):
9538
9866
  class SubOptionsT(object):
9539
9867
 
9540
9868
  # SubOptionsT
9541
- def __init__(self):
9542
- self.fusedActivationFunction = 0 # type: int
9543
- self.potScaleInt16 = True # type: bool
9869
+ def __init__(
9870
+ self,
9871
+ fusedActivationFunction = 0,
9872
+ potScaleInt16 = True,
9873
+ ):
9874
+ self.fusedActivationFunction = fusedActivationFunction # type: int
9875
+ self.potScaleInt16 = potScaleInt16 # type: bool
9544
9876
 
9545
9877
  @classmethod
9546
9878
  def InitFromBuf(cls, buf, pos):
@@ -9618,8 +9950,11 @@ def DivOptionsEnd(builder):
9618
9950
  class DivOptionsT(object):
9619
9951
 
9620
9952
  # DivOptionsT
9621
- def __init__(self):
9622
- self.fusedActivationFunction = 0 # type: int
9953
+ def __init__(
9954
+ self,
9955
+ fusedActivationFunction = 0,
9956
+ ):
9957
+ self.fusedActivationFunction = fusedActivationFunction # type: int
9623
9958
 
9624
9959
  @classmethod
9625
9960
  def InitFromBuf(cls, buf, pos):
@@ -9685,7 +10020,9 @@ def TopKV2OptionsEnd(builder):
9685
10020
  class TopKV2OptionsT(object):
9686
10021
 
9687
10022
  # TopKV2OptionsT
9688
- def __init__(self):
10023
+ def __init__(
10024
+ self,
10025
+ ):
9689
10026
  pass
9690
10027
 
9691
10028
  @classmethod
@@ -9760,8 +10097,11 @@ def EmbeddingLookupSparseOptionsEnd(builder):
9760
10097
  class EmbeddingLookupSparseOptionsT(object):
9761
10098
 
9762
10099
  # EmbeddingLookupSparseOptionsT
9763
- def __init__(self):
9764
- self.combiner = 0 # type: int
10100
+ def __init__(
10101
+ self,
10102
+ combiner = 0,
10103
+ ):
10104
+ self.combiner = combiner # type: int
9765
10105
 
9766
10106
  @classmethod
9767
10107
  def InitFromBuf(cls, buf, pos):
@@ -9847,9 +10187,13 @@ def GatherOptionsEnd(builder):
9847
10187
  class GatherOptionsT(object):
9848
10188
 
9849
10189
  # GatherOptionsT
9850
- def __init__(self):
9851
- self.axis = 0 # type: int
9852
- self.batchDims = 0 # type: int
10190
+ def __init__(
10191
+ self,
10192
+ axis = 0,
10193
+ batchDims = 0,
10194
+ ):
10195
+ self.axis = axis # type: int
10196
+ self.batchDims = batchDims # type: int
9853
10197
 
9854
10198
  @classmethod
9855
10199
  def InitFromBuf(cls, buf, pos):
@@ -9917,7 +10261,9 @@ def TransposeOptionsEnd(builder):
9917
10261
  class TransposeOptionsT(object):
9918
10262
 
9919
10263
  # TransposeOptionsT
9920
- def __init__(self):
10264
+ def __init__(
10265
+ self,
10266
+ ):
9921
10267
  pass
9922
10268
 
9923
10269
  @classmethod
@@ -9982,7 +10328,9 @@ def ExpOptionsEnd(builder):
9982
10328
  class ExpOptionsT(object):
9983
10329
 
9984
10330
  # ExpOptionsT
9985
- def __init__(self):
10331
+ def __init__(
10332
+ self,
10333
+ ):
9986
10334
  pass
9987
10335
 
9988
10336
  @classmethod
@@ -10047,7 +10395,9 @@ def CosOptionsEnd(builder):
10047
10395
  class CosOptionsT(object):
10048
10396
 
10049
10397
  # CosOptionsT
10050
- def __init__(self):
10398
+ def __init__(
10399
+ self,
10400
+ ):
10051
10401
  pass
10052
10402
 
10053
10403
  @classmethod
@@ -10122,8 +10472,11 @@ def ReducerOptionsEnd(builder):
10122
10472
  class ReducerOptionsT(object):
10123
10473
 
10124
10474
  # ReducerOptionsT
10125
- def __init__(self):
10126
- self.keepDims = False # type: bool
10475
+ def __init__(
10476
+ self,
10477
+ keepDims = False,
10478
+ ):
10479
+ self.keepDims = keepDims # type: bool
10127
10480
 
10128
10481
  @classmethod
10129
10482
  def InitFromBuf(cls, buf, pos):
@@ -10226,8 +10579,11 @@ except:
10226
10579
  class SqueezeOptionsT(object):
10227
10580
 
10228
10581
  # SqueezeOptionsT
10229
- def __init__(self):
10230
- self.squeezeDims = None # type: List[int]
10582
+ def __init__(
10583
+ self,
10584
+ squeezeDims = None,
10585
+ ):
10586
+ self.squeezeDims = squeezeDims # type: Optional[List[int]]
10231
10587
 
10232
10588
  @classmethod
10233
10589
  def InitFromBuf(cls, buf, pos):
@@ -10318,8 +10674,11 @@ def SplitOptionsEnd(builder):
10318
10674
  class SplitOptionsT(object):
10319
10675
 
10320
10676
  # SplitOptionsT
10321
- def __init__(self):
10322
- self.numSplits = 0 # type: int
10677
+ def __init__(
10678
+ self,
10679
+ numSplits = 0,
10680
+ ):
10681
+ self.numSplits = numSplits # type: int
10323
10682
 
10324
10683
  @classmethod
10325
10684
  def InitFromBuf(cls, buf, pos):
@@ -10395,8 +10754,11 @@ def SplitVOptionsEnd(builder):
10395
10754
  class SplitVOptionsT(object):
10396
10755
 
10397
10756
  # SplitVOptionsT
10398
- def __init__(self):
10399
- self.numSplits = 0 # type: int
10757
+ def __init__(
10758
+ self,
10759
+ numSplits = 0,
10760
+ ):
10761
+ self.numSplits = numSplits # type: int
10400
10762
 
10401
10763
  @classmethod
10402
10764
  def InitFromBuf(cls, buf, pos):
@@ -10522,13 +10884,21 @@ def StridedSliceOptionsEnd(builder):
10522
10884
  class StridedSliceOptionsT(object):
10523
10885
 
10524
10886
  # StridedSliceOptionsT
10525
- def __init__(self):
10526
- self.beginMask = 0 # type: int
10527
- self.endMask = 0 # type: int
10528
- self.ellipsisMask = 0 # type: int
10529
- self.newAxisMask = 0 # type: int
10530
- self.shrinkAxisMask = 0 # type: int
10531
- self.offset = False # type: bool
10887
+ def __init__(
10888
+ self,
10889
+ beginMask = 0,
10890
+ endMask = 0,
10891
+ ellipsisMask = 0,
10892
+ newAxisMask = 0,
10893
+ shrinkAxisMask = 0,
10894
+ offset = False,
10895
+ ):
10896
+ self.beginMask = beginMask # type: int
10897
+ self.endMask = endMask # type: int
10898
+ self.ellipsisMask = ellipsisMask # type: int
10899
+ self.newAxisMask = newAxisMask # type: int
10900
+ self.shrinkAxisMask = shrinkAxisMask # type: int
10901
+ self.offset = offset # type: bool
10532
10902
 
10533
10903
  @classmethod
10534
10904
  def InitFromBuf(cls, buf, pos):
@@ -10604,7 +10974,9 @@ def LogSoftmaxOptionsEnd(builder):
10604
10974
  class LogSoftmaxOptionsT(object):
10605
10975
 
10606
10976
  # LogSoftmaxOptionsT
10607
- def __init__(self):
10977
+ def __init__(
10978
+ self,
10979
+ ):
10608
10980
  pass
10609
10981
 
10610
10982
  @classmethod
@@ -10689,9 +11061,13 @@ def CastOptionsEnd(builder):
10689
11061
  class CastOptionsT(object):
10690
11062
 
10691
11063
  # CastOptionsT
10692
- def __init__(self):
10693
- self.inDataType = 0 # type: int
10694
- self.outDataType = 0 # type: int
11064
+ def __init__(
11065
+ self,
11066
+ inDataType = 0,
11067
+ outDataType = 0,
11068
+ ):
11069
+ self.inDataType = inDataType # type: int
11070
+ self.outDataType = outDataType # type: int
10695
11071
 
10696
11072
  @classmethod
10697
11073
  def InitFromBuf(cls, buf, pos):
@@ -10759,7 +11135,9 @@ def DequantizeOptionsEnd(builder):
10759
11135
  class DequantizeOptionsT(object):
10760
11136
 
10761
11137
  # DequantizeOptionsT
10762
- def __init__(self):
11138
+ def __init__(
11139
+ self,
11140
+ ):
10763
11141
  pass
10764
11142
 
10765
11143
  @classmethod
@@ -10824,7 +11202,9 @@ def MaximumMinimumOptionsEnd(builder):
10824
11202
  class MaximumMinimumOptionsT(object):
10825
11203
 
10826
11204
  # MaximumMinimumOptionsT
10827
- def __init__(self):
11205
+ def __init__(
11206
+ self,
11207
+ ):
10828
11208
  pass
10829
11209
 
10830
11210
  @classmethod
@@ -10889,7 +11269,9 @@ def TileOptionsEnd(builder):
10889
11269
  class TileOptionsT(object):
10890
11270
 
10891
11271
  # TileOptionsT
10892
- def __init__(self):
11272
+ def __init__(
11273
+ self,
11274
+ ):
10893
11275
  pass
10894
11276
 
10895
11277
  @classmethod
@@ -10964,8 +11346,11 @@ def ArgMaxOptionsEnd(builder):
10964
11346
  class ArgMaxOptionsT(object):
10965
11347
 
10966
11348
  # ArgMaxOptionsT
10967
- def __init__(self):
10968
- self.outputType = 0 # type: int
11349
+ def __init__(
11350
+ self,
11351
+ outputType = 0,
11352
+ ):
11353
+ self.outputType = outputType # type: int
10969
11354
 
10970
11355
  @classmethod
10971
11356
  def InitFromBuf(cls, buf, pos):
@@ -11041,8 +11426,11 @@ def ArgMinOptionsEnd(builder):
11041
11426
  class ArgMinOptionsT(object):
11042
11427
 
11043
11428
  # ArgMinOptionsT
11044
- def __init__(self):
11045
- self.outputType = 0 # type: int
11429
+ def __init__(
11430
+ self,
11431
+ outputType = 0,
11432
+ ):
11433
+ self.outputType = outputType # type: int
11046
11434
 
11047
11435
  @classmethod
11048
11436
  def InitFromBuf(cls, buf, pos):
@@ -11108,7 +11496,9 @@ def GreaterOptionsEnd(builder):
11108
11496
  class GreaterOptionsT(object):
11109
11497
 
11110
11498
  # GreaterOptionsT
11111
- def __init__(self):
11499
+ def __init__(
11500
+ self,
11501
+ ):
11112
11502
  pass
11113
11503
 
11114
11504
  @classmethod
@@ -11173,7 +11563,9 @@ def GreaterEqualOptionsEnd(builder):
11173
11563
  class GreaterEqualOptionsT(object):
11174
11564
 
11175
11565
  # GreaterEqualOptionsT
11176
- def __init__(self):
11566
+ def __init__(
11567
+ self,
11568
+ ):
11177
11569
  pass
11178
11570
 
11179
11571
  @classmethod
@@ -11238,7 +11630,9 @@ def LessOptionsEnd(builder):
11238
11630
  class LessOptionsT(object):
11239
11631
 
11240
11632
  # LessOptionsT
11241
- def __init__(self):
11633
+ def __init__(
11634
+ self,
11635
+ ):
11242
11636
  pass
11243
11637
 
11244
11638
  @classmethod
@@ -11303,7 +11697,9 @@ def LessEqualOptionsEnd(builder):
11303
11697
  class LessEqualOptionsT(object):
11304
11698
 
11305
11699
  # LessEqualOptionsT
11306
- def __init__(self):
11700
+ def __init__(
11701
+ self,
11702
+ ):
11307
11703
  pass
11308
11704
 
11309
11705
  @classmethod
@@ -11368,7 +11764,9 @@ def NegOptionsEnd(builder):
11368
11764
  class NegOptionsT(object):
11369
11765
 
11370
11766
  # NegOptionsT
11371
- def __init__(self):
11767
+ def __init__(
11768
+ self,
11769
+ ):
11372
11770
  pass
11373
11771
 
11374
11772
  @classmethod
@@ -11433,7 +11831,9 @@ def SelectOptionsEnd(builder):
11433
11831
  class SelectOptionsT(object):
11434
11832
 
11435
11833
  # SelectOptionsT
11436
- def __init__(self):
11834
+ def __init__(
11835
+ self,
11836
+ ):
11437
11837
  pass
11438
11838
 
11439
11839
  @classmethod
@@ -11498,7 +11898,9 @@ def SliceOptionsEnd(builder):
11498
11898
  class SliceOptionsT(object):
11499
11899
 
11500
11900
  # SliceOptionsT
11501
- def __init__(self):
11901
+ def __init__(
11902
+ self,
11903
+ ):
11502
11904
  pass
11503
11905
 
11504
11906
  @classmethod
@@ -11613,12 +12015,19 @@ def TransposeConvOptionsEnd(builder):
11613
12015
  class TransposeConvOptionsT(object):
11614
12016
 
11615
12017
  # TransposeConvOptionsT
11616
- def __init__(self):
11617
- self.padding = 0 # type: int
11618
- self.strideW = 0 # type: int
11619
- self.strideH = 0 # type: int
11620
- self.fusedActivationFunction = 0 # type: int
11621
- self.quantizedBiasType = 0 # type: int
12018
+ def __init__(
12019
+ self,
12020
+ padding = 0,
12021
+ strideW = 0,
12022
+ strideH = 0,
12023
+ fusedActivationFunction = 0,
12024
+ quantizedBiasType = 0,
12025
+ ):
12026
+ self.padding = padding # type: int
12027
+ self.strideW = strideW # type: int
12028
+ self.strideH = strideH # type: int
12029
+ self.fusedActivationFunction = fusedActivationFunction # type: int
12030
+ self.quantizedBiasType = quantizedBiasType # type: int
11622
12031
 
11623
12032
  @classmethod
11624
12033
  def InitFromBuf(cls, buf, pos):
@@ -11692,7 +12101,9 @@ def ExpandDimsOptionsEnd(builder):
11692
12101
  class ExpandDimsOptionsT(object):
11693
12102
 
11694
12103
  # ExpandDimsOptionsT
11695
- def __init__(self):
12104
+ def __init__(
12105
+ self,
12106
+ ):
11696
12107
  pass
11697
12108
 
11698
12109
  @classmethod
@@ -11767,8 +12178,11 @@ def SparseToDenseOptionsEnd(builder):
11767
12178
  class SparseToDenseOptionsT(object):
11768
12179
 
11769
12180
  # SparseToDenseOptionsT
11770
- def __init__(self):
11771
- self.validateIndices = False # type: bool
12181
+ def __init__(
12182
+ self,
12183
+ validateIndices = False,
12184
+ ):
12185
+ self.validateIndices = validateIndices # type: bool
11772
12186
 
11773
12187
  @classmethod
11774
12188
  def InitFromBuf(cls, buf, pos):
@@ -11834,7 +12248,9 @@ def EqualOptionsEnd(builder):
11834
12248
  class EqualOptionsT(object):
11835
12249
 
11836
12250
  # EqualOptionsT
11837
- def __init__(self):
12251
+ def __init__(
12252
+ self,
12253
+ ):
11838
12254
  pass
11839
12255
 
11840
12256
  @classmethod
@@ -11899,7 +12315,9 @@ def NotEqualOptionsEnd(builder):
11899
12315
  class NotEqualOptionsT(object):
11900
12316
 
11901
12317
  # NotEqualOptionsT
11902
- def __init__(self):
12318
+ def __init__(
12319
+ self,
12320
+ ):
11903
12321
  pass
11904
12322
 
11905
12323
  @classmethod
@@ -11974,8 +12392,11 @@ def ShapeOptionsEnd(builder):
11974
12392
  class ShapeOptionsT(object):
11975
12393
 
11976
12394
  # ShapeOptionsT
11977
- def __init__(self):
11978
- self.outType = 0 # type: int
12395
+ def __init__(
12396
+ self,
12397
+ outType = 0,
12398
+ ):
12399
+ self.outType = outType # type: int
11979
12400
 
11980
12401
  @classmethod
11981
12402
  def InitFromBuf(cls, buf, pos):
@@ -12041,7 +12462,9 @@ def RankOptionsEnd(builder):
12041
12462
  class RankOptionsT(object):
12042
12463
 
12043
12464
  # RankOptionsT
12044
- def __init__(self):
12465
+ def __init__(
12466
+ self,
12467
+ ):
12045
12468
  pass
12046
12469
 
12047
12470
  @classmethod
@@ -12106,7 +12529,9 @@ def PowOptionsEnd(builder):
12106
12529
  class PowOptionsT(object):
12107
12530
 
12108
12531
  # PowOptionsT
12109
- def __init__(self):
12532
+ def __init__(
12533
+ self,
12534
+ ):
12110
12535
  pass
12111
12536
 
12112
12537
  @classmethod
@@ -12211,11 +12636,17 @@ def FakeQuantOptionsEnd(builder):
12211
12636
  class FakeQuantOptionsT(object):
12212
12637
 
12213
12638
  # FakeQuantOptionsT
12214
- def __init__(self):
12215
- self.min = 0.0 # type: float
12216
- self.max = 0.0 # type: float
12217
- self.numBits = 0 # type: int
12218
- self.narrowRange = False # type: bool
12639
+ def __init__(
12640
+ self,
12641
+ min = 0.0,
12642
+ max = 0.0,
12643
+ numBits = 0,
12644
+ narrowRange = False,
12645
+ ):
12646
+ self.min = min # type: float
12647
+ self.max = max # type: float
12648
+ self.numBits = numBits # type: int
12649
+ self.narrowRange = narrowRange # type: bool
12219
12650
 
12220
12651
  @classmethod
12221
12652
  def InitFromBuf(cls, buf, pos):
@@ -12307,9 +12738,13 @@ def PackOptionsEnd(builder):
12307
12738
  class PackOptionsT(object):
12308
12739
 
12309
12740
  # PackOptionsT
12310
- def __init__(self):
12311
- self.valuesCount = 0 # type: int
12312
- self.axis = 0 # type: int
12741
+ def __init__(
12742
+ self,
12743
+ valuesCount = 0,
12744
+ axis = 0,
12745
+ ):
12746
+ self.valuesCount = valuesCount # type: int
12747
+ self.axis = axis # type: int
12313
12748
 
12314
12749
  @classmethod
12315
12750
  def InitFromBuf(cls, buf, pos):
@@ -12377,7 +12812,9 @@ def LogicalOrOptionsEnd(builder):
12377
12812
  class LogicalOrOptionsT(object):
12378
12813
 
12379
12814
  # LogicalOrOptionsT
12380
- def __init__(self):
12815
+ def __init__(
12816
+ self,
12817
+ ):
12381
12818
  pass
12382
12819
 
12383
12820
  @classmethod
@@ -12452,8 +12889,11 @@ def OneHotOptionsEnd(builder):
12452
12889
  class OneHotOptionsT(object):
12453
12890
 
12454
12891
  # OneHotOptionsT
12455
- def __init__(self):
12456
- self.axis = 0 # type: int
12892
+ def __init__(
12893
+ self,
12894
+ axis = 0,
12895
+ ):
12896
+ self.axis = axis # type: int
12457
12897
 
12458
12898
  @classmethod
12459
12899
  def InitFromBuf(cls, buf, pos):
@@ -12519,7 +12959,9 @@ def AbsOptionsEnd(builder):
12519
12959
  class AbsOptionsT(object):
12520
12960
 
12521
12961
  # AbsOptionsT
12522
- def __init__(self):
12962
+ def __init__(
12963
+ self,
12964
+ ):
12523
12965
  pass
12524
12966
 
12525
12967
  @classmethod
@@ -12584,7 +13026,9 @@ def HardSwishOptionsEnd(builder):
12584
13026
  class HardSwishOptionsT(object):
12585
13027
 
12586
13028
  # HardSwishOptionsT
12587
- def __init__(self):
13029
+ def __init__(
13030
+ self,
13031
+ ):
12588
13032
  pass
12589
13033
 
12590
13034
  @classmethod
@@ -12649,7 +13093,9 @@ def LogicalAndOptionsEnd(builder):
12649
13093
  class LogicalAndOptionsT(object):
12650
13094
 
12651
13095
  # LogicalAndOptionsT
12652
- def __init__(self):
13096
+ def __init__(
13097
+ self,
13098
+ ):
12653
13099
  pass
12654
13100
 
12655
13101
  @classmethod
@@ -12714,7 +13160,9 @@ def LogicalNotOptionsEnd(builder):
12714
13160
  class LogicalNotOptionsT(object):
12715
13161
 
12716
13162
  # LogicalNotOptionsT
12717
- def __init__(self):
13163
+ def __init__(
13164
+ self,
13165
+ ):
12718
13166
  pass
12719
13167
 
12720
13168
  @classmethod
@@ -12799,9 +13247,13 @@ def UnpackOptionsEnd(builder):
12799
13247
  class UnpackOptionsT(object):
12800
13248
 
12801
13249
  # UnpackOptionsT
12802
- def __init__(self):
12803
- self.num = 0 # type: int
12804
- self.axis = 0 # type: int
13250
+ def __init__(
13251
+ self,
13252
+ num = 0,
13253
+ axis = 0,
13254
+ ):
13255
+ self.num = num # type: int
13256
+ self.axis = axis # type: int
12805
13257
 
12806
13258
  @classmethod
12807
13259
  def InitFromBuf(cls, buf, pos):
@@ -12869,7 +13321,9 @@ def FloorDivOptionsEnd(builder):
12869
13321
  class FloorDivOptionsT(object):
12870
13322
 
12871
13323
  # FloorDivOptionsT
12872
- def __init__(self):
13324
+ def __init__(
13325
+ self,
13326
+ ):
12873
13327
  pass
12874
13328
 
12875
13329
  @classmethod
@@ -12934,7 +13388,9 @@ def SquareOptionsEnd(builder):
12934
13388
  class SquareOptionsT(object):
12935
13389
 
12936
13390
  # SquareOptionsT
12937
- def __init__(self):
13391
+ def __init__(
13392
+ self,
13393
+ ):
12938
13394
  pass
12939
13395
 
12940
13396
  @classmethod
@@ -12999,7 +13455,9 @@ def ZerosLikeOptionsEnd(builder):
12999
13455
  class ZerosLikeOptionsT(object):
13000
13456
 
13001
13457
  # ZerosLikeOptionsT
13002
- def __init__(self):
13458
+ def __init__(
13459
+ self,
13460
+ ):
13003
13461
  pass
13004
13462
 
13005
13463
  @classmethod
@@ -13064,7 +13522,9 @@ def FillOptionsEnd(builder):
13064
13522
  class FillOptionsT(object):
13065
13523
 
13066
13524
  # FillOptionsT
13067
- def __init__(self):
13525
+ def __init__(
13526
+ self,
13527
+ ):
13068
13528
  pass
13069
13529
 
13070
13530
  @classmethod
@@ -13129,7 +13589,9 @@ def FloorModOptionsEnd(builder):
13129
13589
  class FloorModOptionsT(object):
13130
13590
 
13131
13591
  # FloorModOptionsT
13132
- def __init__(self):
13592
+ def __init__(
13593
+ self,
13594
+ ):
13133
13595
  pass
13134
13596
 
13135
13597
  @classmethod
@@ -13194,7 +13656,9 @@ def RangeOptionsEnd(builder):
13194
13656
  class RangeOptionsT(object):
13195
13657
 
13196
13658
  # RangeOptionsT
13197
- def __init__(self):
13659
+ def __init__(
13660
+ self,
13661
+ ):
13198
13662
  pass
13199
13663
 
13200
13664
  @classmethod
@@ -13269,8 +13733,11 @@ def LeakyReluOptionsEnd(builder):
13269
13733
  class LeakyReluOptionsT(object):
13270
13734
 
13271
13735
  # LeakyReluOptionsT
13272
- def __init__(self):
13273
- self.alpha = 0.0 # type: float
13736
+ def __init__(
13737
+ self,
13738
+ alpha = 0.0,
13739
+ ):
13740
+ self.alpha = alpha # type: float
13274
13741
 
13275
13742
  @classmethod
13276
13743
  def InitFromBuf(cls, buf, pos):
@@ -13336,7 +13803,9 @@ def SquaredDifferenceOptionsEnd(builder):
13336
13803
  class SquaredDifferenceOptionsT(object):
13337
13804
 
13338
13805
  # SquaredDifferenceOptionsT
13339
- def __init__(self):
13806
+ def __init__(
13807
+ self,
13808
+ ):
13340
13809
  pass
13341
13810
 
13342
13811
  @classmethod
@@ -13411,8 +13880,11 @@ def MirrorPadOptionsEnd(builder):
13411
13880
  class MirrorPadOptionsT(object):
13412
13881
 
13413
13882
  # MirrorPadOptionsT
13414
- def __init__(self):
13415
- self.mode = 0 # type: int
13883
+ def __init__(
13884
+ self,
13885
+ mode = 0,
13886
+ ):
13887
+ self.mode = mode # type: int
13416
13888
 
13417
13889
  @classmethod
13418
13890
  def InitFromBuf(cls, buf, pos):
@@ -13488,8 +13960,11 @@ def UniqueOptionsEnd(builder):
13488
13960
  class UniqueOptionsT(object):
13489
13961
 
13490
13962
  # UniqueOptionsT
13491
- def __init__(self):
13492
- self.idxOutType = 2 # type: int
13963
+ def __init__(
13964
+ self,
13965
+ idxOutType = 2,
13966
+ ):
13967
+ self.idxOutType = idxOutType # type: int
13493
13968
 
13494
13969
  @classmethod
13495
13970
  def InitFromBuf(cls, buf, pos):
@@ -13555,7 +14030,9 @@ def ReverseV2OptionsEnd(builder):
13555
14030
  class ReverseV2OptionsT(object):
13556
14031
 
13557
14032
  # ReverseV2OptionsT
13558
- def __init__(self):
14033
+ def __init__(
14034
+ self,
14035
+ ):
13559
14036
  pass
13560
14037
 
13561
14038
  @classmethod
@@ -13620,7 +14097,9 @@ def AddNOptionsEnd(builder):
13620
14097
  class AddNOptionsT(object):
13621
14098
 
13622
14099
  # AddNOptionsT
13623
- def __init__(self):
14100
+ def __init__(
14101
+ self,
14102
+ ):
13624
14103
  pass
13625
14104
 
13626
14105
  @classmethod
@@ -13685,7 +14164,9 @@ def GatherNdOptionsEnd(builder):
13685
14164
  class GatherNdOptionsT(object):
13686
14165
 
13687
14166
  # GatherNdOptionsT
13688
- def __init__(self):
14167
+ def __init__(
14168
+ self,
14169
+ ):
13689
14170
  pass
13690
14171
 
13691
14172
  @classmethod
@@ -13750,7 +14231,9 @@ def WhereOptionsEnd(builder):
13750
14231
  class WhereOptionsT(object):
13751
14232
 
13752
14233
  # WhereOptionsT
13753
- def __init__(self):
14234
+ def __init__(
14235
+ self,
14236
+ ):
13754
14237
  pass
13755
14238
 
13756
14239
  @classmethod
@@ -13835,9 +14318,13 @@ def ReverseSequenceOptionsEnd(builder):
13835
14318
  class ReverseSequenceOptionsT(object):
13836
14319
 
13837
14320
  # ReverseSequenceOptionsT
13838
- def __init__(self):
13839
- self.seqDim = 0 # type: int
13840
- self.batchDim = 0 # type: int
14321
+ def __init__(
14322
+ self,
14323
+ seqDim = 0,
14324
+ batchDim = 0,
14325
+ ):
14326
+ self.seqDim = seqDim # type: int
14327
+ self.batchDim = batchDim # type: int
13841
14328
 
13842
14329
  @classmethod
13843
14330
  def InitFromBuf(cls, buf, pos):
@@ -13905,7 +14392,9 @@ def MatrixDiagOptionsEnd(builder):
13905
14392
  class MatrixDiagOptionsT(object):
13906
14393
 
13907
14394
  # MatrixDiagOptionsT
13908
- def __init__(self):
14395
+ def __init__(
14396
+ self,
14397
+ ):
13909
14398
  pass
13910
14399
 
13911
14400
  @classmethod
@@ -13970,7 +14459,9 @@ def QuantizeOptionsEnd(builder):
13970
14459
  class QuantizeOptionsT(object):
13971
14460
 
13972
14461
  # QuantizeOptionsT
13973
- def __init__(self):
14462
+ def __init__(
14463
+ self,
14464
+ ):
13974
14465
  pass
13975
14466
 
13976
14467
  @classmethod
@@ -14035,7 +14526,9 @@ def MatrixSetDiagOptionsEnd(builder):
14035
14526
  class MatrixSetDiagOptionsT(object):
14036
14527
 
14037
14528
  # MatrixSetDiagOptionsT
14038
- def __init__(self):
14529
+ def __init__(
14530
+ self,
14531
+ ):
14039
14532
  pass
14040
14533
 
14041
14534
  @classmethod
@@ -14120,9 +14613,13 @@ def IfOptionsEnd(builder):
14120
14613
  class IfOptionsT(object):
14121
14614
 
14122
14615
  # IfOptionsT
14123
- def __init__(self):
14124
- self.thenSubgraphIndex = 0 # type: int
14125
- self.elseSubgraphIndex = 0 # type: int
14616
+ def __init__(
14617
+ self,
14618
+ thenSubgraphIndex = 0,
14619
+ elseSubgraphIndex = 0,
14620
+ ):
14621
+ self.thenSubgraphIndex = thenSubgraphIndex # type: int
14622
+ self.elseSubgraphIndex = elseSubgraphIndex # type: int
14126
14623
 
14127
14624
  @classmethod
14128
14625
  def InitFromBuf(cls, buf, pos):
@@ -14200,8 +14697,11 @@ def CallOnceOptionsEnd(builder):
14200
14697
  class CallOnceOptionsT(object):
14201
14698
 
14202
14699
  # CallOnceOptionsT
14203
- def __init__(self):
14204
- self.initSubgraphIndex = 0 # type: int
14700
+ def __init__(
14701
+ self,
14702
+ initSubgraphIndex = 0,
14703
+ ):
14704
+ self.initSubgraphIndex = initSubgraphIndex # type: int
14205
14705
 
14206
14706
  @classmethod
14207
14707
  def InitFromBuf(cls, buf, pos):
@@ -14287,9 +14787,13 @@ def WhileOptionsEnd(builder):
14287
14787
  class WhileOptionsT(object):
14288
14788
 
14289
14789
  # WhileOptionsT
14290
- def __init__(self):
14291
- self.condSubgraphIndex = 0 # type: int
14292
- self.bodySubgraphIndex = 0 # type: int
14790
+ def __init__(
14791
+ self,
14792
+ condSubgraphIndex = 0,
14793
+ bodySubgraphIndex = 0,
14794
+ ):
14795
+ self.condSubgraphIndex = condSubgraphIndex # type: int
14796
+ self.bodySubgraphIndex = bodySubgraphIndex # type: int
14293
14797
 
14294
14798
  @classmethod
14295
14799
  def InitFromBuf(cls, buf, pos):
@@ -14357,7 +14861,9 @@ def NonMaxSuppressionV4OptionsEnd(builder):
14357
14861
  class NonMaxSuppressionV4OptionsT(object):
14358
14862
 
14359
14863
  # NonMaxSuppressionV4OptionsT
14360
- def __init__(self):
14864
+ def __init__(
14865
+ self,
14866
+ ):
14361
14867
  pass
14362
14868
 
14363
14869
  @classmethod
@@ -14422,7 +14928,9 @@ def NonMaxSuppressionV5OptionsEnd(builder):
14422
14928
  class NonMaxSuppressionV5OptionsT(object):
14423
14929
 
14424
14930
  # NonMaxSuppressionV5OptionsT
14425
- def __init__(self):
14931
+ def __init__(
14932
+ self,
14933
+ ):
14426
14934
  pass
14427
14935
 
14428
14936
  @classmethod
@@ -14487,7 +14995,9 @@ def ScatterNdOptionsEnd(builder):
14487
14995
  class ScatterNdOptionsT(object):
14488
14996
 
14489
14997
  # ScatterNdOptionsT
14490
- def __init__(self):
14998
+ def __init__(
14999
+ self,
15000
+ ):
14491
15001
  pass
14492
15002
 
14493
15003
  @classmethod
@@ -14552,7 +15062,9 @@ def SelectV2OptionsEnd(builder):
14552
15062
  class SelectV2OptionsT(object):
14553
15063
 
14554
15064
  # SelectV2OptionsT
14555
- def __init__(self):
15065
+ def __init__(
15066
+ self,
15067
+ ):
14556
15068
  pass
14557
15069
 
14558
15070
  @classmethod
@@ -14617,7 +15129,9 @@ def DensifyOptionsEnd(builder):
14617
15129
  class DensifyOptionsT(object):
14618
15130
 
14619
15131
  # DensifyOptionsT
14620
- def __init__(self):
15132
+ def __init__(
15133
+ self,
15134
+ ):
14621
15135
  pass
14622
15136
 
14623
15137
  @classmethod
@@ -14682,7 +15196,9 @@ def SegmentSumOptionsEnd(builder):
14682
15196
  class SegmentSumOptionsT(object):
14683
15197
 
14684
15198
  # SegmentSumOptionsT
14685
- def __init__(self):
15199
+ def __init__(
15200
+ self,
15201
+ ):
14686
15202
  pass
14687
15203
 
14688
15204
  @classmethod
@@ -14777,10 +15293,15 @@ def BatchMatMulOptionsEnd(builder):
14777
15293
  class BatchMatMulOptionsT(object):
14778
15294
 
14779
15295
  # BatchMatMulOptionsT
14780
- def __init__(self):
14781
- self.adjX = False # type: bool
14782
- self.adjY = False # type: bool
14783
- self.asymmetricQuantizeInputs = False # type: bool
15296
+ def __init__(
15297
+ self,
15298
+ adjX = False,
15299
+ adjY = False,
15300
+ asymmetricQuantizeInputs = False,
15301
+ ):
15302
+ self.adjX = adjX # type: bool
15303
+ self.adjY = adjY # type: bool
15304
+ self.asymmetricQuantizeInputs = asymmetricQuantizeInputs # type: bool
14784
15305
 
14785
15306
  @classmethod
14786
15307
  def InitFromBuf(cls, buf, pos):
@@ -14870,9 +15391,13 @@ def CumsumOptionsEnd(builder):
14870
15391
  class CumsumOptionsT(object):
14871
15392
 
14872
15393
  # CumsumOptionsT
14873
- def __init__(self):
14874
- self.exclusive = False # type: bool
14875
- self.reverse = False # type: bool
15394
+ def __init__(
15395
+ self,
15396
+ exclusive = False,
15397
+ reverse = False,
15398
+ ):
15399
+ self.exclusive = exclusive # type: bool
15400
+ self.reverse = reverse # type: bool
14876
15401
 
14877
15402
  @classmethod
14878
15403
  def InitFromBuf(cls, buf, pos):
@@ -14940,7 +15465,9 @@ def BroadcastToOptionsEnd(builder):
14940
15465
  class BroadcastToOptionsT(object):
14941
15466
 
14942
15467
  # BroadcastToOptionsT
14943
- def __init__(self):
15468
+ def __init__(
15469
+ self,
15470
+ ):
14944
15471
  pass
14945
15472
 
14946
15473
  @classmethod
@@ -15005,7 +15532,9 @@ def Rfft2dOptionsEnd(builder):
15005
15532
  class Rfft2dOptionsT(object):
15006
15533
 
15007
15534
  # Rfft2dOptionsT
15008
- def __init__(self):
15535
+ def __init__(
15536
+ self,
15537
+ ):
15009
15538
  pass
15010
15539
 
15011
15540
  @classmethod
@@ -15100,10 +15629,15 @@ def HashtableOptionsEnd(builder):
15100
15629
  class HashtableOptionsT(object):
15101
15630
 
15102
15631
  # HashtableOptionsT
15103
- def __init__(self):
15104
- self.tableId = 0 # type: int
15105
- self.keyDtype = 0 # type: int
15106
- self.valueDtype = 0 # type: int
15632
+ def __init__(
15633
+ self,
15634
+ tableId = 0,
15635
+ keyDtype = 0,
15636
+ valueDtype = 0,
15637
+ ):
15638
+ self.tableId = tableId # type: int
15639
+ self.keyDtype = keyDtype # type: int
15640
+ self.valueDtype = valueDtype # type: int
15107
15641
 
15108
15642
  @classmethod
15109
15643
  def InitFromBuf(cls, buf, pos):
@@ -15173,7 +15707,9 @@ def HashtableFindOptionsEnd(builder):
15173
15707
  class HashtableFindOptionsT(object):
15174
15708
 
15175
15709
  # HashtableFindOptionsT
15176
- def __init__(self):
15710
+ def __init__(
15711
+ self,
15712
+ ):
15177
15713
  pass
15178
15714
 
15179
15715
  @classmethod
@@ -15238,7 +15774,9 @@ def HashtableImportOptionsEnd(builder):
15238
15774
  class HashtableImportOptionsT(object):
15239
15775
 
15240
15776
  # HashtableImportOptionsT
15241
- def __init__(self):
15777
+ def __init__(
15778
+ self,
15779
+ ):
15242
15780
  pass
15243
15781
 
15244
15782
  @classmethod
@@ -15303,7 +15841,9 @@ def HashtableSizeOptionsEnd(builder):
15303
15841
  class HashtableSizeOptionsT(object):
15304
15842
 
15305
15843
  # HashtableSizeOptionsT
15306
- def __init__(self):
15844
+ def __init__(
15845
+ self,
15846
+ ):
15307
15847
  pass
15308
15848
 
15309
15849
  @classmethod
@@ -15388,9 +15928,13 @@ def VarHandleOptionsEnd(builder):
15388
15928
  class VarHandleOptionsT(object):
15389
15929
 
15390
15930
  # VarHandleOptionsT
15391
- def __init__(self):
15392
- self.container = None # type: str
15393
- self.sharedName = None # type: str
15931
+ def __init__(
15932
+ self,
15933
+ container = None,
15934
+ sharedName = None,
15935
+ ):
15936
+ self.container = container # type: Optional[str]
15937
+ self.sharedName = sharedName # type: Optional[str]
15394
15938
 
15395
15939
  @classmethod
15396
15940
  def InitFromBuf(cls, buf, pos):
@@ -15464,7 +16008,9 @@ def ReadVariableOptionsEnd(builder):
15464
16008
  class ReadVariableOptionsT(object):
15465
16009
 
15466
16010
  # ReadVariableOptionsT
15467
- def __init__(self):
16011
+ def __init__(
16012
+ self,
16013
+ ):
15468
16014
  pass
15469
16015
 
15470
16016
  @classmethod
@@ -15529,7 +16075,9 @@ def AssignVariableOptionsEnd(builder):
15529
16075
  class AssignVariableOptionsT(object):
15530
16076
 
15531
16077
  # AssignVariableOptionsT
15532
- def __init__(self):
16078
+ def __init__(
16079
+ self,
16080
+ ):
15533
16081
  pass
15534
16082
 
15535
16083
  @classmethod
@@ -15614,9 +16162,13 @@ def RandomOptionsEnd(builder):
15614
16162
  class RandomOptionsT(object):
15615
16163
 
15616
16164
  # RandomOptionsT
15617
- def __init__(self):
15618
- self.seed = 0 # type: int
15619
- self.seed2 = 0 # type: int
16165
+ def __init__(
16166
+ self,
16167
+ seed = 0,
16168
+ seed2 = 0,
16169
+ ):
16170
+ self.seed = seed # type: int
16171
+ self.seed2 = seed2 # type: int
15620
16172
 
15621
16173
  @classmethod
15622
16174
  def InitFromBuf(cls, buf, pos):
@@ -15721,8 +16273,11 @@ except:
15721
16273
  class BucketizeOptionsT(object):
15722
16274
 
15723
16275
  # BucketizeOptionsT
15724
- def __init__(self):
15725
- self.boundaries = None # type: List[float]
16276
+ def __init__(
16277
+ self,
16278
+ boundaries = None,
16279
+ ):
16280
+ self.boundaries = boundaries # type: Optional[List[float]]
15726
16281
 
15727
16282
  @classmethod
15728
16283
  def InitFromBuf(cls, buf, pos):
@@ -15813,8 +16368,11 @@ def GeluOptionsEnd(builder):
15813
16368
  class GeluOptionsT(object):
15814
16369
 
15815
16370
  # GeluOptionsT
15816
- def __init__(self):
15817
- self.approximate = False # type: bool
16371
+ def __init__(
16372
+ self,
16373
+ approximate = False,
16374
+ ):
16375
+ self.approximate = approximate # type: bool
15818
16376
 
15819
16377
  @classmethod
15820
16378
  def InitFromBuf(cls, buf, pos):
@@ -15880,7 +16438,9 @@ def DynamicUpdateSliceOptionsEnd(builder):
15880
16438
  class DynamicUpdateSliceOptionsT(object):
15881
16439
 
15882
16440
  # DynamicUpdateSliceOptionsT
15883
- def __init__(self):
16441
+ def __init__(
16442
+ self,
16443
+ ):
15884
16444
  pass
15885
16445
 
15886
16446
  @classmethod
@@ -15945,7 +16505,9 @@ def UnsortedSegmentProdOptionsEnd(builder):
15945
16505
  class UnsortedSegmentProdOptionsT(object):
15946
16506
 
15947
16507
  # UnsortedSegmentProdOptionsT
15948
- def __init__(self):
16508
+ def __init__(
16509
+ self,
16510
+ ):
15949
16511
  pass
15950
16512
 
15951
16513
  @classmethod
@@ -16010,7 +16572,9 @@ def UnsortedSegmentMaxOptionsEnd(builder):
16010
16572
  class UnsortedSegmentMaxOptionsT(object):
16011
16573
 
16012
16574
  # UnsortedSegmentMaxOptionsT
16013
- def __init__(self):
16575
+ def __init__(
16576
+ self,
16577
+ ):
16014
16578
  pass
16015
16579
 
16016
16580
  @classmethod
@@ -16075,7 +16639,9 @@ def UnsortedSegmentSumOptionsEnd(builder):
16075
16639
  class UnsortedSegmentSumOptionsT(object):
16076
16640
 
16077
16641
  # UnsortedSegmentSumOptionsT
16078
- def __init__(self):
16642
+ def __init__(
16643
+ self,
16644
+ ):
16079
16645
  pass
16080
16646
 
16081
16647
  @classmethod
@@ -16140,7 +16706,9 @@ def ATan2OptionsEnd(builder):
16140
16706
  class ATan2OptionsT(object):
16141
16707
 
16142
16708
  # ATan2OptionsT
16143
- def __init__(self):
16709
+ def __init__(
16710
+ self,
16711
+ ):
16144
16712
  pass
16145
16713
 
16146
16714
  @classmethod
@@ -16205,7 +16773,9 @@ def UnsortedSegmentMinOptionsEnd(builder):
16205
16773
  class UnsortedSegmentMinOptionsT(object):
16206
16774
 
16207
16775
  # UnsortedSegmentMinOptionsT
16208
- def __init__(self):
16776
+ def __init__(
16777
+ self,
16778
+ ):
16209
16779
  pass
16210
16780
 
16211
16781
  @classmethod
@@ -16270,7 +16840,9 @@ def SignOptionsEnd(builder):
16270
16840
  class SignOptionsT(object):
16271
16841
 
16272
16842
  # SignOptionsT
16273
- def __init__(self):
16843
+ def __init__(
16844
+ self,
16845
+ ):
16274
16846
  pass
16275
16847
 
16276
16848
  @classmethod
@@ -16335,7 +16907,9 @@ def BitcastOptionsEnd(builder):
16335
16907
  class BitcastOptionsT(object):
16336
16908
 
16337
16909
  # BitcastOptionsT
16338
- def __init__(self):
16910
+ def __init__(
16911
+ self,
16912
+ ):
16339
16913
  pass
16340
16914
 
16341
16915
  @classmethod
@@ -16400,7 +16974,9 @@ def BitwiseXorOptionsEnd(builder):
16400
16974
  class BitwiseXorOptionsT(object):
16401
16975
 
16402
16976
  # BitwiseXorOptionsT
16403
- def __init__(self):
16977
+ def __init__(
16978
+ self,
16979
+ ):
16404
16980
  pass
16405
16981
 
16406
16982
  @classmethod
@@ -16465,7 +17041,9 @@ def RightShiftOptionsEnd(builder):
16465
17041
  class RightShiftOptionsT(object):
16466
17042
 
16467
17043
  # RightShiftOptionsT
16468
- def __init__(self):
17044
+ def __init__(
17045
+ self,
17046
+ ):
16469
17047
  pass
16470
17048
 
16471
17049
  @classmethod
@@ -16530,7 +17108,9 @@ def DilateOptionsEnd(builder):
16530
17108
  class DilateOptionsT(object):
16531
17109
 
16532
17110
  # DilateOptionsT
16533
- def __init__(self):
17111
+ def __init__(
17112
+ self,
17113
+ ):
16534
17114
  pass
16535
17115
 
16536
17116
  @classmethod
@@ -16605,8 +17185,11 @@ def ReduceWindowOptionsEnd(builder):
16605
17185
  class ReduceWindowOptionsT(object):
16606
17186
 
16607
17187
  # ReduceWindowOptionsT
16608
- def __init__(self):
16609
- self.reduceFunction = 0 # type: int
17188
+ def __init__(
17189
+ self,
17190
+ reduceFunction = 0,
17191
+ ):
17192
+ self.reduceFunction = reduceFunction # type: int
16610
17193
 
16611
17194
  @classmethod
16612
17195
  def InitFromBuf(cls, buf, pos):
@@ -16712,11 +17295,17 @@ def OperatorCodeEnd(builder):
16712
17295
  class OperatorCodeT(object):
16713
17296
 
16714
17297
  # OperatorCodeT
16715
- def __init__(self):
16716
- self.deprecatedBuiltinCode = 0 # type: int
16717
- self.customCode = None # type: str
16718
- self.version = 1 # type: int
16719
- self.builtinCode = 0 # type: int
17298
+ def __init__(
17299
+ self,
17300
+ deprecatedBuiltinCode = 0,
17301
+ customCode = None,
17302
+ version = 1,
17303
+ builtinCode = 0,
17304
+ ):
17305
+ self.deprecatedBuiltinCode = deprecatedBuiltinCode # type: int
17306
+ self.customCode = customCode # type: Optional[str]
17307
+ self.version = version # type: int
17308
+ self.builtinCode = builtinCode # type: int
16720
17309
 
16721
17310
  @classmethod
16722
17311
  def InitFromBuf(cls, buf, pos):
@@ -16868,12 +17457,19 @@ except:
16868
17457
  class StableHLOCompositeOptionsT(object):
16869
17458
 
16870
17459
  # StableHLOCompositeOptionsT
16871
- def __init__(self):
16872
- self.name = None # type: str
16873
- self.decompositionSubgraphIndex = 0 # type: int
16874
- self.compositeAttributes = None # type: List[int]
16875
- self.compositeAttributesFormat = 0 # type: int
16876
- self.version = 0 # type: int
17460
+ def __init__(
17461
+ self,
17462
+ name = None,
17463
+ decompositionSubgraphIndex = 0,
17464
+ compositeAttributes = None,
17465
+ compositeAttributesFormat = 0,
17466
+ version = 0,
17467
+ ):
17468
+ self.name = name # type: Optional[str]
17469
+ self.decompositionSubgraphIndex = decompositionSubgraphIndex # type: int
17470
+ self.compositeAttributes = compositeAttributes # type: Optional[List[int]]
17471
+ self.compositeAttributesFormat = compositeAttributesFormat # type: int
17472
+ self.version = version # type: int
16877
17473
 
16878
17474
  @classmethod
16879
17475
  def InitFromBuf(cls, buf, pos):
@@ -16965,7 +17561,9 @@ def StablehloShiftLeftOptionsEnd(builder):
16965
17561
  class StablehloShiftLeftOptionsT(object):
16966
17562
 
16967
17563
  # StablehloShiftLeftOptionsT
16968
- def __init__(self):
17564
+ def __init__(
17565
+ self,
17566
+ ):
16969
17567
  pass
16970
17568
 
16971
17569
  @classmethod
@@ -17295,21 +17893,37 @@ except:
17295
17893
  class OperatorT(object):
17296
17894
 
17297
17895
  # OperatorT
17298
- def __init__(self):
17299
- self.opcodeIndex = 0 # type: int
17300
- self.inputs = None # type: List[int]
17301
- self.outputs = None # type: List[int]
17302
- self.builtinOptionsType = 0 # type: int
17303
- self.builtinOptions = None # type: Union[None, Conv2DOptionsT, DepthwiseConv2DOptionsT, ConcatEmbeddingsOptionsT, LSHProjectionOptionsT, Pool2DOptionsT, SVDFOptionsT, RNNOptionsT, FullyConnectedOptionsT, SoftmaxOptionsT, ConcatenationOptionsT, AddOptionsT, L2NormOptionsT, LocalResponseNormalizationOptionsT, LSTMOptionsT, ResizeBilinearOptionsT, CallOptionsT, ReshapeOptionsT, SkipGramOptionsT, SpaceToDepthOptionsT, EmbeddingLookupSparseOptionsT, MulOptionsT, PadOptionsT, GatherOptionsT, BatchToSpaceNDOptionsT, SpaceToBatchNDOptionsT, TransposeOptionsT, ReducerOptionsT, SubOptionsT, DivOptionsT, SqueezeOptionsT, SequenceRNNOptionsT, StridedSliceOptionsT, ExpOptionsT, TopKV2OptionsT, SplitOptionsT, LogSoftmaxOptionsT, CastOptionsT, DequantizeOptionsT, MaximumMinimumOptionsT, ArgMaxOptionsT, LessOptionsT, NegOptionsT, PadV2OptionsT, GreaterOptionsT, GreaterEqualOptionsT, LessEqualOptionsT, SelectOptionsT, SliceOptionsT, TransposeConvOptionsT, SparseToDenseOptionsT, TileOptionsT, ExpandDimsOptionsT, EqualOptionsT, NotEqualOptionsT, ShapeOptionsT, PowOptionsT, ArgMinOptionsT, FakeQuantOptionsT, PackOptionsT, LogicalOrOptionsT, OneHotOptionsT, LogicalAndOptionsT, LogicalNotOptionsT, UnpackOptionsT, FloorDivOptionsT, SquareOptionsT, ZerosLikeOptionsT, FillOptionsT, BidirectionalSequenceLSTMOptionsT, BidirectionalSequenceRNNOptionsT, UnidirectionalSequenceLSTMOptionsT, FloorModOptionsT, RangeOptionsT, ResizeNearestNeighborOptionsT, LeakyReluOptionsT, SquaredDifferenceOptionsT, MirrorPadOptionsT, AbsOptionsT, SplitVOptionsT, UniqueOptionsT, ReverseV2OptionsT, AddNOptionsT, GatherNdOptionsT, CosOptionsT, WhereOptionsT, RankOptionsT, ReverseSequenceOptionsT, MatrixDiagOptionsT, QuantizeOptionsT, MatrixSetDiagOptionsT, HardSwishOptionsT, IfOptionsT, WhileOptionsT, DepthToSpaceOptionsT, NonMaxSuppressionV4OptionsT, NonMaxSuppressionV5OptionsT, ScatterNdOptionsT, SelectV2OptionsT, DensifyOptionsT, SegmentSumOptionsT, BatchMatMulOptionsT, CumsumOptionsT, CallOnceOptionsT, BroadcastToOptionsT, Rfft2dOptionsT, Conv3DOptionsT, HashtableOptionsT, HashtableFindOptionsT, HashtableImportOptionsT, HashtableSizeOptionsT, VarHandleOptionsT, ReadVariableOptionsT, AssignVariableOptionsT, RandomOptionsT, BucketizeOptionsT, GeluOptionsT, DynamicUpdateSliceOptionsT, UnsortedSegmentProdOptionsT, UnsortedSegmentMaxOptionsT, UnsortedSegmentMinOptionsT, UnsortedSegmentSumOptionsT, ATan2OptionsT, SignOptionsT, BitcastOptionsT, BitwiseXorOptionsT, RightShiftOptionsT]
17304
- self.customOptions = None # type: List[int]
17305
- self.customOptionsFormat = 0 # type: int
17306
- self.mutatingVariableInputs = None # type: List[bool]
17307
- self.intermediates = None # type: List[int]
17308
- self.largeCustomOptionsOffset = 0 # type: int
17309
- self.largeCustomOptionsSize = 0 # type: int
17310
- self.builtinOptions2Type = 0 # type: int
17311
- self.builtinOptions2 = None # type: Union[None, StablehloConcatenateOptionsT, StablehloBroadcastInDimOptionsT, StablehloSliceOptionsT, StablehloConvolutionOptionsT, StablehloCustomCallOptionsT, StablehloReduceOptionsT, StablehloScatterOptionsT, StablehloCompareOptionsT, StablehloDynamicSliceOptionsT, StablehloPadOptionsT, StablehloIotaOptionsT, StablehloDotGeneralOptionsT, StablehloReduceWindowOptionsT, StablehloSortOptionsT, StablehloWhileOptionsT, StablehloGatherOptionsT, StablehloTransposeOptionsT, DilateOptionsT, StablehloRngBitGeneratorOptionsT, ReduceWindowOptionsT, StableHLOCompositeOptionsT, StablehloShiftLeftOptionsT, StablehloCaseOptionsT]
17312
- self.debugMetadataIndex = -1 # type: int
17896
+ def __init__(
17897
+ self,
17898
+ opcodeIndex = 0,
17899
+ inputs = None,
17900
+ outputs = None,
17901
+ builtinOptionsType = 0,
17902
+ builtinOptions = None,
17903
+ customOptions = None,
17904
+ customOptionsFormat = 0,
17905
+ mutatingVariableInputs = None,
17906
+ intermediates = None,
17907
+ largeCustomOptionsOffset = 0,
17908
+ largeCustomOptionsSize = 0,
17909
+ builtinOptions2Type = 0,
17910
+ builtinOptions2 = None,
17911
+ debugMetadataIndex = -1,
17912
+ ):
17913
+ self.opcodeIndex = opcodeIndex # type: int
17914
+ self.inputs = inputs # type: Optional[List[int]]
17915
+ self.outputs = outputs # type: Optional[List[int]]
17916
+ self.builtinOptionsType = builtinOptionsType # type: int
17917
+ self.builtinOptions = builtinOptions # type: Union[None, 'Conv2DOptionsT', 'DepthwiseConv2DOptionsT', 'ConcatEmbeddingsOptionsT', 'LSHProjectionOptionsT', 'Pool2DOptionsT', 'SVDFOptionsT', 'RNNOptionsT', 'FullyConnectedOptionsT', 'SoftmaxOptionsT', 'ConcatenationOptionsT', 'AddOptionsT', 'L2NormOptionsT', 'LocalResponseNormalizationOptionsT', 'LSTMOptionsT', 'ResizeBilinearOptionsT', 'CallOptionsT', 'ReshapeOptionsT', 'SkipGramOptionsT', 'SpaceToDepthOptionsT', 'EmbeddingLookupSparseOptionsT', 'MulOptionsT', 'PadOptionsT', 'GatherOptionsT', 'BatchToSpaceNDOptionsT', 'SpaceToBatchNDOptionsT', 'TransposeOptionsT', 'ReducerOptionsT', 'SubOptionsT', 'DivOptionsT', 'SqueezeOptionsT', 'SequenceRNNOptionsT', 'StridedSliceOptionsT', 'ExpOptionsT', 'TopKV2OptionsT', 'SplitOptionsT', 'LogSoftmaxOptionsT', 'CastOptionsT', 'DequantizeOptionsT', 'MaximumMinimumOptionsT', 'ArgMaxOptionsT', 'LessOptionsT', 'NegOptionsT', 'PadV2OptionsT', 'GreaterOptionsT', 'GreaterEqualOptionsT', 'LessEqualOptionsT', 'SelectOptionsT', 'SliceOptionsT', 'TransposeConvOptionsT', 'SparseToDenseOptionsT', 'TileOptionsT', 'ExpandDimsOptionsT', 'EqualOptionsT', 'NotEqualOptionsT', 'ShapeOptionsT', 'PowOptionsT', 'ArgMinOptionsT', 'FakeQuantOptionsT', 'PackOptionsT', 'LogicalOrOptionsT', 'OneHotOptionsT', 'LogicalAndOptionsT', 'LogicalNotOptionsT', 'UnpackOptionsT', 'FloorDivOptionsT', 'SquareOptionsT', 'ZerosLikeOptionsT', 'FillOptionsT', 'BidirectionalSequenceLSTMOptionsT', 'BidirectionalSequenceRNNOptionsT', 'UnidirectionalSequenceLSTMOptionsT', 'FloorModOptionsT', 'RangeOptionsT', 'ResizeNearestNeighborOptionsT', 'LeakyReluOptionsT', 'SquaredDifferenceOptionsT', 'MirrorPadOptionsT', 'AbsOptionsT', 'SplitVOptionsT', 'UniqueOptionsT', 'ReverseV2OptionsT', 'AddNOptionsT', 'GatherNdOptionsT', 'CosOptionsT', 'WhereOptionsT', 'RankOptionsT', 'ReverseSequenceOptionsT', 'MatrixDiagOptionsT', 'QuantizeOptionsT', 'MatrixSetDiagOptionsT', 'HardSwishOptionsT', 'IfOptionsT', 'WhileOptionsT', 'DepthToSpaceOptionsT', 'NonMaxSuppressionV4OptionsT', 'NonMaxSuppressionV5OptionsT', 'ScatterNdOptionsT', 'SelectV2OptionsT', 'DensifyOptionsT', 'SegmentSumOptionsT', 'BatchMatMulOptionsT', 'CumsumOptionsT', 'CallOnceOptionsT', 'BroadcastToOptionsT', 'Rfft2dOptionsT', 'Conv3DOptionsT', 'HashtableOptionsT', 'HashtableFindOptionsT', 'HashtableImportOptionsT', 'HashtableSizeOptionsT', 'VarHandleOptionsT', 'ReadVariableOptionsT', 'AssignVariableOptionsT', 'RandomOptionsT', 'BucketizeOptionsT', 'GeluOptionsT', 'DynamicUpdateSliceOptionsT', 'UnsortedSegmentProdOptionsT', 'UnsortedSegmentMaxOptionsT', 'UnsortedSegmentMinOptionsT', 'UnsortedSegmentSumOptionsT', 'ATan2OptionsT', 'SignOptionsT', 'BitcastOptionsT', 'BitwiseXorOptionsT', 'RightShiftOptionsT']
17918
+ self.customOptions = customOptions # type: Optional[List[int]]
17919
+ self.customOptionsFormat = customOptionsFormat # type: int
17920
+ self.mutatingVariableInputs = mutatingVariableInputs # type: Optional[List[bool]]
17921
+ self.intermediates = intermediates # type: Optional[List[int]]
17922
+ self.largeCustomOptionsOffset = largeCustomOptionsOffset # type: int
17923
+ self.largeCustomOptionsSize = largeCustomOptionsSize # type: int
17924
+ self.builtinOptions2Type = builtinOptions2Type # type: int
17925
+ self.builtinOptions2 = builtinOptions2 # type: Union[None, 'StablehloConcatenateOptionsT', 'StablehloBroadcastInDimOptionsT', 'StablehloSliceOptionsT', 'StablehloConvolutionOptionsT', 'StablehloCustomCallOptionsT', 'StablehloReduceOptionsT', 'StablehloScatterOptionsT', 'StablehloCompareOptionsT', 'StablehloDynamicSliceOptionsT', 'StablehloPadOptionsT', 'StablehloIotaOptionsT', 'StablehloDotGeneralOptionsT', 'StablehloReduceWindowOptionsT', 'StablehloSortOptionsT', 'StablehloWhileOptionsT', 'StablehloGatherOptionsT', 'StablehloTransposeOptionsT', 'DilateOptionsT', 'StablehloRngBitGeneratorOptionsT', 'ReduceWindowOptionsT', 'StableHLOCompositeOptionsT', 'StablehloShiftLeftOptionsT', 'StablehloCaseOptionsT']
17926
+ self.debugMetadataIndex = debugMetadataIndex # type: int
17313
17927
 
17314
17928
  @classmethod
17315
17929
  def InitFromBuf(cls, buf, pos):
@@ -17632,13 +18246,21 @@ except:
17632
18246
  class SubGraphT(object):
17633
18247
 
17634
18248
  # SubGraphT
17635
- def __init__(self):
17636
- self.tensors = None # type: List[TensorT]
17637
- self.inputs = None # type: List[int]
17638
- self.outputs = None # type: List[int]
17639
- self.operators = None # type: List[OperatorT]
17640
- self.name = None # type: str
17641
- self.debugMetadataIndex = -1 # type: int
18249
+ def __init__(
18250
+ self,
18251
+ tensors = None,
18252
+ inputs = None,
18253
+ outputs = None,
18254
+ operators = None,
18255
+ name = None,
18256
+ debugMetadataIndex = -1,
18257
+ ):
18258
+ self.tensors = tensors # type: Optional[List[TensorT]]
18259
+ self.inputs = inputs # type: Optional[List[int]]
18260
+ self.outputs = outputs # type: Optional[List[int]]
18261
+ self.operators = operators # type: Optional[List[OperatorT]]
18262
+ self.name = name # type: Optional[str]
18263
+ self.debugMetadataIndex = debugMetadataIndex # type: int
17642
18264
 
17643
18265
  @classmethod
17644
18266
  def InitFromBuf(cls, buf, pos):
@@ -17836,10 +18458,15 @@ except:
17836
18458
  class BufferT(object):
17837
18459
 
17838
18460
  # BufferT
17839
- def __init__(self):
17840
- self.data = None # type: List[int]
17841
- self.offset = 0 # type: int
17842
- self.size = 0 # type: int
18461
+ def __init__(
18462
+ self,
18463
+ data = None,
18464
+ offset = 0,
18465
+ size = 0,
18466
+ ):
18467
+ self.data = data # type: Optional[List[int]]
18468
+ self.offset = offset # type: int
18469
+ self.size = size # type: int
17843
18470
 
17844
18471
  @classmethod
17845
18472
  def InitFromBuf(cls, buf, pos):
@@ -17891,6 +18518,228 @@ class BufferT(object):
17891
18518
  return buffer
17892
18519
 
17893
18520
 
18521
+ class ExternalBufferGroup(object):
18522
+ __slots__ = ['_tab']
18523
+
18524
+ @classmethod
18525
+ def GetRootAs(cls, buf, offset=0):
18526
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
18527
+ x = ExternalBufferGroup()
18528
+ x.Init(buf, n + offset)
18529
+ return x
18530
+
18531
+ @classmethod
18532
+ def GetRootAsExternalBufferGroup(cls, buf, offset=0):
18533
+ """This method is deprecated. Please switch to GetRootAs."""
18534
+ return cls.GetRootAs(buf, offset)
18535
+ @classmethod
18536
+ def ExternalBufferGroupBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
18537
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
18538
+
18539
+ # ExternalBufferGroup
18540
+ def Init(self, buf, pos):
18541
+ self._tab = flatbuffers.table.Table(buf, pos)
18542
+
18543
+ # ExternalBufferGroup
18544
+ def Name(self):
18545
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
18546
+ if o != 0:
18547
+ return self._tab.String(o + self._tab.Pos)
18548
+ return None
18549
+
18550
+ def ExternalBufferGroupStart(builder):
18551
+ builder.StartObject(1)
18552
+
18553
+ def ExternalBufferGroupAddName(builder, name):
18554
+ builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
18555
+
18556
+ def ExternalBufferGroupEnd(builder):
18557
+ return builder.EndObject()
18558
+
18559
+
18560
+
18561
+ class ExternalBufferGroupT(object):
18562
+
18563
+ # ExternalBufferGroupT
18564
+ def __init__(
18565
+ self,
18566
+ name = None,
18567
+ ):
18568
+ self.name = name # type: Optional[str]
18569
+
18570
+ @classmethod
18571
+ def InitFromBuf(cls, buf, pos):
18572
+ externalBufferGroup = ExternalBufferGroup()
18573
+ externalBufferGroup.Init(buf, pos)
18574
+ return cls.InitFromObj(externalBufferGroup)
18575
+
18576
+ @classmethod
18577
+ def InitFromPackedBuf(cls, buf, pos=0):
18578
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos)
18579
+ return cls.InitFromBuf(buf, pos+n)
18580
+
18581
+ @classmethod
18582
+ def InitFromObj(cls, externalBufferGroup):
18583
+ x = ExternalBufferGroupT()
18584
+ x._UnPack(externalBufferGroup)
18585
+ return x
18586
+
18587
+ # ExternalBufferGroupT
18588
+ def _UnPack(self, externalBufferGroup):
18589
+ if externalBufferGroup is None:
18590
+ return
18591
+ self.name = externalBufferGroup.Name()
18592
+
18593
+ # ExternalBufferGroupT
18594
+ def Pack(self, builder):
18595
+ if self.name is not None:
18596
+ name = builder.CreateString(self.name)
18597
+ ExternalBufferGroupStart(builder)
18598
+ if self.name is not None:
18599
+ ExternalBufferGroupAddName(builder, name)
18600
+ externalBufferGroup = ExternalBufferGroupEnd(builder)
18601
+ return externalBufferGroup
18602
+
18603
+
18604
+ class ExternalBuffer(object):
18605
+ __slots__ = ['_tab']
18606
+
18607
+ @classmethod
18608
+ def GetRootAs(cls, buf, offset=0):
18609
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
18610
+ x = ExternalBuffer()
18611
+ x.Init(buf, n + offset)
18612
+ return x
18613
+
18614
+ @classmethod
18615
+ def GetRootAsExternalBuffer(cls, buf, offset=0):
18616
+ """This method is deprecated. Please switch to GetRootAs."""
18617
+ return cls.GetRootAs(buf, offset)
18618
+ @classmethod
18619
+ def ExternalBufferBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
18620
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
18621
+
18622
+ # ExternalBuffer
18623
+ def Init(self, buf, pos):
18624
+ self._tab = flatbuffers.table.Table(buf, pos)
18625
+
18626
+ # ExternalBuffer
18627
+ def Id(self):
18628
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
18629
+ if o != 0:
18630
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
18631
+ return 0
18632
+
18633
+ # ExternalBuffer
18634
+ def Group(self):
18635
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
18636
+ if o != 0:
18637
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
18638
+ return 0
18639
+
18640
+ # ExternalBuffer
18641
+ def Offset(self):
18642
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
18643
+ if o != 0:
18644
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
18645
+ return 0
18646
+
18647
+ # ExternalBuffer
18648
+ def Length(self):
18649
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
18650
+ if o != 0:
18651
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
18652
+ return 0
18653
+
18654
+ # ExternalBuffer
18655
+ def Packing(self):
18656
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
18657
+ if o != 0:
18658
+ return self._tab.String(o + self._tab.Pos)
18659
+ return None
18660
+
18661
+ def ExternalBufferStart(builder):
18662
+ builder.StartObject(5)
18663
+
18664
+ def ExternalBufferAddId(builder, id):
18665
+ builder.PrependUint32Slot(0, id, 0)
18666
+
18667
+ def ExternalBufferAddGroup(builder, group):
18668
+ builder.PrependUint32Slot(1, group, 0)
18669
+
18670
+ def ExternalBufferAddOffset(builder, offset):
18671
+ builder.PrependUint64Slot(2, offset, 0)
18672
+
18673
+ def ExternalBufferAddLength(builder, length):
18674
+ builder.PrependUint64Slot(3, length, 0)
18675
+
18676
+ def ExternalBufferAddPacking(builder, packing):
18677
+ builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(packing), 0)
18678
+
18679
+ def ExternalBufferEnd(builder):
18680
+ return builder.EndObject()
18681
+
18682
+
18683
+
18684
+ class ExternalBufferT(object):
18685
+
18686
+ # ExternalBufferT
18687
+ def __init__(
18688
+ self,
18689
+ id = 0,
18690
+ group = 0,
18691
+ offset = 0,
18692
+ length = 0,
18693
+ packing = None,
18694
+ ):
18695
+ self.id = id # type: int
18696
+ self.group = group # type: int
18697
+ self.offset = offset # type: int
18698
+ self.length = length # type: int
18699
+ self.packing = packing # type: Optional[str]
18700
+
18701
+ @classmethod
18702
+ def InitFromBuf(cls, buf, pos):
18703
+ externalBuffer = ExternalBuffer()
18704
+ externalBuffer.Init(buf, pos)
18705
+ return cls.InitFromObj(externalBuffer)
18706
+
18707
+ @classmethod
18708
+ def InitFromPackedBuf(cls, buf, pos=0):
18709
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos)
18710
+ return cls.InitFromBuf(buf, pos+n)
18711
+
18712
+ @classmethod
18713
+ def InitFromObj(cls, externalBuffer):
18714
+ x = ExternalBufferT()
18715
+ x._UnPack(externalBuffer)
18716
+ return x
18717
+
18718
+ # ExternalBufferT
18719
+ def _UnPack(self, externalBuffer):
18720
+ if externalBuffer is None:
18721
+ return
18722
+ self.id = externalBuffer.Id()
18723
+ self.group = externalBuffer.Group()
18724
+ self.offset = externalBuffer.Offset()
18725
+ self.length = externalBuffer.Length()
18726
+ self.packing = externalBuffer.Packing()
18727
+
18728
+ # ExternalBufferT
18729
+ def Pack(self, builder):
18730
+ if self.packing is not None:
18731
+ packing = builder.CreateString(self.packing)
18732
+ ExternalBufferStart(builder)
18733
+ ExternalBufferAddId(builder, self.id)
18734
+ ExternalBufferAddGroup(builder, self.group)
18735
+ ExternalBufferAddOffset(builder, self.offset)
18736
+ ExternalBufferAddLength(builder, self.length)
18737
+ if self.packing is not None:
18738
+ ExternalBufferAddPacking(builder, packing)
18739
+ externalBuffer = ExternalBufferEnd(builder)
18740
+ return externalBuffer
18741
+
18742
+
17894
18743
  class Metadata(object):
17895
18744
  __slots__ = ['_tab']
17896
18745
 
@@ -17944,9 +18793,13 @@ def MetadataEnd(builder):
17944
18793
  class MetadataT(object):
17945
18794
 
17946
18795
  # MetadataT
17947
- def __init__(self):
17948
- self.name = None # type: str
17949
- self.buffer = 0 # type: int
18796
+ def __init__(
18797
+ self,
18798
+ name = None,
18799
+ buffer = 0,
18800
+ ):
18801
+ self.name = name # type: Optional[str]
18802
+ self.buffer = buffer # type: int
17950
18803
 
17951
18804
  @classmethod
17952
18805
  def InitFromBuf(cls, buf, pos):
@@ -18037,9 +18890,13 @@ def TensorMapEnd(builder):
18037
18890
  class TensorMapT(object):
18038
18891
 
18039
18892
  # TensorMapT
18040
- def __init__(self):
18041
- self.name = None # type: str
18042
- self.tensorIndex = 0 # type: int
18893
+ def __init__(
18894
+ self,
18895
+ name = None,
18896
+ tensorIndex = 0,
18897
+ ):
18898
+ self.name = name # type: Optional[str]
18899
+ self.tensorIndex = tensorIndex # type: int
18043
18900
 
18044
18901
  @classmethod
18045
18902
  def InitFromBuf(cls, buf, pos):
@@ -18194,11 +19051,17 @@ except:
18194
19051
  class SignatureDefT(object):
18195
19052
 
18196
19053
  # SignatureDefT
18197
- def __init__(self):
18198
- self.inputs = None # type: List[TensorMapT]
18199
- self.outputs = None # type: List[TensorMapT]
18200
- self.signatureKey = None # type: str
18201
- self.subgraphIndex = 0 # type: int
19054
+ def __init__(
19055
+ self,
19056
+ inputs = None,
19057
+ outputs = None,
19058
+ signatureKey = None,
19059
+ subgraphIndex = 0,
19060
+ ):
19061
+ self.inputs = inputs # type: Optional[List[TensorMapT]]
19062
+ self.outputs = outputs # type: Optional[List[TensorMapT]]
19063
+ self.signatureKey = signatureKey # type: Optional[str]
19064
+ self.subgraphIndex = subgraphIndex # type: int
18202
19065
 
18203
19066
  @classmethod
18204
19067
  def InitFromBuf(cls, buf, pos):
@@ -18455,8 +19318,56 @@ class Model(object):
18455
19318
  o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
18456
19319
  return o == 0
18457
19320
 
19321
+ # Model
19322
+ def ExternalBufferGroups(self, j):
19323
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
19324
+ if o != 0:
19325
+ x = self._tab.Vector(o)
19326
+ x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
19327
+ x = self._tab.Indirect(x)
19328
+ obj = ExternalBufferGroup()
19329
+ obj.Init(self._tab.Bytes, x)
19330
+ return obj
19331
+ return None
19332
+
19333
+ # Model
19334
+ def ExternalBufferGroupsLength(self):
19335
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
19336
+ if o != 0:
19337
+ return self._tab.VectorLen(o)
19338
+ return 0
19339
+
19340
+ # Model
19341
+ def ExternalBufferGroupsIsNone(self):
19342
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
19343
+ return o == 0
19344
+
19345
+ # Model
19346
+ def ExternalBuffers(self, j):
19347
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
19348
+ if o != 0:
19349
+ x = self._tab.Vector(o)
19350
+ x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
19351
+ x = self._tab.Indirect(x)
19352
+ obj = ExternalBuffer()
19353
+ obj.Init(self._tab.Bytes, x)
19354
+ return obj
19355
+ return None
19356
+
19357
+ # Model
19358
+ def ExternalBuffersLength(self):
19359
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
19360
+ if o != 0:
19361
+ return self._tab.VectorLen(o)
19362
+ return 0
19363
+
19364
+ # Model
19365
+ def ExternalBuffersIsNone(self):
19366
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
19367
+ return o == 0
19368
+
18458
19369
  def ModelStart(builder):
18459
- builder.StartObject(8)
19370
+ builder.StartObject(10)
18460
19371
 
18461
19372
  def ModelAddVersion(builder, version):
18462
19373
  builder.PrependUint32Slot(0, version, 0)
@@ -18500,6 +19411,18 @@ def ModelAddSignatureDefs(builder, signatureDefs):
18500
19411
  def ModelStartSignatureDefsVector(builder, numElems):
18501
19412
  return builder.StartVector(4, numElems, 4)
18502
19413
 
19414
+ def ModelAddExternalBufferGroups(builder, externalBufferGroups):
19415
+ builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(externalBufferGroups), 0)
19416
+
19417
+ def ModelStartExternalBufferGroupsVector(builder, numElems):
19418
+ return builder.StartVector(4, numElems, 4)
19419
+
19420
+ def ModelAddExternalBuffers(builder, externalBuffers):
19421
+ builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(externalBuffers), 0)
19422
+
19423
+ def ModelStartExternalBuffersVector(builder, numElems):
19424
+ return builder.StartVector(4, numElems, 4)
19425
+
18503
19426
  def ModelEnd(builder):
18504
19427
  return builder.EndObject()
18505
19428
 
@@ -18512,15 +19435,29 @@ except:
18512
19435
  class ModelT(object):
18513
19436
 
18514
19437
  # ModelT
18515
- def __init__(self):
18516
- self.version = 0 # type: int
18517
- self.operatorCodes = None # type: List[OperatorCodeT]
18518
- self.subgraphs = None # type: List[SubGraphT]
18519
- self.description = None # type: str
18520
- self.buffers = None # type: List[BufferT]
18521
- self.metadataBuffer = None # type: List[int]
18522
- self.metadata = None # type: List[MetadataT]
18523
- self.signatureDefs = None # type: List[SignatureDefT]
19438
+ def __init__(
19439
+ self,
19440
+ version = 0,
19441
+ operatorCodes = None,
19442
+ subgraphs = None,
19443
+ description = None,
19444
+ buffers = None,
19445
+ metadataBuffer = None,
19446
+ metadata = None,
19447
+ signatureDefs = None,
19448
+ externalBufferGroups = None,
19449
+ externalBuffers = None,
19450
+ ):
19451
+ self.version = version # type: int
19452
+ self.operatorCodes = operatorCodes # type: Optional[List[OperatorCodeT]]
19453
+ self.subgraphs = subgraphs # type: Optional[List[SubGraphT]]
19454
+ self.description = description # type: Optional[str]
19455
+ self.buffers = buffers # type: Optional[List[BufferT]]
19456
+ self.metadataBuffer = metadataBuffer # type: Optional[List[int]]
19457
+ self.metadata = metadata # type: Optional[List[MetadataT]]
19458
+ self.signatureDefs = signatureDefs # type: Optional[List[SignatureDefT]]
19459
+ self.externalBufferGroups = externalBufferGroups # type: Optional[List[ExternalBufferGroupT]]
19460
+ self.externalBuffers = externalBuffers # type: Optional[List[ExternalBufferT]]
18524
19461
 
18525
19462
  @classmethod
18526
19463
  def InitFromBuf(cls, buf, pos):
@@ -18592,6 +19529,22 @@ class ModelT(object):
18592
19529
  else:
18593
19530
  signatureDef_ = SignatureDefT.InitFromObj(model.SignatureDefs(i))
18594
19531
  self.signatureDefs.append(signatureDef_)
19532
+ if not model.ExternalBufferGroupsIsNone():
19533
+ self.externalBufferGroups = []
19534
+ for i in range(model.ExternalBufferGroupsLength()):
19535
+ if model.ExternalBufferGroups(i) is None:
19536
+ self.externalBufferGroups.append(None)
19537
+ else:
19538
+ externalBufferGroup_ = ExternalBufferGroupT.InitFromObj(model.ExternalBufferGroups(i))
19539
+ self.externalBufferGroups.append(externalBufferGroup_)
19540
+ if not model.ExternalBuffersIsNone():
19541
+ self.externalBuffers = []
19542
+ for i in range(model.ExternalBuffersLength()):
19543
+ if model.ExternalBuffers(i) is None:
19544
+ self.externalBuffers.append(None)
19545
+ else:
19546
+ externalBuffer_ = ExternalBufferT.InitFromObj(model.ExternalBuffers(i))
19547
+ self.externalBuffers.append(externalBuffer_)
18595
19548
 
18596
19549
  # ModelT
18597
19550
  def Pack(self, builder):
@@ -18645,6 +19598,22 @@ class ModelT(object):
18645
19598
  for i in reversed(range(len(self.signatureDefs))):
18646
19599
  builder.PrependUOffsetTRelative(signatureDefslist[i])
18647
19600
  signatureDefs = builder.EndVector()
19601
+ if self.externalBufferGroups is not None:
19602
+ externalBufferGroupslist = []
19603
+ for i in range(len(self.externalBufferGroups)):
19604
+ externalBufferGroupslist.append(self.externalBufferGroups[i].Pack(builder))
19605
+ ModelStartExternalBufferGroupsVector(builder, len(self.externalBufferGroups))
19606
+ for i in reversed(range(len(self.externalBufferGroups))):
19607
+ builder.PrependUOffsetTRelative(externalBufferGroupslist[i])
19608
+ externalBufferGroups = builder.EndVector()
19609
+ if self.externalBuffers is not None:
19610
+ externalBufferslist = []
19611
+ for i in range(len(self.externalBuffers)):
19612
+ externalBufferslist.append(self.externalBuffers[i].Pack(builder))
19613
+ ModelStartExternalBuffersVector(builder, len(self.externalBuffers))
19614
+ for i in reversed(range(len(self.externalBuffers))):
19615
+ builder.PrependUOffsetTRelative(externalBufferslist[i])
19616
+ externalBuffers = builder.EndVector()
18648
19617
  ModelStart(builder)
18649
19618
  ModelAddVersion(builder, self.version)
18650
19619
  if self.operatorCodes is not None:
@@ -18661,6 +19630,10 @@ class ModelT(object):
18661
19630
  ModelAddMetadata(builder, metadata)
18662
19631
  if self.signatureDefs is not None:
18663
19632
  ModelAddSignatureDefs(builder, signatureDefs)
19633
+ if self.externalBufferGroups is not None:
19634
+ ModelAddExternalBufferGroups(builder, externalBufferGroups)
19635
+ if self.externalBuffers is not None:
19636
+ ModelAddExternalBuffers(builder, externalBuffers)
18664
19637
  model = ModelEnd(builder)
18665
19638
  return model
18666
19639