aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerik.andersson@arm.com <erik.andersson@arm.com>2022-09-27 12:06:32 +0200
committertim.hall <tim.hall@arm.com>2022-10-03 14:22:47 +0000
commit61f05d92525447f62b9531b17297822b9232e8ab (patch)
tree09cf20904e84594d70977cf6bb67142ed874763b
parent6ef02301ce36a0d2b72171926376d62d42bd348a (diff)
downloadethos-u-vela-61f05d92525447f62b9531b17297822b9232e8ab.tar.gz
MLBEDSW-6955: Update to TensorFlow 2.10
- Updated to TensorFlow 2.10 and FlatBuffers 2.0.7 - Changed absolute to relative imports in the auto-generated code - Updated Vela's TFLite writer to support FlatBuffer builder's internal number of elements count - Removed use of deprecated numElems argument to FlatBuffer builder's EndVector() Signed-off-by: erik.andersson@arm.com <erik.andersson@arm.com> Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: If447778134db81ae0ac374c7397e1140082372fd
-rw-r--r--README.md3
-rw-r--r--ethosu/vela/operation.py5
-rw-r--r--ethosu/vela/tflite/ATan2Options.py36
-rw-r--r--ethosu/vela/tflite/AbsOptions.py16
-rw-r--r--ethosu/vela/tflite/ActivationFunctionType.py1
-rw-r--r--ethosu/vela/tflite/AddNOptions.py16
-rw-r--r--ethosu/vela/tflite/AddOptions.py20
-rw-r--r--ethosu/vela/tflite/ArgMaxOptions.py18
-rw-r--r--ethosu/vela/tflite/ArgMinOptions.py18
-rw-r--r--ethosu/vela/tflite/AssignVariableOptions.py16
-rw-r--r--ethosu/vela/tflite/BatchMatMulOptions.py22
-rw-r--r--ethosu/vela/tflite/BatchToSpaceNDOptions.py16
-rw-r--r--ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py28
-rw-r--r--ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py24
-rw-r--r--ethosu/vela/tflite/BroadcastToOptions.py16
-rw-r--r--ethosu/vela/tflite/BucketizeOptions.py25
-rw-r--r--ethosu/vela/tflite/Buffer.py25
-rw-r--r--ethosu/vela/tflite/BuiltinOperator.py6
-rw-r--r--ethosu/vela/tflite/BuiltinOptions.py6
-rw-r--r--ethosu/vela/tflite/CallOnceOptions.py18
-rw-r--r--ethosu/vela/tflite/CallOptions.py18
-rw-r--r--ethosu/vela/tflite/CastOptions.py20
-rw-r--r--ethosu/vela/tflite/CombinerType.py1
-rw-r--r--ethosu/vela/tflite/ConcatEmbeddingsOptions.py36
-rw-r--r--ethosu/vela/tflite/ConcatenationOptions.py20
-rw-r--r--ethosu/vela/tflite/Conv2DOptions.py28
-rw-r--r--ethosu/vela/tflite/Conv3DOptions.py32
-rw-r--r--ethosu/vela/tflite/CosOptions.py16
-rw-r--r--ethosu/vela/tflite/CumsumOptions.py20
-rw-r--r--ethosu/vela/tflite/CustomOptionsFormat.py1
-rw-r--r--ethosu/vela/tflite/CustomQuantization.py25
-rw-r--r--ethosu/vela/tflite/DensifyOptions.py16
-rw-r--r--ethosu/vela/tflite/DepthToSpaceOptions.py18
-rw-r--r--ethosu/vela/tflite/DepthwiseConv2DOptions.py30
-rw-r--r--ethosu/vela/tflite/DequantizeOptions.py16
-rw-r--r--ethosu/vela/tflite/DimensionMetadata.py28
-rw-r--r--ethosu/vela/tflite/DimensionType.py1
-rw-r--r--ethosu/vela/tflite/DivOptions.py18
-rw-r--r--ethosu/vela/tflite/DynamicUpdateSliceOptions.py16
-rw-r--r--ethosu/vela/tflite/EmbeddingLookupSparseOptions.py18
-rw-r--r--ethosu/vela/tflite/EqualOptions.py16
-rw-r--r--ethosu/vela/tflite/ExpOptions.py16
-rw-r--r--ethosu/vela/tflite/ExpandDimsOptions.py16
-rw-r--r--ethosu/vela/tflite/FakeQuantOptions.py24
-rw-r--r--ethosu/vela/tflite/FillOptions.py16
-rw-r--r--ethosu/vela/tflite/FloorDivOptions.py16
-rw-r--r--ethosu/vela/tflite/FloorModOptions.py16
-rw-r--r--ethosu/vela/tflite/FullyConnectedOptions.py24
-rw-r--r--ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py1
-rw-r--r--ethosu/vela/tflite/GatherNdOptions.py16
-rw-r--r--ethosu/vela/tflite/GatherOptions.py20
-rw-r--r--ethosu/vela/tflite/GeluOptions.py18
-rw-r--r--ethosu/vela/tflite/GreaterEqualOptions.py16
-rw-r--r--ethosu/vela/tflite/GreaterOptions.py16
-rw-r--r--ethosu/vela/tflite/HardSwishOptions.py16
-rw-r--r--ethosu/vela/tflite/HashtableFindOptions.py16
-rw-r--r--ethosu/vela/tflite/HashtableImportOptions.py16
-rw-r--r--ethosu/vela/tflite/HashtableOptions.py22
-rw-r--r--ethosu/vela/tflite/HashtableSizeOptions.py16
-rw-r--r--ethosu/vela/tflite/IfOptions.py20
-rw-r--r--ethosu/vela/tflite/Int32Vector.py25
-rw-r--r--ethosu/vela/tflite/L2NormOptions.py18
-rw-r--r--ethosu/vela/tflite/LSHProjectionOptions.py18
-rw-r--r--ethosu/vela/tflite/LSHProjectionType.py1
-rw-r--r--ethosu/vela/tflite/LSTMKernelType.py1
-rw-r--r--ethosu/vela/tflite/LSTMOptions.py26
-rw-r--r--ethosu/vela/tflite/LeakyReluOptions.py18
-rw-r--r--ethosu/vela/tflite/LessEqualOptions.py16
-rw-r--r--ethosu/vela/tflite/LessOptions.py16
-rw-r--r--ethosu/vela/tflite/LocalResponseNormalizationOptions.py24
-rw-r--r--ethosu/vela/tflite/LogSoftmaxOptions.py16
-rw-r--r--ethosu/vela/tflite/LogicalAndOptions.py16
-rw-r--r--ethosu/vela/tflite/LogicalNotOptions.py16
-rw-r--r--ethosu/vela/tflite/LogicalOrOptions.py16
-rw-r--r--ethosu/vela/tflite/MatrixDiagOptions.py16
-rw-r--r--ethosu/vela/tflite/MatrixSetDiagOptions.py16
-rw-r--r--ethosu/vela/tflite/MaximumMinimumOptions.py16
-rw-r--r--ethosu/vela/tflite/Metadata.py20
-rw-r--r--ethosu/vela/tflite/MirrorPadMode.py1
-rw-r--r--ethosu/vela/tflite/MirrorPadOptions.py18
-rw-r--r--ethosu/vela/tflite/Model.py74
-rw-r--r--ethosu/vela/tflite/MulOptions.py18
-rw-r--r--ethosu/vela/tflite/NegOptions.py16
-rw-r--r--ethosu/vela/tflite/NonMaxSuppressionV4Options.py16
-rw-r--r--ethosu/vela/tflite/NonMaxSuppressionV5Options.py16
-rw-r--r--ethosu/vela/tflite/NotEqualOptions.py16
-rw-r--r--ethosu/vela/tflite/OneHotOptions.py18
-rw-r--r--ethosu/vela/tflite/Operator.py69
-rw-r--r--ethosu/vela/tflite/OperatorCode.py24
-rw-r--r--ethosu/vela/tflite/PackOptions.py20
-rw-r--r--ethosu/vela/tflite/PadOptions.py16
-rw-r--r--ethosu/vela/tflite/PadV2Options.py16
-rw-r--r--ethosu/vela/tflite/Padding.py1
-rw-r--r--ethosu/vela/tflite/Pool2DOptions.py28
-rw-r--r--ethosu/vela/tflite/PowOptions.py16
-rw-r--r--ethosu/vela/tflite/QuantizationDetails.py1
-rw-r--r--ethosu/vela/tflite/QuantizationParameters.py58
-rw-r--r--ethosu/vela/tflite/QuantizeOptions.py16
-rw-r--r--ethosu/vela/tflite/RNNOptions.py20
-rw-r--r--ethosu/vela/tflite/RandomOptions.py20
-rw-r--r--ethosu/vela/tflite/RangeOptions.py16
-rw-r--r--ethosu/vela/tflite/RankOptions.py16
-rw-r--r--ethosu/vela/tflite/ReadVariableOptions.py16
-rw-r--r--ethosu/vela/tflite/ReducerOptions.py18
-rw-r--r--ethosu/vela/tflite/ReshapeOptions.py25
-rw-r--r--ethosu/vela/tflite/ResizeBilinearOptions.py20
-rw-r--r--ethosu/vela/tflite/ResizeNearestNeighborOptions.py20
-rw-r--r--ethosu/vela/tflite/ReverseSequenceOptions.py20
-rw-r--r--ethosu/vela/tflite/ReverseV2Options.py16
-rw-r--r--ethosu/vela/tflite/Rfft2dOptions.py16
-rw-r--r--ethosu/vela/tflite/SVDFOptions.py22
-rw-r--r--ethosu/vela/tflite/ScatterNdOptions.py16
-rw-r--r--ethosu/vela/tflite/SegmentSumOptions.py16
-rw-r--r--ethosu/vela/tflite/SelectOptions.py16
-rw-r--r--ethosu/vela/tflite/SelectV2Options.py16
-rw-r--r--ethosu/vela/tflite/SequenceRNNOptions.py22
-rw-r--r--ethosu/vela/tflite/ShapeOptions.py18
-rw-r--r--ethosu/vela/tflite/SignOptions.py36
-rw-r--r--ethosu/vela/tflite/SignatureDef.py38
-rw-r--r--ethosu/vela/tflite/SkipGramOptions.py22
-rw-r--r--ethosu/vela/tflite/SliceOptions.py16
-rw-r--r--ethosu/vela/tflite/SoftmaxOptions.py18
-rw-r--r--ethosu/vela/tflite/SpaceToBatchNDOptions.py16
-rw-r--r--ethosu/vela/tflite/SpaceToDepthOptions.py18
-rw-r--r--ethosu/vela/tflite/SparseIndexVector.py1
-rw-r--r--ethosu/vela/tflite/SparseToDenseOptions.py18
-rw-r--r--ethosu/vela/tflite/SparsityParameters.py43
-rw-r--r--ethosu/vela/tflite/SplitOptions.py18
-rw-r--r--ethosu/vela/tflite/SplitVOptions.py18
-rw-r--r--ethosu/vela/tflite/SquareOptions.py16
-rw-r--r--ethosu/vela/tflite/SquaredDifferenceOptions.py16
-rw-r--r--ethosu/vela/tflite/SqueezeOptions.py25
-rw-r--r--ethosu/vela/tflite/StridedSliceOptions.py26
-rw-r--r--ethosu/vela/tflite/SubGraph.py54
-rw-r--r--ethosu/vela/tflite/SubOptions.py20
-rw-r--r--ethosu/vela/tflite/Tensor.py89
-rw-r--r--ethosu/vela/tflite/TensorMap.py20
-rw-r--r--ethosu/vela/tflite/TensorType.py1
-rw-r--r--ethosu/vela/tflite/TileOptions.py16
-rw-r--r--ethosu/vela/tflite/TopKV2Options.py16
-rw-r--r--ethosu/vela/tflite/TransposeConvOptions.py22
-rw-r--r--ethosu/vela/tflite/TransposeOptions.py16
-rw-r--r--ethosu/vela/tflite/Uint16Vector.py25
-rw-r--r--ethosu/vela/tflite/Uint8Vector.py25
-rw-r--r--ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py26
-rw-r--r--ethosu/vela/tflite/UniqueOptions.py18
-rw-r--r--ethosu/vela/tflite/UnpackOptions.py20
-rw-r--r--ethosu/vela/tflite/UnsortedSegmentMaxOptions.py36
-rw-r--r--ethosu/vela/tflite/UnsortedSegmentMinOptions.py36
-rw-r--r--ethosu/vela/tflite/UnsortedSegmentProdOptions.py26
-rw-r--r--ethosu/vela/tflite/UnsortedSegmentSumOptions.py36
-rw-r--r--ethosu/vela/tflite/VarHandleOptions.py20
-rw-r--r--ethosu/vela/tflite/VariantSubType.py89
-rw-r--r--ethosu/vela/tflite/WhereOptions.py16
-rw-r--r--ethosu/vela/tflite/WhileOptions.py20
-rw-r--r--ethosu/vela/tflite/ZerosLikeOptions.py16
-rw-r--r--ethosu/vela/tflite_mapping.py33
-rw-r--r--ethosu/vela/tflite_writer.py14
-rw-r--r--setup.py2
159 files changed, 3040 insertions, 169 deletions
diff --git a/README.md b/README.md
index 8060e812..3991a98f 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,8 @@ The tool has limited functionality for compiling a
## TensorFlow Support
-* Vela 3.5.0 to current supports TensorFlow 2.9
+* Vela 3.6.0 to current supports TensorFlow 2.10
+* Vela 3.5.0 supports TensorFlow 2.9
* Vela 3.4.0 supports TensorFlow 2.8
* Vela 3.3.0 supports TensorFlow 2.7
* Vela 3.1.0 to 3.2.0 supports TensorFlow 2.5
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index af2205cd..8b3c88d9 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -136,6 +136,7 @@ class Op(Enum):
ArgMax = OperatorInfo()
ArgMin = OperatorInfo()
AvgPool = OperatorInfo(block_type=NpuBlockType.Pooling, indices=NNG_IFM_INDICES)
+ Atan2 = OperatorInfo(indices=NNG_IFM_IFM2_INDICES)
BatchMatMul = OperatorInfo()
BatchToSpaceND = OperatorInfo()
BidirectionalSequenceLstm = OperatorInfo(block_type=NpuBlockType.VectorProduct, indices=NNG_IFM_WEIGHTS_INDICES)
@@ -265,6 +266,7 @@ class Op(Enum):
SelectV2 = OperatorInfo()
Shape = OperatorInfo(indices=NNG_IFM_INDICES)
Sigmoid = OperatorInfo(indices=NNG_IFM_INDICES)
+ Sign = OperatorInfo(indices=NNG_IFM_INDICES)
SignBit = OperatorInfo()
Sin = OperatorInfo()
SkipGram = OperatorInfo()
@@ -322,6 +324,9 @@ class Op(Enum):
Gelu = OperatorInfo()
DynamicUpdateSlice = OperatorInfo()
UnsortedSegmentProd = OperatorInfo()
+ UnsortedSegmentMax = OperatorInfo()
+ UnsortedSegmentMin = OperatorInfo()
+ UnsortedSegmentSum = OperatorInfo()
@property
def info(self):
diff --git a/ethosu/vela/tflite/ATan2Options.py b/ethosu/vela/tflite/ATan2Options.py
new file mode 100644
index 00000000..15ca3dd6
--- /dev/null
+++ b/ethosu/vela/tflite/ATan2Options.py
@@ -0,0 +1,36 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class ATan2Options(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = ATan2Options()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsATan2Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ATan2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # ATan2Options
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def ATan2OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ATan2OptionsStart(builder)
+def ATan2OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ATan2OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/AbsOptions.py b/ethosu/vela/tflite/AbsOptions.py
index 0cbfb8c0..df140416 100644
--- a/ethosu/vela/tflite/AbsOptions.py
+++ b/ethosu/vela/tflite/AbsOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class AbsOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsAbsOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = AbsOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsAbsOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def AbsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AbsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def AbsOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return AbsOptionsStart(builder)
def AbsOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return AbsOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ActivationFunctionType.py b/ethosu/vela/tflite/ActivationFunctionType.py
index dc177dee..6d8ec952 100644
--- a/ethosu/vela/tflite/ActivationFunctionType.py
+++ b/ethosu/vela/tflite/ActivationFunctionType.py
@@ -9,4 +9,3 @@ class ActivationFunctionType(object):
RELU6 = 3
TANH = 4
SIGN_BIT = 5
-
diff --git a/ethosu/vela/tflite/AddNOptions.py b/ethosu/vela/tflite/AddNOptions.py
index b5c2ddb7..d3b233d8 100644
--- a/ethosu/vela/tflite/AddNOptions.py
+++ b/ethosu/vela/tflite/AddNOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class AddNOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsAddNOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = AddNOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsAddNOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def AddNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AddNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def AddNOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return AddNOptionsStart(builder)
def AddNOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return AddNOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/AddOptions.py b/ethosu/vela/tflite/AddOptions.py
index 154e6d18..d8a11051 100644
--- a/ethosu/vela/tflite/AddOptions.py
+++ b/ethosu/vela/tflite/AddOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class AddOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsAddOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = AddOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsAddOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def AddOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AddOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class AddOptions(object):
return True
def AddOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return AddOptionsStart(builder)
def AddOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return AddOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def AddOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1)
+def AddPotScaleInt16(builder, potScaleInt16):
+ return AddOptionsAddPotScaleInt16(builder, potScaleInt16)
def AddOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return AddOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ArgMaxOptions.py b/ethosu/vela/tflite/ArgMaxOptions.py
index fbf1415e..a4728fbb 100644
--- a/ethosu/vela/tflite/ArgMaxOptions.py
+++ b/ethosu/vela/tflite/ArgMaxOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ArgMaxOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsArgMaxOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ArgMaxOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsArgMaxOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ArgMaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ArgMaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class ArgMaxOptions(object):
return 0
def ArgMaxOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ArgMaxOptionsStart(builder)
def ArgMaxOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0)
+def AddOutputType(builder, outputType):
+ return ArgMaxOptionsAddOutputType(builder, outputType)
def ArgMaxOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ArgMaxOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ArgMinOptions.py b/ethosu/vela/tflite/ArgMinOptions.py
index 120fdca2..adcdc39c 100644
--- a/ethosu/vela/tflite/ArgMinOptions.py
+++ b/ethosu/vela/tflite/ArgMinOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ArgMinOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsArgMinOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ArgMinOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsArgMinOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ArgMinOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ArgMinOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class ArgMinOptions(object):
return 0
def ArgMinOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ArgMinOptionsStart(builder)
def ArgMinOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0)
+def AddOutputType(builder, outputType):
+ return ArgMinOptionsAddOutputType(builder, outputType)
def ArgMinOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ArgMinOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/AssignVariableOptions.py b/ethosu/vela/tflite/AssignVariableOptions.py
index f214bcb6..a06c6291 100644
--- a/ethosu/vela/tflite/AssignVariableOptions.py
+++ b/ethosu/vela/tflite/AssignVariableOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class AssignVariableOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsAssignVariableOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = AssignVariableOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsAssignVariableOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def AssignVariableOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AssignVariableOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def AssignVariableOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return AssignVariableOptionsStart(builder)
def AssignVariableOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return AssignVariableOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BatchMatMulOptions.py b/ethosu/vela/tflite/BatchMatMulOptions.py
index c0f755bd..061bb0c8 100644
--- a/ethosu/vela/tflite/BatchMatMulOptions.py
+++ b/ethosu/vela/tflite/BatchMatMulOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BatchMatMulOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBatchMatMulOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BatchMatMulOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBatchMatMulOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BatchMatMulOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BatchMatMulOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class BatchMatMulOptions(object):
return False
def BatchMatMulOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return BatchMatMulOptionsStart(builder)
def BatchMatMulOptionsAddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0)
+def AddAdjX(builder, adjX):
+ return BatchMatMulOptionsAddAdjX(builder, adjX)
def BatchMatMulOptionsAddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0)
+def AddAdjY(builder, adjY):
+ return BatchMatMulOptionsAddAdjY(builder, adjY)
def BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def BatchMatMulOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BatchMatMulOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BatchToSpaceNDOptions.py b/ethosu/vela/tflite/BatchToSpaceNDOptions.py
index 3ddcfd3f..f07813cd 100644
--- a/ethosu/vela/tflite/BatchToSpaceNDOptions.py
+++ b/ethosu/vela/tflite/BatchToSpaceNDOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BatchToSpaceNDOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBatchToSpaceNDOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BatchToSpaceNDOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBatchToSpaceNDOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BatchToSpaceNDOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BatchToSpaceNDOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def BatchToSpaceNDOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return BatchToSpaceNDOptionsStart(builder)
def BatchToSpaceNDOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BatchToSpaceNDOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
index 0a0a83b7..25c0c281 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BidirectionalSequenceLSTMOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBidirectionalSequenceLSTMOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BidirectionalSequenceLSTMOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBidirectionalSequenceLSTMOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BidirectionalSequenceLSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BidirectionalSequenceLSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -61,10 +71,26 @@ class BidirectionalSequenceLSTMOptions(object):
return False
def BidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(6)
+def Start(builder):
+ return BidirectionalSequenceLSTMOptionsStart(builder)
def BidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return BidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def BidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
+def AddCellClip(builder, cellClip):
+ return BidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip)
def BidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
+def AddProjClip(builder, projClip):
+ return BidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip)
def BidirectionalSequenceLSTMOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(3, mergeOutputs, 0)
+def AddMergeOutputs(builder, mergeOutputs):
+ return BidirectionalSequenceLSTMOptionsAddMergeOutputs(builder, mergeOutputs)
def BidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(4, timeMajor, 1)
+def AddTimeMajor(builder, timeMajor):
+ return BidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor)
def BidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(5, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return BidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def BidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BidirectionalSequenceLSTMOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
index e1f66ce2..67c89c8c 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BidirectionalSequenceRNNOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBidirectionalSequenceRNNOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BidirectionalSequenceRNNOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBidirectionalSequenceRNNOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BidirectionalSequenceRNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BidirectionalSequenceRNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -47,8 +57,20 @@ class BidirectionalSequenceRNNOptions(object):
return False
def BidirectionalSequenceRNNOptionsStart(builder): builder.StartObject(4)
+def Start(builder):
+ return BidirectionalSequenceRNNOptionsStart(builder)
def BidirectionalSequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0)
+def AddTimeMajor(builder, timeMajor):
+ return BidirectionalSequenceRNNOptionsAddTimeMajor(builder, timeMajor)
def BidirectionalSequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return BidirectionalSequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def BidirectionalSequenceRNNOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(2, mergeOutputs, 0)
+def AddMergeOutputs(builder, mergeOutputs):
+ return BidirectionalSequenceRNNOptionsAddMergeOutputs(builder, mergeOutputs)
def BidirectionalSequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return BidirectionalSequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def BidirectionalSequenceRNNOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BidirectionalSequenceRNNOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BroadcastToOptions.py b/ethosu/vela/tflite/BroadcastToOptions.py
index 3b3dce85..a7f2c707 100644
--- a/ethosu/vela/tflite/BroadcastToOptions.py
+++ b/ethosu/vela/tflite/BroadcastToOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BroadcastToOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBroadcastToOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BroadcastToOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBroadcastToOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BroadcastToOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BroadcastToOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def BroadcastToOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return BroadcastToOptionsStart(builder)
def BroadcastToOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BroadcastToOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BucketizeOptions.py b/ethosu/vela/tflite/BucketizeOptions.py
index d4a87015..1c6fa68d 100644
--- a/ethosu/vela/tflite/BucketizeOptions.py
+++ b/ethosu/vela/tflite/BucketizeOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class BucketizeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBucketizeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BucketizeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBucketizeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BucketizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BucketizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class BucketizeOptions(object):
return self._tab.VectorLen(o)
return 0
+ # BucketizeOptions
+ def BoundariesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def BucketizeOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return BucketizeOptionsStart(builder)
def BucketizeOptionsAddBoundaries(builder, boundaries): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(boundaries), 0)
+def AddBoundaries(builder, boundaries):
+ return BucketizeOptionsAddBoundaries(builder, boundaries)
def BucketizeOptionsStartBoundariesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartBoundariesVector(builder, numElems):
+ return BucketizeOptionsStartBoundariesVector(builder, numElems)
def BucketizeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return BucketizeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Buffer.py b/ethosu/vela/tflite/Buffer.py
index 754dee3b..e9d45a51 100644
--- a/ethosu/vela/tflite/Buffer.py
+++ b/ethosu/vela/tflite/Buffer.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Buffer(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsBuffer(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Buffer()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsBuffer(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def BufferBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Buffer
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class Buffer(object):
return self._tab.VectorLen(o)
return 0
+ # Buffer
+ def DataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def BufferStart(builder): builder.StartObject(1)
+def Start(builder):
+ return BufferStart(builder)
def BufferAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
+def AddData(builder, data):
+ return BufferAddData(builder, data)
def BufferStartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1)
+def StartDataVector(builder, numElems):
+ return BufferStartDataVector(builder, numElems)
def BufferEnd(builder): return builder.EndObject()
+def End(builder):
+ return BufferEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/BuiltinOperator.py b/ethosu/vela/tflite/BuiltinOperator.py
index 4004a3b0..0cce0792 100644
--- a/ethosu/vela/tflite/BuiltinOperator.py
+++ b/ethosu/vela/tflite/BuiltinOperator.py
@@ -157,4 +157,8 @@ class BuiltinOperator(object):
DYNAMIC_UPDATE_SLICE = 151
RELU_0_TO_1 = 152
UNSORTED_SEGMENT_PROD = 153
-
+ UNSORTED_SEGMENT_MAX = 154
+ UNSORTED_SEGMENT_SUM = 155
+ ATAN2 = 156
+ UNSORTED_SEGMENT_MIN = 157
+ SIGN = 158
diff --git a/ethosu/vela/tflite/BuiltinOptions.py b/ethosu/vela/tflite/BuiltinOptions.py
index 2ab36db6..06396b08 100644
--- a/ethosu/vela/tflite/BuiltinOptions.py
+++ b/ethosu/vela/tflite/BuiltinOptions.py
@@ -122,4 +122,8 @@ class BuiltinOptions(object):
GeluOptions = 116
DynamicUpdateSliceOptions = 117
UnsortedSegmentProdOptions = 118
-
+ UnsortedSegmentMaxOptions = 119
+ UnsortedSegmentMinOptions = 120
+ UnsortedSegmentSumOptions = 121
+ ATan2Options = 122
+ SignOptions = 123
diff --git a/ethosu/vela/tflite/CallOnceOptions.py b/ethosu/vela/tflite/CallOnceOptions.py
index 6a687913..557979de 100644
--- a/ethosu/vela/tflite/CallOnceOptions.py
+++ b/ethosu/vela/tflite/CallOnceOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CallOnceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCallOnceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CallOnceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCallOnceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CallOnceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CallOnceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class CallOnceOptions(object):
return 0
def CallOnceOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return CallOnceOptionsStart(builder)
def CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex): builder.PrependInt32Slot(0, initSubgraphIndex, 0)
+def AddInitSubgraphIndex(builder, initSubgraphIndex):
+ return CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex)
def CallOnceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CallOnceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CallOptions.py b/ethosu/vela/tflite/CallOptions.py
index 5ae2eeae..7fa3b555 100644
--- a/ethosu/vela/tflite/CallOptions.py
+++ b/ethosu/vela/tflite/CallOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CallOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCallOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CallOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCallOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CallOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CallOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class CallOptions(object):
return 0
def CallOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return CallOptionsStart(builder)
def CallOptionsAddSubgraph(builder, subgraph): builder.PrependUint32Slot(0, subgraph, 0)
+def AddSubgraph(builder, subgraph):
+ return CallOptionsAddSubgraph(builder, subgraph)
def CallOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CallOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CastOptions.py b/ethosu/vela/tflite/CastOptions.py
index 70ae2e37..e97ac8ef 100644
--- a/ethosu/vela/tflite/CastOptions.py
+++ b/ethosu/vela/tflite/CastOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CastOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCastOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CastOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCastOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CastOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CastOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class CastOptions(object):
return 0
def CastOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return CastOptionsStart(builder)
def CastOptionsAddInDataType(builder, inDataType): builder.PrependInt8Slot(0, inDataType, 0)
+def AddInDataType(builder, inDataType):
+ return CastOptionsAddInDataType(builder, inDataType)
def CastOptionsAddOutDataType(builder, outDataType): builder.PrependInt8Slot(1, outDataType, 0)
+def AddOutDataType(builder, outDataType):
+ return CastOptionsAddOutDataType(builder, outDataType)
def CastOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CastOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CombinerType.py b/ethosu/vela/tflite/CombinerType.py
index 17d91510..1e3a61f3 100644
--- a/ethosu/vela/tflite/CombinerType.py
+++ b/ethosu/vela/tflite/CombinerType.py
@@ -6,4 +6,3 @@ class CombinerType(object):
SUM = 0
MEAN = 1
SQRTN = 2
-
diff --git a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
index 9d26c510..e59bf9b6 100644
--- a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
+++ b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ConcatEmbeddingsOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsConcatEmbeddingsOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ConcatEmbeddingsOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsConcatEmbeddingsOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ConcatEmbeddingsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ConcatEmbeddingsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -48,6 +58,11 @@ class ConcatEmbeddingsOptions(object):
return 0
# ConcatEmbeddingsOptions
+ def NumColumnsPerChannelIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # ConcatEmbeddingsOptions
def EmbeddingDimPerChannel(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -69,10 +84,29 @@ class ConcatEmbeddingsOptions(object):
return self._tab.VectorLen(o)
return 0
+ # ConcatEmbeddingsOptions
+ def EmbeddingDimPerChannelIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
def ConcatEmbeddingsOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return ConcatEmbeddingsOptionsStart(builder)
def ConcatEmbeddingsOptionsAddNumChannels(builder, numChannels): builder.PrependInt32Slot(0, numChannels, 0)
+def AddNumChannels(builder, numChannels):
+ return ConcatEmbeddingsOptionsAddNumChannels(builder, numChannels)
def ConcatEmbeddingsOptionsAddNumColumnsPerChannel(builder, numColumnsPerChannel): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(numColumnsPerChannel), 0)
+def AddNumColumnsPerChannel(builder, numColumnsPerChannel):
+ return ConcatEmbeddingsOptionsAddNumColumnsPerChannel(builder, numColumnsPerChannel)
def ConcatEmbeddingsOptionsStartNumColumnsPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartNumColumnsPerChannelVector(builder, numElems):
+ return ConcatEmbeddingsOptionsStartNumColumnsPerChannelVector(builder, numElems)
def ConcatEmbeddingsOptionsAddEmbeddingDimPerChannel(builder, embeddingDimPerChannel): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(embeddingDimPerChannel), 0)
+def AddEmbeddingDimPerChannel(builder, embeddingDimPerChannel):
+ return ConcatEmbeddingsOptionsAddEmbeddingDimPerChannel(builder, embeddingDimPerChannel)
def ConcatEmbeddingsOptionsStartEmbeddingDimPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartEmbeddingDimPerChannelVector(builder, numElems):
+ return ConcatEmbeddingsOptionsStartEmbeddingDimPerChannelVector(builder, numElems)
def ConcatEmbeddingsOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ConcatEmbeddingsOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ConcatenationOptions.py b/ethosu/vela/tflite/ConcatenationOptions.py
index c8e0b6ab..5016a24e 100644
--- a/ethosu/vela/tflite/ConcatenationOptions.py
+++ b/ethosu/vela/tflite/ConcatenationOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ConcatenationOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsConcatenationOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ConcatenationOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsConcatenationOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ConcatenationOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ConcatenationOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class ConcatenationOptions(object):
return 0
def ConcatenationOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return ConcatenationOptionsStart(builder)
def ConcatenationOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0)
+def AddAxis(builder, axis):
+ return ConcatenationOptionsAddAxis(builder, axis)
def ConcatenationOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return ConcatenationOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def ConcatenationOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ConcatenationOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Conv2DOptions.py b/ethosu/vela/tflite/Conv2DOptions.py
index ef49f751..5928009f 100644
--- a/ethosu/vela/tflite/Conv2DOptions.py
+++ b/ethosu/vela/tflite/Conv2DOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Conv2DOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsConv2DOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Conv2DOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsConv2DOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Conv2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Conv2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -61,10 +71,26 @@ class Conv2DOptions(object):
return 1
def Conv2DOptionsStart(builder): builder.StartObject(6)
+def Start(builder):
+ return Conv2DOptionsStart(builder)
def Conv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def AddPadding(builder, padding):
+ return Conv2DOptionsAddPadding(builder, padding)
def Conv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
+def AddStrideW(builder, strideW):
+ return Conv2DOptionsAddStrideW(builder, strideW)
def Conv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
+def AddStrideH(builder, strideH):
+ return Conv2DOptionsAddStrideH(builder, strideH)
def Conv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(3, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return Conv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def Conv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(4, dilationWFactor, 1)
+def AddDilationWFactor(builder, dilationWFactor):
+ return Conv2DOptionsAddDilationWFactor(builder, dilationWFactor)
def Conv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(5, dilationHFactor, 1)
+def AddDilationHFactor(builder, dilationHFactor):
+ return Conv2DOptionsAddDilationHFactor(builder, dilationHFactor)
def Conv2DOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return Conv2DOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Conv3DOptions.py b/ethosu/vela/tflite/Conv3DOptions.py
index e8f4ab2d..a4e604d2 100644
--- a/ethosu/vela/tflite/Conv3DOptions.py
+++ b/ethosu/vela/tflite/Conv3DOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Conv3DOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsConv3DOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Conv3DOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsConv3DOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Conv3DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Conv3DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -75,12 +85,32 @@ class Conv3DOptions(object):
return 1
def Conv3DOptionsStart(builder): builder.StartObject(8)
+def Start(builder):
+ return Conv3DOptionsStart(builder)
def Conv3DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def AddPadding(builder, padding):
+ return Conv3DOptionsAddPadding(builder, padding)
def Conv3DOptionsAddStrideD(builder, strideD): builder.PrependInt32Slot(1, strideD, 0)
+def AddStrideD(builder, strideD):
+ return Conv3DOptionsAddStrideD(builder, strideD)
def Conv3DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(2, strideW, 0)
+def AddStrideW(builder, strideW):
+ return Conv3DOptionsAddStrideW(builder, strideW)
def Conv3DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(3, strideH, 0)
+def AddStrideH(builder, strideH):
+ return Conv3DOptionsAddStrideH(builder, strideH)
def Conv3DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return Conv3DOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def Conv3DOptionsAddDilationDFactor(builder, dilationDFactor): builder.PrependInt32Slot(5, dilationDFactor, 1)
+def AddDilationDFactor(builder, dilationDFactor):
+ return Conv3DOptionsAddDilationDFactor(builder, dilationDFactor)
def Conv3DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(6, dilationWFactor, 1)
+def AddDilationWFactor(builder, dilationWFactor):
+ return Conv3DOptionsAddDilationWFactor(builder, dilationWFactor)
def Conv3DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(7, dilationHFactor, 1)
+def AddDilationHFactor(builder, dilationHFactor):
+ return Conv3DOptionsAddDilationHFactor(builder, dilationHFactor)
def Conv3DOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return Conv3DOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CosOptions.py b/ethosu/vela/tflite/CosOptions.py
index 7fbf8487..e64d5bdd 100644
--- a/ethosu/vela/tflite/CosOptions.py
+++ b/ethosu/vela/tflite/CosOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CosOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCosOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CosOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCosOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CosOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CosOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def CosOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return CosOptionsStart(builder)
def CosOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CosOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CumsumOptions.py b/ethosu/vela/tflite/CumsumOptions.py
index 33e086ef..de83dfa3 100644
--- a/ethosu/vela/tflite/CumsumOptions.py
+++ b/ethosu/vela/tflite/CumsumOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CumsumOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCumsumOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CumsumOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCumsumOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CumsumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CumsumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class CumsumOptions(object):
return False
def CumsumOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return CumsumOptionsStart(builder)
def CumsumOptionsAddExclusive(builder, exclusive): builder.PrependBoolSlot(0, exclusive, 0)
+def AddExclusive(builder, exclusive):
+ return CumsumOptionsAddExclusive(builder, exclusive)
def CumsumOptionsAddReverse(builder, reverse): builder.PrependBoolSlot(1, reverse, 0)
+def AddReverse(builder, reverse):
+ return CumsumOptionsAddReverse(builder, reverse)
def CumsumOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CumsumOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/CustomOptionsFormat.py b/ethosu/vela/tflite/CustomOptionsFormat.py
index bef384cf..c2fc07c2 100644
--- a/ethosu/vela/tflite/CustomOptionsFormat.py
+++ b/ethosu/vela/tflite/CustomOptionsFormat.py
@@ -4,4 +4,3 @@
class CustomOptionsFormat(object):
FLEXBUFFERS = 0
-
diff --git a/ethosu/vela/tflite/CustomQuantization.py b/ethosu/vela/tflite/CustomQuantization.py
index 21ec0da4..35f0aeaf 100644
--- a/ethosu/vela/tflite/CustomQuantization.py
+++ b/ethosu/vela/tflite/CustomQuantization.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CustomQuantization(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCustomQuantization(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CustomQuantization()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsCustomQuantization(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def CustomQuantizationBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CustomQuantization
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class CustomQuantization(object):
return self._tab.VectorLen(o)
return 0
+ # CustomQuantization
+ def CustomIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def CustomQuantizationStart(builder): builder.StartObject(1)
+def Start(builder):
+ return CustomQuantizationStart(builder)
def CustomQuantizationAddCustom(builder, custom): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(custom), 0)
+def AddCustom(builder, custom):
+ return CustomQuantizationAddCustom(builder, custom)
def CustomQuantizationStartCustomVector(builder, numElems): return builder.StartVector(1, numElems, 1)
+def StartCustomVector(builder, numElems):
+ return CustomQuantizationStartCustomVector(builder, numElems)
def CustomQuantizationEnd(builder): return builder.EndObject()
+def End(builder):
+ return CustomQuantizationEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DensifyOptions.py b/ethosu/vela/tflite/DensifyOptions.py
index 12cbfb29..9b107176 100644
--- a/ethosu/vela/tflite/DensifyOptions.py
+++ b/ethosu/vela/tflite/DensifyOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DensifyOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDensifyOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DensifyOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDensifyOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DensifyOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DensifyOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def DensifyOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return DensifyOptionsStart(builder)
def DensifyOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DensifyOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DepthToSpaceOptions.py b/ethosu/vela/tflite/DepthToSpaceOptions.py
index 97b93aa7..779da401 100644
--- a/ethosu/vela/tflite/DepthToSpaceOptions.py
+++ b/ethosu/vela/tflite/DepthToSpaceOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DepthToSpaceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDepthToSpaceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DepthToSpaceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDepthToSpaceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DepthToSpaceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DepthToSpaceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class DepthToSpaceOptions(object):
return 0
def DepthToSpaceOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return DepthToSpaceOptionsStart(builder)
def DepthToSpaceOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0)
+def AddBlockSize(builder, blockSize):
+ return DepthToSpaceOptionsAddBlockSize(builder, blockSize)
def DepthToSpaceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DepthToSpaceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DepthwiseConv2DOptions.py b/ethosu/vela/tflite/DepthwiseConv2DOptions.py
index 9689383b..25ea10ed 100644
--- a/ethosu/vela/tflite/DepthwiseConv2DOptions.py
+++ b/ethosu/vela/tflite/DepthwiseConv2DOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DepthwiseConv2DOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDepthwiseConv2DOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DepthwiseConv2DOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDepthwiseConv2DOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DepthwiseConv2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DepthwiseConv2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -68,11 +78,29 @@ class DepthwiseConv2DOptions(object):
return 1
def DepthwiseConv2DOptionsStart(builder): builder.StartObject(7)
+def Start(builder):
+ return DepthwiseConv2DOptionsStart(builder)
def DepthwiseConv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def AddPadding(builder, padding):
+ return DepthwiseConv2DOptionsAddPadding(builder, padding)
def DepthwiseConv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
+def AddStrideW(builder, strideW):
+ return DepthwiseConv2DOptionsAddStrideW(builder, strideW)
def DepthwiseConv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
+def AddStrideH(builder, strideH):
+ return DepthwiseConv2DOptionsAddStrideH(builder, strideH)
def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0)
+def AddDepthMultiplier(builder, depthMultiplier):
+ return DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier)
def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1)
+def AddDilationWFactor(builder, dilationWFactor):
+ return DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor)
def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1)
+def AddDilationHFactor(builder, dilationHFactor):
+ return DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor)
def DepthwiseConv2DOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DepthwiseConv2DOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DequantizeOptions.py b/ethosu/vela/tflite/DequantizeOptions.py
index 5ef8b8dd..8361c375 100644
--- a/ethosu/vela/tflite/DequantizeOptions.py
+++ b/ethosu/vela/tflite/DequantizeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DequantizeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDequantizeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DequantizeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDequantizeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DequantizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DequantizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def DequantizeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return DequantizeOptionsStart(builder)
def DequantizeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DequantizeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DimensionMetadata.py b/ethosu/vela/tflite/DimensionMetadata.py
index c9fe7cd6..d329dd35 100644
--- a/ethosu/vela/tflite/DimensionMetadata.py
+++ b/ethosu/vela/tflite/DimensionMetadata.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DimensionMetadata(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDimensionMetadata(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DimensionMetadata()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDimensionMetadata(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DimensionMetadataBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DimensionMetadata
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -67,10 +77,26 @@ class DimensionMetadata(object):
return None
def DimensionMetadataStart(builder): builder.StartObject(6)
+def Start(builder):
+ return DimensionMetadataStart(builder)
def DimensionMetadataAddFormat(builder, format): builder.PrependInt8Slot(0, format, 0)
+def AddFormat(builder, format):
+ return DimensionMetadataAddFormat(builder, format)
def DimensionMetadataAddDenseSize(builder, denseSize): builder.PrependInt32Slot(1, denseSize, 0)
+def AddDenseSize(builder, denseSize):
+ return DimensionMetadataAddDenseSize(builder, denseSize)
def DimensionMetadataAddArraySegmentsType(builder, arraySegmentsType): builder.PrependUint8Slot(2, arraySegmentsType, 0)
+def AddArraySegmentsType(builder, arraySegmentsType):
+ return DimensionMetadataAddArraySegmentsType(builder, arraySegmentsType)
def DimensionMetadataAddArraySegments(builder, arraySegments): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(arraySegments), 0)
+def AddArraySegments(builder, arraySegments):
+ return DimensionMetadataAddArraySegments(builder, arraySegments)
def DimensionMetadataAddArrayIndicesType(builder, arrayIndicesType): builder.PrependUint8Slot(4, arrayIndicesType, 0)
+def AddArrayIndicesType(builder, arrayIndicesType):
+ return DimensionMetadataAddArrayIndicesType(builder, arrayIndicesType)
def DimensionMetadataAddArrayIndices(builder, arrayIndices): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(arrayIndices), 0)
+def AddArrayIndices(builder, arrayIndices):
+ return DimensionMetadataAddArrayIndices(builder, arrayIndices)
def DimensionMetadataEnd(builder): return builder.EndObject()
+def End(builder):
+ return DimensionMetadataEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DimensionType.py b/ethosu/vela/tflite/DimensionType.py
index a27d016f..310d8eed 100644
--- a/ethosu/vela/tflite/DimensionType.py
+++ b/ethosu/vela/tflite/DimensionType.py
@@ -5,4 +5,3 @@
class DimensionType(object):
DENSE = 0
SPARSE_CSR = 1
-
diff --git a/ethosu/vela/tflite/DivOptions.py b/ethosu/vela/tflite/DivOptions.py
index 905a3be0..e6b4e240 100644
--- a/ethosu/vela/tflite/DivOptions.py
+++ b/ethosu/vela/tflite/DivOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DivOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDivOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DivOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDivOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DivOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DivOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class DivOptions(object):
return 0
def DivOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return DivOptionsStart(builder)
def DivOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return DivOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def DivOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DivOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py
index 80d55398..e9316655 100644
--- a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py
+++ b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class DynamicUpdateSliceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsDynamicUpdateSliceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = DynamicUpdateSliceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsDynamicUpdateSliceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def DynamicUpdateSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DynamicUpdateSliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def DynamicUpdateSliceOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return DynamicUpdateSliceOptionsStart(builder)
def DynamicUpdateSliceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return DynamicUpdateSliceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
index 7d9c1442..6bc0539a 100644
--- a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
+++ b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class EmbeddingLookupSparseOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsEmbeddingLookupSparseOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EmbeddingLookupSparseOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsEmbeddingLookupSparseOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def EmbeddingLookupSparseOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# EmbeddingLookupSparseOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class EmbeddingLookupSparseOptions(object):
return 0
def EmbeddingLookupSparseOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return EmbeddingLookupSparseOptionsStart(builder)
def EmbeddingLookupSparseOptionsAddCombiner(builder, combiner): builder.PrependInt8Slot(0, combiner, 0)
+def AddCombiner(builder, combiner):
+ return EmbeddingLookupSparseOptionsAddCombiner(builder, combiner)
def EmbeddingLookupSparseOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return EmbeddingLookupSparseOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/EqualOptions.py b/ethosu/vela/tflite/EqualOptions.py
index f787ef85..99c967d7 100644
--- a/ethosu/vela/tflite/EqualOptions.py
+++ b/ethosu/vela/tflite/EqualOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class EqualOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsEqualOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = EqualOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsEqualOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def EqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# EqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def EqualOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return EqualOptionsStart(builder)
def EqualOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return EqualOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ExpOptions.py b/ethosu/vela/tflite/ExpOptions.py
index eac1456e..557c45c1 100644
--- a/ethosu/vela/tflite/ExpOptions.py
+++ b/ethosu/vela/tflite/ExpOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ExpOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsExpOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ExpOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsExpOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ExpOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ExpOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ExpOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ExpOptionsStart(builder)
def ExpOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ExpOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ExpandDimsOptions.py b/ethosu/vela/tflite/ExpandDimsOptions.py
index 69d63665..dcfbd191 100644
--- a/ethosu/vela/tflite/ExpandDimsOptions.py
+++ b/ethosu/vela/tflite/ExpandDimsOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ExpandDimsOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsExpandDimsOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ExpandDimsOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsExpandDimsOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ExpandDimsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ExpandDimsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ExpandDimsOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ExpandDimsOptionsStart(builder)
def ExpandDimsOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ExpandDimsOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FakeQuantOptions.py b/ethosu/vela/tflite/FakeQuantOptions.py
index 46c371c3..e8d951d5 100644
--- a/ethosu/vela/tflite/FakeQuantOptions.py
+++ b/ethosu/vela/tflite/FakeQuantOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class FakeQuantOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsFakeQuantOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FakeQuantOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsFakeQuantOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def FakeQuantOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FakeQuantOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -47,8 +57,20 @@ class FakeQuantOptions(object):
return False
def FakeQuantOptionsStart(builder): builder.StartObject(4)
+def Start(builder):
+ return FakeQuantOptionsStart(builder)
def FakeQuantOptionsAddMin(builder, min): builder.PrependFloat32Slot(0, min, 0.0)
+def AddMin(builder, min):
+ return FakeQuantOptionsAddMin(builder, min)
def FakeQuantOptionsAddMax(builder, max): builder.PrependFloat32Slot(1, max, 0.0)
+def AddMax(builder, max):
+ return FakeQuantOptionsAddMax(builder, max)
def FakeQuantOptionsAddNumBits(builder, numBits): builder.PrependInt32Slot(2, numBits, 0)
+def AddNumBits(builder, numBits):
+ return FakeQuantOptionsAddNumBits(builder, numBits)
def FakeQuantOptionsAddNarrowRange(builder, narrowRange): builder.PrependBoolSlot(3, narrowRange, 0)
+def AddNarrowRange(builder, narrowRange):
+ return FakeQuantOptionsAddNarrowRange(builder, narrowRange)
def FakeQuantOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return FakeQuantOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FillOptions.py b/ethosu/vela/tflite/FillOptions.py
index 5a1e651a..175c93c0 100644
--- a/ethosu/vela/tflite/FillOptions.py
+++ b/ethosu/vela/tflite/FillOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class FillOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsFillOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FillOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsFillOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def FillOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FillOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def FillOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return FillOptionsStart(builder)
def FillOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return FillOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FloorDivOptions.py b/ethosu/vela/tflite/FloorDivOptions.py
index 64b474fb..649eb730 100644
--- a/ethosu/vela/tflite/FloorDivOptions.py
+++ b/ethosu/vela/tflite/FloorDivOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class FloorDivOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsFloorDivOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FloorDivOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsFloorDivOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def FloorDivOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FloorDivOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def FloorDivOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return FloorDivOptionsStart(builder)
def FloorDivOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return FloorDivOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FloorModOptions.py b/ethosu/vela/tflite/FloorModOptions.py
index 37c8e5a5..6cfea5d0 100644
--- a/ethosu/vela/tflite/FloorModOptions.py
+++ b/ethosu/vela/tflite/FloorModOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class FloorModOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsFloorModOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FloorModOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsFloorModOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def FloorModOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FloorModOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def FloorModOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return FloorModOptionsStart(builder)
def FloorModOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return FloorModOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FullyConnectedOptions.py b/ethosu/vela/tflite/FullyConnectedOptions.py
index 5475e3d9..67ca53c4 100644
--- a/ethosu/vela/tflite/FullyConnectedOptions.py
+++ b/ethosu/vela/tflite/FullyConnectedOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class FullyConnectedOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsFullyConnectedOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = FullyConnectedOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsFullyConnectedOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def FullyConnectedOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FullyConnectedOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -47,8 +57,20 @@ class FullyConnectedOptions(object):
return False
def FullyConnectedOptionsStart(builder): builder.StartObject(4)
+def Start(builder):
+ return FullyConnectedOptionsStart(builder)
def FullyConnectedOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return FullyConnectedOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def FullyConnectedOptionsAddWeightsFormat(builder, weightsFormat): builder.PrependInt8Slot(1, weightsFormat, 0)
+def AddWeightsFormat(builder, weightsFormat):
+ return FullyConnectedOptionsAddWeightsFormat(builder, weightsFormat)
def FullyConnectedOptionsAddKeepNumDims(builder, keepNumDims): builder.PrependBoolSlot(2, keepNumDims, 0)
+def AddKeepNumDims(builder, keepNumDims):
+ return FullyConnectedOptionsAddKeepNumDims(builder, keepNumDims)
def FullyConnectedOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return FullyConnectedOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def FullyConnectedOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return FullyConnectedOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py b/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
index 6d81eca1..d9a53887 100644
--- a/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
+++ b/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
@@ -5,4 +5,3 @@
class FullyConnectedOptionsWeightsFormat(object):
DEFAULT = 0
SHUFFLED4x16INT8 = 1
-
diff --git a/ethosu/vela/tflite/GatherNdOptions.py b/ethosu/vela/tflite/GatherNdOptions.py
index f515eb5c..56967b04 100644
--- a/ethosu/vela/tflite/GatherNdOptions.py
+++ b/ethosu/vela/tflite/GatherNdOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class GatherNdOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsGatherNdOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GatherNdOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsGatherNdOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def GatherNdOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GatherNdOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def GatherNdOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return GatherNdOptionsStart(builder)
def GatherNdOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return GatherNdOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/GatherOptions.py b/ethosu/vela/tflite/GatherOptions.py
index fd933219..9d35523b 100644
--- a/ethosu/vela/tflite/GatherOptions.py
+++ b/ethosu/vela/tflite/GatherOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class GatherOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsGatherOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GatherOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsGatherOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def GatherOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GatherOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class GatherOptions(object):
return 0
def GatherOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return GatherOptionsStart(builder)
def GatherOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0)
+def AddAxis(builder, axis):
+ return GatherOptionsAddAxis(builder, axis)
def GatherOptionsAddBatchDims(builder, batchDims): builder.PrependInt32Slot(1, batchDims, 0)
+def AddBatchDims(builder, batchDims):
+ return GatherOptionsAddBatchDims(builder, batchDims)
def GatherOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return GatherOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/GeluOptions.py b/ethosu/vela/tflite/GeluOptions.py
index 3705084d..b9e63866 100644
--- a/ethosu/vela/tflite/GeluOptions.py
+++ b/ethosu/vela/tflite/GeluOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class GeluOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsGeluOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GeluOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsGeluOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def GeluOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GeluOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class GeluOptions(object):
return False
def GeluOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return GeluOptionsStart(builder)
def GeluOptionsAddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0)
+def AddApproximate(builder, approximate):
+ return GeluOptionsAddApproximate(builder, approximate)
def GeluOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return GeluOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/GreaterEqualOptions.py b/ethosu/vela/tflite/GreaterEqualOptions.py
index a29e200a..53018210 100644
--- a/ethosu/vela/tflite/GreaterEqualOptions.py
+++ b/ethosu/vela/tflite/GreaterEqualOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class GreaterEqualOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsGreaterEqualOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GreaterEqualOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsGreaterEqualOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def GreaterEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GreaterEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def GreaterEqualOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return GreaterEqualOptionsStart(builder)
def GreaterEqualOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return GreaterEqualOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/GreaterOptions.py b/ethosu/vela/tflite/GreaterOptions.py
index 59d63501..3d4c0c93 100644
--- a/ethosu/vela/tflite/GreaterOptions.py
+++ b/ethosu/vela/tflite/GreaterOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class GreaterOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsGreaterOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = GreaterOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsGreaterOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def GreaterOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GreaterOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def GreaterOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return GreaterOptionsStart(builder)
def GreaterOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return GreaterOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/HardSwishOptions.py b/ethosu/vela/tflite/HardSwishOptions.py
index 4f6a5200..c0c4054f 100644
--- a/ethosu/vela/tflite/HardSwishOptions.py
+++ b/ethosu/vela/tflite/HardSwishOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class HardSwishOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsHardSwishOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HardSwishOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsHardSwishOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def HardSwishOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HardSwishOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def HardSwishOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return HardSwishOptionsStart(builder)
def HardSwishOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return HardSwishOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/HashtableFindOptions.py b/ethosu/vela/tflite/HashtableFindOptions.py
index fa9d31d1..9078d60b 100644
--- a/ethosu/vela/tflite/HashtableFindOptions.py
+++ b/ethosu/vela/tflite/HashtableFindOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class HashtableFindOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsHashtableFindOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HashtableFindOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsHashtableFindOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def HashtableFindOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HashtableFindOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def HashtableFindOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return HashtableFindOptionsStart(builder)
def HashtableFindOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return HashtableFindOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/HashtableImportOptions.py b/ethosu/vela/tflite/HashtableImportOptions.py
index cd72df49..2b45955d 100644
--- a/ethosu/vela/tflite/HashtableImportOptions.py
+++ b/ethosu/vela/tflite/HashtableImportOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class HashtableImportOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsHashtableImportOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HashtableImportOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsHashtableImportOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def HashtableImportOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HashtableImportOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def HashtableImportOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return HashtableImportOptionsStart(builder)
def HashtableImportOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return HashtableImportOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/HashtableOptions.py b/ethosu/vela/tflite/HashtableOptions.py
index acdd9daa..82ea2a79 100644
--- a/ethosu/vela/tflite/HashtableOptions.py
+++ b/ethosu/vela/tflite/HashtableOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class HashtableOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsHashtableOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HashtableOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsHashtableOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def HashtableOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HashtableOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class HashtableOptions(object):
return 0
def HashtableOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return HashtableOptionsStart(builder)
def HashtableOptionsAddTableId(builder, tableId): builder.PrependInt32Slot(0, tableId, 0)
+def AddTableId(builder, tableId):
+ return HashtableOptionsAddTableId(builder, tableId)
def HashtableOptionsAddKeyDtype(builder, keyDtype): builder.PrependInt8Slot(1, keyDtype, 0)
+def AddKeyDtype(builder, keyDtype):
+ return HashtableOptionsAddKeyDtype(builder, keyDtype)
def HashtableOptionsAddValueDtype(builder, valueDtype): builder.PrependInt8Slot(2, valueDtype, 0)
+def AddValueDtype(builder, valueDtype):
+ return HashtableOptionsAddValueDtype(builder, valueDtype)
def HashtableOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return HashtableOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/HashtableSizeOptions.py b/ethosu/vela/tflite/HashtableSizeOptions.py
index b69650d1..26c5ceb2 100644
--- a/ethosu/vela/tflite/HashtableSizeOptions.py
+++ b/ethosu/vela/tflite/HashtableSizeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class HashtableSizeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsHashtableSizeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HashtableSizeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsHashtableSizeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def HashtableSizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HashtableSizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def HashtableSizeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return HashtableSizeOptionsStart(builder)
def HashtableSizeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return HashtableSizeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/IfOptions.py b/ethosu/vela/tflite/IfOptions.py
index 13f4e697..230339bd 100644
--- a/ethosu/vela/tflite/IfOptions.py
+++ b/ethosu/vela/tflite/IfOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class IfOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsIfOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = IfOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsIfOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def IfOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# IfOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class IfOptions(object):
return 0
def IfOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return IfOptionsStart(builder)
def IfOptionsAddThenSubgraphIndex(builder, thenSubgraphIndex): builder.PrependInt32Slot(0, thenSubgraphIndex, 0)
+def AddThenSubgraphIndex(builder, thenSubgraphIndex):
+ return IfOptionsAddThenSubgraphIndex(builder, thenSubgraphIndex)
def IfOptionsAddElseSubgraphIndex(builder, elseSubgraphIndex): builder.PrependInt32Slot(1, elseSubgraphIndex, 0)
+def AddElseSubgraphIndex(builder, elseSubgraphIndex):
+ return IfOptionsAddElseSubgraphIndex(builder, elseSubgraphIndex)
def IfOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return IfOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Int32Vector.py b/ethosu/vela/tflite/Int32Vector.py
index e70851b2..6c2a614c 100644
--- a/ethosu/vela/tflite/Int32Vector.py
+++ b/ethosu/vela/tflite/Int32Vector.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Int32Vector(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsInt32Vector(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Int32Vector()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsInt32Vector(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Int32VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Int32Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class Int32Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Int32Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Int32VectorStart(builder): builder.StartObject(1)
+def Start(builder):
+ return Int32VectorStart(builder)
def Int32VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
+def AddValues(builder, values):
+ return Int32VectorAddValues(builder, values)
def Int32VectorStartValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartValuesVector(builder, numElems):
+ return Int32VectorStartValuesVector(builder, numElems)
def Int32VectorEnd(builder): return builder.EndObject()
+def End(builder):
+ return Int32VectorEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/L2NormOptions.py b/ethosu/vela/tflite/L2NormOptions.py
index 38bdf573..c8746a77 100644
--- a/ethosu/vela/tflite/L2NormOptions.py
+++ b/ethosu/vela/tflite/L2NormOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class L2NormOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsL2NormOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = L2NormOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsL2NormOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def L2NormOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# L2NormOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class L2NormOptions(object):
return 0
def L2NormOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return L2NormOptionsStart(builder)
def L2NormOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return L2NormOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def L2NormOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return L2NormOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LSHProjectionOptions.py b/ethosu/vela/tflite/LSHProjectionOptions.py
index ad550be2..033f8c8e 100644
--- a/ethosu/vela/tflite/LSHProjectionOptions.py
+++ b/ethosu/vela/tflite/LSHProjectionOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LSHProjectionOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLSHProjectionOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LSHProjectionOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLSHProjectionOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LSHProjectionOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LSHProjectionOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class LSHProjectionOptions(object):
return 0
def LSHProjectionOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return LSHProjectionOptionsStart(builder)
def LSHProjectionOptionsAddType(builder, type): builder.PrependInt8Slot(0, type, 0)
+def AddType(builder, type):
+ return LSHProjectionOptionsAddType(builder, type)
def LSHProjectionOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LSHProjectionOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LSHProjectionType.py b/ethosu/vela/tflite/LSHProjectionType.py
index d6a136e8..a7d6a313 100644
--- a/ethosu/vela/tflite/LSHProjectionType.py
+++ b/ethosu/vela/tflite/LSHProjectionType.py
@@ -6,4 +6,3 @@ class LSHProjectionType(object):
UNKNOWN = 0
SPARSE = 1
DENSE = 2
-
diff --git a/ethosu/vela/tflite/LSTMKernelType.py b/ethosu/vela/tflite/LSTMKernelType.py
index 1ca4df0a..fd657998 100644
--- a/ethosu/vela/tflite/LSTMKernelType.py
+++ b/ethosu/vela/tflite/LSTMKernelType.py
@@ -5,4 +5,3 @@
class LSTMKernelType(object):
FULL = 0
BASIC = 1
-
diff --git a/ethosu/vela/tflite/LSTMOptions.py b/ethosu/vela/tflite/LSTMOptions.py
index 2f519bc2..acaedc74 100644
--- a/ethosu/vela/tflite/LSTMOptions.py
+++ b/ethosu/vela/tflite/LSTMOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LSTMOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLSTMOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LSTMOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLSTMOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -54,9 +64,23 @@ class LSTMOptions(object):
return False
def LSTMOptionsStart(builder): builder.StartObject(5)
+def Start(builder):
+ return LSTMOptionsStart(builder)
def LSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return LSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def LSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
+def AddCellClip(builder, cellClip):
+ return LSTMOptionsAddCellClip(builder, cellClip)
def LSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
+def AddProjClip(builder, projClip):
+ return LSTMOptionsAddProjClip(builder, projClip)
def LSTMOptionsAddKernelType(builder, kernelType): builder.PrependInt8Slot(3, kernelType, 0)
+def AddKernelType(builder, kernelType):
+ return LSTMOptionsAddKernelType(builder, kernelType)
def LSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return LSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def LSTMOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LSTMOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LeakyReluOptions.py b/ethosu/vela/tflite/LeakyReluOptions.py
index b61b21d5..8550a0f9 100644
--- a/ethosu/vela/tflite/LeakyReluOptions.py
+++ b/ethosu/vela/tflite/LeakyReluOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LeakyReluOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLeakyReluOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LeakyReluOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLeakyReluOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LeakyReluOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LeakyReluOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class LeakyReluOptions(object):
return 0.0
def LeakyReluOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return LeakyReluOptionsStart(builder)
def LeakyReluOptionsAddAlpha(builder, alpha): builder.PrependFloat32Slot(0, alpha, 0.0)
+def AddAlpha(builder, alpha):
+ return LeakyReluOptionsAddAlpha(builder, alpha)
def LeakyReluOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LeakyReluOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LessEqualOptions.py b/ethosu/vela/tflite/LessEqualOptions.py
index d49b7289..a6c4a865 100644
--- a/ethosu/vela/tflite/LessEqualOptions.py
+++ b/ethosu/vela/tflite/LessEqualOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LessEqualOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLessEqualOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LessEqualOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLessEqualOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LessEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LessEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LessEqualOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LessEqualOptionsStart(builder)
def LessEqualOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LessEqualOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LessOptions.py b/ethosu/vela/tflite/LessOptions.py
index 469cb0b0..765a245d 100644
--- a/ethosu/vela/tflite/LessOptions.py
+++ b/ethosu/vela/tflite/LessOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LessOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLessOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LessOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLessOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LessOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LessOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LessOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LessOptionsStart(builder)
def LessOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LessOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
index db875603..834aed4b 100644
--- a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
+++ b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LocalResponseNormalizationOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLocalResponseNormalizationOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LocalResponseNormalizationOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLocalResponseNormalizationOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LocalResponseNormalizationOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LocalResponseNormalizationOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -47,8 +57,20 @@ class LocalResponseNormalizationOptions(object):
return 0.0
def LocalResponseNormalizationOptionsStart(builder): builder.StartObject(4)
+def Start(builder):
+ return LocalResponseNormalizationOptionsStart(builder)
def LocalResponseNormalizationOptionsAddRadius(builder, radius): builder.PrependInt32Slot(0, radius, 0)
+def AddRadius(builder, radius):
+ return LocalResponseNormalizationOptionsAddRadius(builder, radius)
def LocalResponseNormalizationOptionsAddBias(builder, bias): builder.PrependFloat32Slot(1, bias, 0.0)
+def AddBias(builder, bias):
+ return LocalResponseNormalizationOptionsAddBias(builder, bias)
def LocalResponseNormalizationOptionsAddAlpha(builder, alpha): builder.PrependFloat32Slot(2, alpha, 0.0)
+def AddAlpha(builder, alpha):
+ return LocalResponseNormalizationOptionsAddAlpha(builder, alpha)
def LocalResponseNormalizationOptionsAddBeta(builder, beta): builder.PrependFloat32Slot(3, beta, 0.0)
+def AddBeta(builder, beta):
+ return LocalResponseNormalizationOptionsAddBeta(builder, beta)
def LocalResponseNormalizationOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LocalResponseNormalizationOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LogSoftmaxOptions.py b/ethosu/vela/tflite/LogSoftmaxOptions.py
index 47893855..a5c81056 100644
--- a/ethosu/vela/tflite/LogSoftmaxOptions.py
+++ b/ethosu/vela/tflite/LogSoftmaxOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LogSoftmaxOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLogSoftmaxOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LogSoftmaxOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLogSoftmaxOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LogSoftmaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogSoftmaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LogSoftmaxOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LogSoftmaxOptionsStart(builder)
def LogSoftmaxOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LogSoftmaxOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LogicalAndOptions.py b/ethosu/vela/tflite/LogicalAndOptions.py
index cee1cdb4..a786dbe7 100644
--- a/ethosu/vela/tflite/LogicalAndOptions.py
+++ b/ethosu/vela/tflite/LogicalAndOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LogicalAndOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLogicalAndOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LogicalAndOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLogicalAndOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LogicalAndOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalAndOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LogicalAndOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LogicalAndOptionsStart(builder)
def LogicalAndOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LogicalAndOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LogicalNotOptions.py b/ethosu/vela/tflite/LogicalNotOptions.py
index 9971450c..4c29fdf3 100644
--- a/ethosu/vela/tflite/LogicalNotOptions.py
+++ b/ethosu/vela/tflite/LogicalNotOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LogicalNotOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLogicalNotOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LogicalNotOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLogicalNotOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LogicalNotOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalNotOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LogicalNotOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LogicalNotOptionsStart(builder)
def LogicalNotOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LogicalNotOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/LogicalOrOptions.py b/ethosu/vela/tflite/LogicalOrOptions.py
index e94a5dec..b058a3b9 100644
--- a/ethosu/vela/tflite/LogicalOrOptions.py
+++ b/ethosu/vela/tflite/LogicalOrOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class LogicalOrOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsLogicalOrOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = LogicalOrOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsLogicalOrOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def LogicalOrOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalOrOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def LogicalOrOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return LogicalOrOptionsStart(builder)
def LogicalOrOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return LogicalOrOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/MatrixDiagOptions.py b/ethosu/vela/tflite/MatrixDiagOptions.py
index 0f64e657..0f2d3199 100644
--- a/ethosu/vela/tflite/MatrixDiagOptions.py
+++ b/ethosu/vela/tflite/MatrixDiagOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class MatrixDiagOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMatrixDiagOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MatrixDiagOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMatrixDiagOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MatrixDiagOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MatrixDiagOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def MatrixDiagOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return MatrixDiagOptionsStart(builder)
def MatrixDiagOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return MatrixDiagOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/MatrixSetDiagOptions.py b/ethosu/vela/tflite/MatrixSetDiagOptions.py
index 14178cf8..37f496a1 100644
--- a/ethosu/vela/tflite/MatrixSetDiagOptions.py
+++ b/ethosu/vela/tflite/MatrixSetDiagOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class MatrixSetDiagOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMatrixSetDiagOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MatrixSetDiagOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMatrixSetDiagOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MatrixSetDiagOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MatrixSetDiagOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def MatrixSetDiagOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return MatrixSetDiagOptionsStart(builder)
def MatrixSetDiagOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return MatrixSetDiagOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/MaximumMinimumOptions.py b/ethosu/vela/tflite/MaximumMinimumOptions.py
index f0806e2d..e961e71d 100644
--- a/ethosu/vela/tflite/MaximumMinimumOptions.py
+++ b/ethosu/vela/tflite/MaximumMinimumOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class MaximumMinimumOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMaximumMinimumOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MaximumMinimumOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMaximumMinimumOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MaximumMinimumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MaximumMinimumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def MaximumMinimumOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return MaximumMinimumOptionsStart(builder)
def MaximumMinimumOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return MaximumMinimumOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Metadata.py b/ethosu/vela/tflite/Metadata.py
index 273e51ee..0ff8bf46 100644
--- a/ethosu/vela/tflite/Metadata.py
+++ b/ethosu/vela/tflite/Metadata.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Metadata(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMetadata(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Metadata()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMetadata(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MetadataBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Metadata
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class Metadata(object):
return 0
def MetadataStart(builder): builder.StartObject(2)
+def Start(builder):
+ return MetadataStart(builder)
def MetadataAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+def AddName(builder, name):
+ return MetadataAddName(builder, name)
def MetadataAddBuffer(builder, buffer): builder.PrependUint32Slot(1, buffer, 0)
+def AddBuffer(builder, buffer):
+ return MetadataAddBuffer(builder, buffer)
def MetadataEnd(builder): return builder.EndObject()
+def End(builder):
+ return MetadataEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/MirrorPadMode.py b/ethosu/vela/tflite/MirrorPadMode.py
index ce7579d2..8fb6396f 100644
--- a/ethosu/vela/tflite/MirrorPadMode.py
+++ b/ethosu/vela/tflite/MirrorPadMode.py
@@ -5,4 +5,3 @@
class MirrorPadMode(object):
REFLECT = 0
SYMMETRIC = 1
-
diff --git a/ethosu/vela/tflite/MirrorPadOptions.py b/ethosu/vela/tflite/MirrorPadOptions.py
index 254ae217..b440117a 100644
--- a/ethosu/vela/tflite/MirrorPadOptions.py
+++ b/ethosu/vela/tflite/MirrorPadOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class MirrorPadOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMirrorPadOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MirrorPadOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMirrorPadOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MirrorPadOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MirrorPadOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class MirrorPadOptions(object):
return 0
def MirrorPadOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return MirrorPadOptionsStart(builder)
def MirrorPadOptionsAddMode(builder, mode): builder.PrependInt8Slot(0, mode, 0)
+def AddMode(builder, mode):
+ return MirrorPadOptionsAddMode(builder, mode)
def MirrorPadOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return MirrorPadOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Model.py b/ethosu/vela/tflite/Model.py
index 52aac021..e81aa8fe 100644
--- a/ethosu/vela/tflite/Model.py
+++ b/ethosu/vela/tflite/Model.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Model(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsModel(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Model()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsModel(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ModelBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Model
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -46,6 +56,11 @@ class Model(object):
return 0
# Model
+ def OperatorCodesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # Model
def Subgraphs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -66,6 +81,11 @@ class Model(object):
return 0
# Model
+ def SubgraphsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # Model
def Description(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -93,6 +113,11 @@ class Model(object):
return 0
# Model
+ def BuffersIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+ return o == 0
+
+ # Model
def MetadataBuffer(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
@@ -115,6 +140,11 @@ class Model(object):
return 0
# Model
+ def MetadataBufferIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+ return o == 0
+
+ # Model
def Metadata(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
@@ -135,6 +165,11 @@ class Model(object):
return 0
# Model
+ def MetadataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
+ return o == 0
+
+ # Model
def SignatureDefs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
@@ -154,19 +189,56 @@ class Model(object):
return self._tab.VectorLen(o)
return 0
+ # Model
+ def SignatureDefsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
def ModelStart(builder): builder.StartObject(8)
+def Start(builder):
+ return ModelStart(builder)
def ModelAddVersion(builder, version): builder.PrependUint32Slot(0, version, 0)
+def AddVersion(builder, version):
+ return ModelAddVersion(builder, version)
def ModelAddOperatorCodes(builder, operatorCodes): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(operatorCodes), 0)
+def AddOperatorCodes(builder, operatorCodes):
+ return ModelAddOperatorCodes(builder, operatorCodes)
def ModelStartOperatorCodesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartOperatorCodesVector(builder, numElems):
+ return ModelStartOperatorCodesVector(builder, numElems)
def ModelAddSubgraphs(builder, subgraphs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(subgraphs), 0)
+def AddSubgraphs(builder, subgraphs):
+ return ModelAddSubgraphs(builder, subgraphs)
def ModelStartSubgraphsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartSubgraphsVector(builder, numElems):
+ return ModelStartSubgraphsVector(builder, numElems)
def ModelAddDescription(builder, description): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(description), 0)
+def AddDescription(builder, description):
+ return ModelAddDescription(builder, description)
def ModelAddBuffers(builder, buffers): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(buffers), 0)
+def AddBuffers(builder, buffers):
+ return ModelAddBuffers(builder, buffers)
def ModelStartBuffersVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartBuffersVector(builder, numElems):
+ return ModelStartBuffersVector(builder, numElems)
def ModelAddMetadataBuffer(builder, metadataBuffer): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(metadataBuffer), 0)
+def AddMetadataBuffer(builder, metadataBuffer):
+ return ModelAddMetadataBuffer(builder, metadataBuffer)
def ModelStartMetadataBufferVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartMetadataBufferVector(builder, numElems):
+ return ModelStartMetadataBufferVector(builder, numElems)
def ModelAddMetadata(builder, metadata): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(metadata), 0)
+def AddMetadata(builder, metadata):
+ return ModelAddMetadata(builder, metadata)
def ModelStartMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartMetadataVector(builder, numElems):
+ return ModelStartMetadataVector(builder, numElems)
def ModelAddSignatureDefs(builder, signatureDefs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(signatureDefs), 0)
+def AddSignatureDefs(builder, signatureDefs):
+ return ModelAddSignatureDefs(builder, signatureDefs)
def ModelStartSignatureDefsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartSignatureDefsVector(builder, numElems):
+ return ModelStartSignatureDefsVector(builder, numElems)
def ModelEnd(builder): return builder.EndObject()
+def End(builder):
+ return ModelEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/MulOptions.py b/ethosu/vela/tflite/MulOptions.py
index 55b9506f..70fb6872 100644
--- a/ethosu/vela/tflite/MulOptions.py
+++ b/ethosu/vela/tflite/MulOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class MulOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsMulOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = MulOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsMulOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def MulOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MulOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class MulOptions(object):
return 0
def MulOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return MulOptionsStart(builder)
def MulOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return MulOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def MulOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return MulOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/NegOptions.py b/ethosu/vela/tflite/NegOptions.py
index 05d55c26..d005cab5 100644
--- a/ethosu/vela/tflite/NegOptions.py
+++ b/ethosu/vela/tflite/NegOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class NegOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsNegOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = NegOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsNegOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def NegOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NegOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def NegOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return NegOptionsStart(builder)
def NegOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return NegOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
index 6ad10a2e..b25913a8 100644
--- a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
+++ b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class NonMaxSuppressionV4Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsNonMaxSuppressionV4Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = NonMaxSuppressionV4Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsNonMaxSuppressionV4Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def NonMaxSuppressionV4OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NonMaxSuppressionV4Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def NonMaxSuppressionV4OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return NonMaxSuppressionV4OptionsStart(builder)
def NonMaxSuppressionV4OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return NonMaxSuppressionV4OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
index 99cbdbbf..b51bd97d 100644
--- a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
+++ b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class NonMaxSuppressionV5Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsNonMaxSuppressionV5Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = NonMaxSuppressionV5Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsNonMaxSuppressionV5Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def NonMaxSuppressionV5OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NonMaxSuppressionV5Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def NonMaxSuppressionV5OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return NonMaxSuppressionV5OptionsStart(builder)
def NonMaxSuppressionV5OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return NonMaxSuppressionV5OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/NotEqualOptions.py b/ethosu/vela/tflite/NotEqualOptions.py
index 4c511e93..a1c6dba1 100644
--- a/ethosu/vela/tflite/NotEqualOptions.py
+++ b/ethosu/vela/tflite/NotEqualOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class NotEqualOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsNotEqualOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = NotEqualOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsNotEqualOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def NotEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NotEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def NotEqualOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return NotEqualOptionsStart(builder)
def NotEqualOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return NotEqualOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/OneHotOptions.py b/ethosu/vela/tflite/OneHotOptions.py
index 793a3e75..873e01ec 100644
--- a/ethosu/vela/tflite/OneHotOptions.py
+++ b/ethosu/vela/tflite/OneHotOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class OneHotOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsOneHotOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = OneHotOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsOneHotOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def OneHotOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# OneHotOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class OneHotOptions(object):
return 0
def OneHotOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return OneHotOptionsStart(builder)
def OneHotOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0)
+def AddAxis(builder, axis):
+ return OneHotOptionsAddAxis(builder, axis)
def OneHotOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return OneHotOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py
index cbae3dab..2af3f8ce 100644
--- a/ethosu/vela/tflite/Operator.py
+++ b/ethosu/vela/tflite/Operator.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Operator(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsOperator(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Operator()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsOperator(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def OperatorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Operator
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -48,6 +58,11 @@ class Operator(object):
return 0
# Operator
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # Operator
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -70,6 +85,11 @@ class Operator(object):
return 0
# Operator
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # Operator
def BuiltinOptionsType(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -109,6 +129,11 @@ class Operator(object):
return 0
# Operator
+ def CustomOptionsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+ return o == 0
+
+ # Operator
def CustomOptionsFormat(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
@@ -138,6 +163,11 @@ class Operator(object):
return 0
# Operator
+ def MutatingVariableInputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
+ # Operator
def Intermediates(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
if o != 0:
@@ -159,19 +189,56 @@ class Operator(object):
return self._tab.VectorLen(o)
return 0
+ # Operator
+ def IntermediatesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
+ return o == 0
+
def OperatorStart(builder): builder.StartObject(9)
+def Start(builder):
+ return OperatorStart(builder)
def OperatorAddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0)
+def AddOpcodeIndex(builder, opcodeIndex):
+ return OperatorAddOpcodeIndex(builder, opcodeIndex)
def OperatorAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0)
+def AddInputs(builder, inputs):
+ return OperatorAddInputs(builder, inputs)
def OperatorStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartInputsVector(builder, numElems):
+ return OperatorStartInputsVector(builder, numElems)
def OperatorAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0)
+def AddOutputs(builder, outputs):
+ return OperatorAddOutputs(builder, outputs)
def OperatorStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartOutputsVector(builder, numElems):
+ return OperatorStartOutputsVector(builder, numElems)
def OperatorAddBuiltinOptionsType(builder, builtinOptionsType): builder.PrependUint8Slot(3, builtinOptionsType, 0)
+def AddBuiltinOptionsType(builder, builtinOptionsType):
+ return OperatorAddBuiltinOptionsType(builder, builtinOptionsType)
def OperatorAddBuiltinOptions(builder, builtinOptions): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(builtinOptions), 0)
+def AddBuiltinOptions(builder, builtinOptions):
+ return OperatorAddBuiltinOptions(builder, builtinOptions)
def OperatorAddCustomOptions(builder, customOptions): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(customOptions), 0)
+def AddCustomOptions(builder, customOptions):
+ return OperatorAddCustomOptions(builder, customOptions)
def OperatorStartCustomOptionsVector(builder, numElems): return builder.StartVector(1, numElems, 1)
+def StartCustomOptionsVector(builder, numElems):
+ return OperatorStartCustomOptionsVector(builder, numElems)
def OperatorAddCustomOptionsFormat(builder, customOptionsFormat): builder.PrependInt8Slot(6, customOptionsFormat, 0)
+def AddCustomOptionsFormat(builder, customOptionsFormat):
+ return OperatorAddCustomOptionsFormat(builder, customOptionsFormat)
def OperatorAddMutatingVariableInputs(builder, mutatingVariableInputs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(mutatingVariableInputs), 0)
+def AddMutatingVariableInputs(builder, mutatingVariableInputs):
+ return OperatorAddMutatingVariableInputs(builder, mutatingVariableInputs)
def OperatorStartMutatingVariableInputsVector(builder, numElems): return builder.StartVector(1, numElems, 1)
+def StartMutatingVariableInputsVector(builder, numElems):
+ return OperatorStartMutatingVariableInputsVector(builder, numElems)
def OperatorAddIntermediates(builder, intermediates): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(intermediates), 0)
+def AddIntermediates(builder, intermediates):
+ return OperatorAddIntermediates(builder, intermediates)
def OperatorStartIntermediatesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartIntermediatesVector(builder, numElems):
+ return OperatorStartIntermediatesVector(builder, numElems)
def OperatorEnd(builder): return builder.EndObject()
+def End(builder):
+ return OperatorEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/OperatorCode.py b/ethosu/vela/tflite/OperatorCode.py
index 5a0ba2a4..a250e7c1 100644
--- a/ethosu/vela/tflite/OperatorCode.py
+++ b/ethosu/vela/tflite/OperatorCode.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class OperatorCode(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsOperatorCode(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = OperatorCode()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsOperatorCode(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def OperatorCodeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# OperatorCode
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -47,8 +57,20 @@ class OperatorCode(object):
return 0
def OperatorCodeStart(builder): builder.StartObject(4)
+def Start(builder):
+ return OperatorCodeStart(builder)
def OperatorCodeAddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode): builder.PrependInt8Slot(0, deprecatedBuiltinCode, 0)
+def AddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode):
+ return OperatorCodeAddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode)
def OperatorCodeAddCustomCode(builder, customCode): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(customCode), 0)
+def AddCustomCode(builder, customCode):
+ return OperatorCodeAddCustomCode(builder, customCode)
def OperatorCodeAddVersion(builder, version): builder.PrependInt32Slot(2, version, 1)
+def AddVersion(builder, version):
+ return OperatorCodeAddVersion(builder, version)
def OperatorCodeAddBuiltinCode(builder, builtinCode): builder.PrependInt32Slot(3, builtinCode, 0)
+def AddBuiltinCode(builder, builtinCode):
+ return OperatorCodeAddBuiltinCode(builder, builtinCode)
def OperatorCodeEnd(builder): return builder.EndObject()
+def End(builder):
+ return OperatorCodeEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/PackOptions.py b/ethosu/vela/tflite/PackOptions.py
index 6a8ee2bb..1591f15d 100644
--- a/ethosu/vela/tflite/PackOptions.py
+++ b/ethosu/vela/tflite/PackOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class PackOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPackOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PackOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsPackOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def PackOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PackOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class PackOptions(object):
return 0
def PackOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return PackOptionsStart(builder)
def PackOptionsAddValuesCount(builder, valuesCount): builder.PrependInt32Slot(0, valuesCount, 0)
+def AddValuesCount(builder, valuesCount):
+ return PackOptionsAddValuesCount(builder, valuesCount)
def PackOptionsAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0)
+def AddAxis(builder, axis):
+ return PackOptionsAddAxis(builder, axis)
def PackOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return PackOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/PadOptions.py b/ethosu/vela/tflite/PadOptions.py
index d0833c68..b73f51d8 100644
--- a/ethosu/vela/tflite/PadOptions.py
+++ b/ethosu/vela/tflite/PadOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class PadOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPadOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PadOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsPadOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def PadOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PadOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def PadOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return PadOptionsStart(builder)
def PadOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return PadOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/PadV2Options.py b/ethosu/vela/tflite/PadV2Options.py
index 5ea0d70c..aaa67935 100644
--- a/ethosu/vela/tflite/PadV2Options.py
+++ b/ethosu/vela/tflite/PadV2Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class PadV2Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPadV2Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PadV2Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsPadV2Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def PadV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PadV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def PadV2OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return PadV2OptionsStart(builder)
def PadV2OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return PadV2OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Padding.py b/ethosu/vela/tflite/Padding.py
index 6027f4b5..168bf74c 100644
--- a/ethosu/vela/tflite/Padding.py
+++ b/ethosu/vela/tflite/Padding.py
@@ -5,4 +5,3 @@
class Padding(object):
SAME = 0
VALID = 1
-
diff --git a/ethosu/vela/tflite/Pool2DOptions.py b/ethosu/vela/tflite/Pool2DOptions.py
index b8b9f178..169c13c6 100644
--- a/ethosu/vela/tflite/Pool2DOptions.py
+++ b/ethosu/vela/tflite/Pool2DOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Pool2DOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPool2DOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Pool2DOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsPool2DOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Pool2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Pool2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -61,10 +71,26 @@ class Pool2DOptions(object):
return 0
def Pool2DOptionsStart(builder): builder.StartObject(6)
+def Start(builder):
+ return Pool2DOptionsStart(builder)
def Pool2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def AddPadding(builder, padding):
+ return Pool2DOptionsAddPadding(builder, padding)
def Pool2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
+def AddStrideW(builder, strideW):
+ return Pool2DOptionsAddStrideW(builder, strideW)
def Pool2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
+def AddStrideH(builder, strideH):
+ return Pool2DOptionsAddStrideH(builder, strideH)
def Pool2DOptionsAddFilterWidth(builder, filterWidth): builder.PrependInt32Slot(3, filterWidth, 0)
+def AddFilterWidth(builder, filterWidth):
+ return Pool2DOptionsAddFilterWidth(builder, filterWidth)
def Pool2DOptionsAddFilterHeight(builder, filterHeight): builder.PrependInt32Slot(4, filterHeight, 0)
+def AddFilterHeight(builder, filterHeight):
+ return Pool2DOptionsAddFilterHeight(builder, filterHeight)
def Pool2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(5, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return Pool2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def Pool2DOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return Pool2DOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/PowOptions.py b/ethosu/vela/tflite/PowOptions.py
index 666ca488..4d9fd3db 100644
--- a/ethosu/vela/tflite/PowOptions.py
+++ b/ethosu/vela/tflite/PowOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class PowOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPowOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PowOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsPowOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def PowOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PowOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def PowOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return PowOptionsStart(builder)
def PowOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return PowOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/QuantizationDetails.py b/ethosu/vela/tflite/QuantizationDetails.py
index 7159efbd..8d53af96 100644
--- a/ethosu/vela/tflite/QuantizationDetails.py
+++ b/ethosu/vela/tflite/QuantizationDetails.py
@@ -5,4 +5,3 @@
class QuantizationDetails(object):
NONE = 0
CustomQuantization = 1
-
diff --git a/ethosu/vela/tflite/QuantizationParameters.py b/ethosu/vela/tflite/QuantizationParameters.py
index fcd686cf..0a27af0e 100644
--- a/ethosu/vela/tflite/QuantizationParameters.py
+++ b/ethosu/vela/tflite/QuantizationParameters.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class QuantizationParameters(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsQuantizationParameters(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = QuantizationParameters()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsQuantizationParameters(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def QuantizationParametersBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# QuantizationParameters
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +51,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def MinIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # QuantizationParameters
def Max(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -63,6 +78,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def MaxIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # QuantizationParameters
def Scale(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -85,6 +105,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def ScaleIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # QuantizationParameters
def ZeroPoint(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -107,6 +132,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def ZeroPointIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+ return o == 0
+
+ # QuantizationParameters
def DetailsType(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
@@ -131,15 +161,41 @@ class QuantizationParameters(object):
return 0
def QuantizationParametersStart(builder): builder.StartObject(7)
+def Start(builder):
+ return QuantizationParametersStart(builder)
def QuantizationParametersAddMin(builder, min): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(min), 0)
+def AddMin(builder, min):
+ return QuantizationParametersAddMin(builder, min)
def QuantizationParametersStartMinVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartMinVector(builder, numElems):
+ return QuantizationParametersStartMinVector(builder, numElems)
def QuantizationParametersAddMax(builder, max): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(max), 0)
+def AddMax(builder, max):
+ return QuantizationParametersAddMax(builder, max)
def QuantizationParametersStartMaxVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartMaxVector(builder, numElems):
+ return QuantizationParametersStartMaxVector(builder, numElems)
def QuantizationParametersAddScale(builder, scale): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(scale), 0)
+def AddScale(builder, scale):
+ return QuantizationParametersAddScale(builder, scale)
def QuantizationParametersStartScaleVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartScaleVector(builder, numElems):
+ return QuantizationParametersStartScaleVector(builder, numElems)
def QuantizationParametersAddZeroPoint(builder, zeroPoint): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(zeroPoint), 0)
+def AddZeroPoint(builder, zeroPoint):
+ return QuantizationParametersAddZeroPoint(builder, zeroPoint)
def QuantizationParametersStartZeroPointVector(builder, numElems): return builder.StartVector(8, numElems, 8)
+def StartZeroPointVector(builder, numElems):
+ return QuantizationParametersStartZeroPointVector(builder, numElems)
def QuantizationParametersAddDetailsType(builder, detailsType): builder.PrependUint8Slot(4, detailsType, 0)
+def AddDetailsType(builder, detailsType):
+ return QuantizationParametersAddDetailsType(builder, detailsType)
def QuantizationParametersAddDetails(builder, details): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(details), 0)
+def AddDetails(builder, details):
+ return QuantizationParametersAddDetails(builder, details)
def QuantizationParametersAddQuantizedDimension(builder, quantizedDimension): builder.PrependInt32Slot(6, quantizedDimension, 0)
+def AddQuantizedDimension(builder, quantizedDimension):
+ return QuantizationParametersAddQuantizedDimension(builder, quantizedDimension)
def QuantizationParametersEnd(builder): return builder.EndObject()
+def End(builder):
+ return QuantizationParametersEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/QuantizeOptions.py b/ethosu/vela/tflite/QuantizeOptions.py
index 28af8cc9..f7469290 100644
--- a/ethosu/vela/tflite/QuantizeOptions.py
+++ b/ethosu/vela/tflite/QuantizeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class QuantizeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsQuantizeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = QuantizeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsQuantizeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def QuantizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# QuantizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def QuantizeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return QuantizeOptionsStart(builder)
def QuantizeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return QuantizeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/RNNOptions.py b/ethosu/vela/tflite/RNNOptions.py
index 397d716f..c891508d 100644
--- a/ethosu/vela/tflite/RNNOptions.py
+++ b/ethosu/vela/tflite/RNNOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RNNOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsRNNOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = RNNOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsRNNOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def RNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class RNNOptions(object):
return False
def RNNOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return RNNOptionsStart(builder)
def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def RNNOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return RNNOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/RandomOptions.py b/ethosu/vela/tflite/RandomOptions.py
index 18ffc5fb..53d3b8d0 100644
--- a/ethosu/vela/tflite/RandomOptions.py
+++ b/ethosu/vela/tflite/RandomOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RandomOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsRandomOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = RandomOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsRandomOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def RandomOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RandomOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class RandomOptions(object):
return 0
def RandomOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return RandomOptionsStart(builder)
def RandomOptionsAddSeed(builder, seed): builder.PrependInt64Slot(0, seed, 0)
+def AddSeed(builder, seed):
+ return RandomOptionsAddSeed(builder, seed)
def RandomOptionsAddSeed2(builder, seed2): builder.PrependInt64Slot(1, seed2, 0)
+def AddSeed2(builder, seed2):
+ return RandomOptionsAddSeed2(builder, seed2)
def RandomOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return RandomOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/RangeOptions.py b/ethosu/vela/tflite/RangeOptions.py
index cb705b57..d6907971 100644
--- a/ethosu/vela/tflite/RangeOptions.py
+++ b/ethosu/vela/tflite/RangeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RangeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsRangeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = RangeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsRangeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def RangeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RangeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def RangeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return RangeOptionsStart(builder)
def RangeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return RangeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/RankOptions.py b/ethosu/vela/tflite/RankOptions.py
index 4e4a5ecd..dde41498 100644
--- a/ethosu/vela/tflite/RankOptions.py
+++ b/ethosu/vela/tflite/RankOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RankOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsRankOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = RankOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsRankOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def RankOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RankOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def RankOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return RankOptionsStart(builder)
def RankOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return RankOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ReadVariableOptions.py b/ethosu/vela/tflite/ReadVariableOptions.py
index 6484ef2f..14421790 100644
--- a/ethosu/vela/tflite/ReadVariableOptions.py
+++ b/ethosu/vela/tflite/ReadVariableOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReadVariableOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsReadVariableOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReadVariableOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsReadVariableOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ReadVariableOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReadVariableOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ReadVariableOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ReadVariableOptionsStart(builder)
def ReadVariableOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ReadVariableOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ReducerOptions.py b/ethosu/vela/tflite/ReducerOptions.py
index 93bbde17..e5f37d78 100644
--- a/ethosu/vela/tflite/ReducerOptions.py
+++ b/ethosu/vela/tflite/ReducerOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReducerOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsReducerOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReducerOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsReducerOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ReducerOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReducerOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class ReducerOptions(object):
return False
def ReducerOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ReducerOptionsStart(builder)
def ReducerOptionsAddKeepDims(builder, keepDims): builder.PrependBoolSlot(0, keepDims, 0)
+def AddKeepDims(builder, keepDims):
+ return ReducerOptionsAddKeepDims(builder, keepDims)
def ReducerOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ReducerOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ReshapeOptions.py b/ethosu/vela/tflite/ReshapeOptions.py
index 157d45d9..d22a91b8 100644
--- a/ethosu/vela/tflite/ReshapeOptions.py
+++ b/ethosu/vela/tflite/ReshapeOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReshapeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsReshapeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReshapeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsReshapeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ReshapeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReshapeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class ReshapeOptions(object):
return self._tab.VectorLen(o)
return 0
+ # ReshapeOptions
+ def NewShapeIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def ReshapeOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ReshapeOptionsStart(builder)
def ReshapeOptionsAddNewShape(builder, newShape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(newShape), 0)
+def AddNewShape(builder, newShape):
+ return ReshapeOptionsAddNewShape(builder, newShape)
def ReshapeOptionsStartNewShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartNewShapeVector(builder, numElems):
+ return ReshapeOptionsStartNewShapeVector(builder, numElems)
def ReshapeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ReshapeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ResizeBilinearOptions.py b/ethosu/vela/tflite/ResizeBilinearOptions.py
index fb05ca4b..c481a8aa 100644
--- a/ethosu/vela/tflite/ResizeBilinearOptions.py
+++ b/ethosu/vela/tflite/ResizeBilinearOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ResizeBilinearOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsResizeBilinearOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ResizeBilinearOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsResizeBilinearOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ResizeBilinearOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ResizeBilinearOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class ResizeBilinearOptions(object):
return False
def ResizeBilinearOptionsStart(builder): builder.StartObject(4)
+def Start(builder):
+ return ResizeBilinearOptionsStart(builder)
def ResizeBilinearOptionsAddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(2, alignCorners, 0)
+def AddAlignCorners(builder, alignCorners):
+ return ResizeBilinearOptionsAddAlignCorners(builder, alignCorners)
def ResizeBilinearOptionsAddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(3, halfPixelCenters, 0)
+def AddHalfPixelCenters(builder, halfPixelCenters):
+ return ResizeBilinearOptionsAddHalfPixelCenters(builder, halfPixelCenters)
def ResizeBilinearOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ResizeBilinearOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
index e2642cef..84b888a8 100644
--- a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
+++ b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ResizeNearestNeighborOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsResizeNearestNeighborOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ResizeNearestNeighborOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsResizeNearestNeighborOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ResizeNearestNeighborOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ResizeNearestNeighborOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class ResizeNearestNeighborOptions(object):
return False
def ResizeNearestNeighborOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return ResizeNearestNeighborOptionsStart(builder)
def ResizeNearestNeighborOptionsAddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(0, alignCorners, 0)
+def AddAlignCorners(builder, alignCorners):
+ return ResizeNearestNeighborOptionsAddAlignCorners(builder, alignCorners)
def ResizeNearestNeighborOptionsAddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(1, halfPixelCenters, 0)
+def AddHalfPixelCenters(builder, halfPixelCenters):
+ return ResizeNearestNeighborOptionsAddHalfPixelCenters(builder, halfPixelCenters)
def ResizeNearestNeighborOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ResizeNearestNeighborOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ReverseSequenceOptions.py b/ethosu/vela/tflite/ReverseSequenceOptions.py
index cbaf96db..63c449bb 100644
--- a/ethosu/vela/tflite/ReverseSequenceOptions.py
+++ b/ethosu/vela/tflite/ReverseSequenceOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReverseSequenceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsReverseSequenceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReverseSequenceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsReverseSequenceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ReverseSequenceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReverseSequenceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class ReverseSequenceOptions(object):
return 0
def ReverseSequenceOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return ReverseSequenceOptionsStart(builder)
def ReverseSequenceOptionsAddSeqDim(builder, seqDim): builder.PrependInt32Slot(0, seqDim, 0)
+def AddSeqDim(builder, seqDim):
+ return ReverseSequenceOptionsAddSeqDim(builder, seqDim)
def ReverseSequenceOptionsAddBatchDim(builder, batchDim): builder.PrependInt32Slot(1, batchDim, 0)
+def AddBatchDim(builder, batchDim):
+ return ReverseSequenceOptionsAddBatchDim(builder, batchDim)
def ReverseSequenceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ReverseSequenceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ReverseV2Options.py b/ethosu/vela/tflite/ReverseV2Options.py
index dbac9362..2d6d516d 100644
--- a/ethosu/vela/tflite/ReverseV2Options.py
+++ b/ethosu/vela/tflite/ReverseV2Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReverseV2Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsReverseV2Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ReverseV2Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsReverseV2Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ReverseV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReverseV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ReverseV2OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ReverseV2OptionsStart(builder)
def ReverseV2OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ReverseV2OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Rfft2dOptions.py b/ethosu/vela/tflite/Rfft2dOptions.py
index f4f2bf3f..d6a3d903 100644
--- a/ethosu/vela/tflite/Rfft2dOptions.py
+++ b/ethosu/vela/tflite/Rfft2dOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Rfft2dOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsRfft2dOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Rfft2dOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsRfft2dOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Rfft2dOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Rfft2dOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def Rfft2dOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return Rfft2dOptionsStart(builder)
def Rfft2dOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return Rfft2dOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SVDFOptions.py b/ethosu/vela/tflite/SVDFOptions.py
index e4b34611..3dbbad90 100644
--- a/ethosu/vela/tflite/SVDFOptions.py
+++ b/ethosu/vela/tflite/SVDFOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SVDFOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSVDFOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SVDFOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSVDFOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SVDFOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SVDFOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class SVDFOptions(object):
return False
def SVDFOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return SVDFOptionsStart(builder)
def SVDFOptionsAddRank(builder, rank): builder.PrependInt32Slot(0, rank, 0)
+def AddRank(builder, rank):
+ return SVDFOptionsAddRank(builder, rank)
def SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def SVDFOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return SVDFOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def SVDFOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SVDFOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ScatterNdOptions.py b/ethosu/vela/tflite/ScatterNdOptions.py
index e6bf3a11..682e629d 100644
--- a/ethosu/vela/tflite/ScatterNdOptions.py
+++ b/ethosu/vela/tflite/ScatterNdOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ScatterNdOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsScatterNdOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ScatterNdOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsScatterNdOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ScatterNdOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ScatterNdOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ScatterNdOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ScatterNdOptionsStart(builder)
def ScatterNdOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ScatterNdOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SegmentSumOptions.py b/ethosu/vela/tflite/SegmentSumOptions.py
index d1c32133..a6f499f1 100644
--- a/ethosu/vela/tflite/SegmentSumOptions.py
+++ b/ethosu/vela/tflite/SegmentSumOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SegmentSumOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSegmentSumOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SegmentSumOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSegmentSumOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SegmentSumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SegmentSumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SegmentSumOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SegmentSumOptionsStart(builder)
def SegmentSumOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SegmentSumOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SelectOptions.py b/ethosu/vela/tflite/SelectOptions.py
index d67daf36..fc61c13e 100644
--- a/ethosu/vela/tflite/SelectOptions.py
+++ b/ethosu/vela/tflite/SelectOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SelectOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSelectOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SelectOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSelectOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SelectOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SelectOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SelectOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SelectOptionsStart(builder)
def SelectOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SelectOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SelectV2Options.py b/ethosu/vela/tflite/SelectV2Options.py
index 5d03fc2d..59e4b247 100644
--- a/ethosu/vela/tflite/SelectV2Options.py
+++ b/ethosu/vela/tflite/SelectV2Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SelectV2Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSelectV2Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SelectV2Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSelectV2Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SelectV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SelectV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SelectV2OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SelectV2OptionsStart(builder)
def SelectV2OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SelectV2OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SequenceRNNOptions.py b/ethosu/vela/tflite/SequenceRNNOptions.py
index 16eaf090..3cc448a9 100644
--- a/ethosu/vela/tflite/SequenceRNNOptions.py
+++ b/ethosu/vela/tflite/SequenceRNNOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SequenceRNNOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSequenceRNNOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SequenceRNNOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSequenceRNNOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SequenceRNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SequenceRNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class SequenceRNNOptions(object):
return False
def SequenceRNNOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return SequenceRNNOptionsStart(builder)
def SequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0)
+def AddTimeMajor(builder, timeMajor):
+ return SequenceRNNOptionsAddTimeMajor(builder, timeMajor)
def SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def SequenceRNNOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SequenceRNNOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ShapeOptions.py b/ethosu/vela/tflite/ShapeOptions.py
index 2d24c05f..6a9d6f90 100644
--- a/ethosu/vela/tflite/ShapeOptions.py
+++ b/ethosu/vela/tflite/ShapeOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ShapeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsShapeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ShapeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsShapeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ShapeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ShapeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class ShapeOptions(object):
return 0
def ShapeOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ShapeOptionsStart(builder)
def ShapeOptionsAddOutType(builder, outType): builder.PrependInt8Slot(0, outType, 0)
+def AddOutType(builder, outType):
+ return ShapeOptionsAddOutType(builder, outType)
def ShapeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ShapeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SignOptions.py b/ethosu/vela/tflite/SignOptions.py
new file mode 100644
index 00000000..8e10a8ef
--- /dev/null
+++ b/ethosu/vela/tflite/SignOptions.py
@@ -0,0 +1,36 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class SignOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = SignOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsSignOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SignOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # SignOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def SignOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SignOptionsStart(builder)
+def SignOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SignOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SignatureDef.py b/ethosu/vela/tflite/SignatureDef.py
index b9394a46..b127550f 100644
--- a/ethosu/vela/tflite/SignatureDef.py
+++ b/ethosu/vela/tflite/SignatureDef.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SignatureDef(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSignatureDef(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SignatureDef()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSignatureDef(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SignatureDefBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SignatureDef
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -39,6 +49,11 @@ class SignatureDef(object):
return 0
# SignatureDef
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SignatureDef
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -59,6 +74,11 @@ class SignatureDef(object):
return 0
# SignatureDef
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SignatureDef
def SignatureKey(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -73,10 +93,26 @@ class SignatureDef(object):
return 0
def SignatureDefStart(builder): builder.StartObject(5)
+def Start(builder):
+ return SignatureDefStart(builder)
def SignatureDefAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0)
+def AddInputs(builder, inputs):
+ return SignatureDefAddInputs(builder, inputs)
def SignatureDefStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartInputsVector(builder, numElems):
+ return SignatureDefStartInputsVector(builder, numElems)
def SignatureDefAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0)
+def AddOutputs(builder, outputs):
+ return SignatureDefAddOutputs(builder, outputs)
def SignatureDefStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartOutputsVector(builder, numElems):
+ return SignatureDefStartOutputsVector(builder, numElems)
def SignatureDefAddSignatureKey(builder, signatureKey): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(signatureKey), 0)
+def AddSignatureKey(builder, signatureKey):
+ return SignatureDefAddSignatureKey(builder, signatureKey)
def SignatureDefAddSubgraphIndex(builder, subgraphIndex): builder.PrependUint32Slot(4, subgraphIndex, 0)
+def AddSubgraphIndex(builder, subgraphIndex):
+ return SignatureDefAddSubgraphIndex(builder, subgraphIndex)
def SignatureDefEnd(builder): return builder.EndObject()
+def End(builder):
+ return SignatureDefEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SkipGramOptions.py b/ethosu/vela/tflite/SkipGramOptions.py
index 0e8bdc1d..19a59b64 100644
--- a/ethosu/vela/tflite/SkipGramOptions.py
+++ b/ethosu/vela/tflite/SkipGramOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SkipGramOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSkipGramOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SkipGramOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSkipGramOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SkipGramOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SkipGramOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class SkipGramOptions(object):
return False
def SkipGramOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return SkipGramOptionsStart(builder)
def SkipGramOptionsAddNgramSize(builder, ngramSize): builder.PrependInt32Slot(0, ngramSize, 0)
+def AddNgramSize(builder, ngramSize):
+ return SkipGramOptionsAddNgramSize(builder, ngramSize)
def SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize): builder.PrependInt32Slot(1, maxSkipSize, 0)
+def AddMaxSkipSize(builder, maxSkipSize):
+ return SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize)
def SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams): builder.PrependBoolSlot(2, includeAllNgrams, 0)
+def AddIncludeAllNgrams(builder, includeAllNgrams):
+ return SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams)
def SkipGramOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SkipGramOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SliceOptions.py b/ethosu/vela/tflite/SliceOptions.py
index 4b41568d..334b7e40 100644
--- a/ethosu/vela/tflite/SliceOptions.py
+++ b/ethosu/vela/tflite/SliceOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SliceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSliceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SliceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSliceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SliceOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SliceOptionsStart(builder)
def SliceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SliceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SoftmaxOptions.py b/ethosu/vela/tflite/SoftmaxOptions.py
index a7168534..063b1c10 100644
--- a/ethosu/vela/tflite/SoftmaxOptions.py
+++ b/ethosu/vela/tflite/SoftmaxOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SoftmaxOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSoftmaxOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SoftmaxOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSoftmaxOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SoftmaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SoftmaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class SoftmaxOptions(object):
return 0.0
def SoftmaxOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SoftmaxOptionsStart(builder)
def SoftmaxOptionsAddBeta(builder, beta): builder.PrependFloat32Slot(0, beta, 0.0)
+def AddBeta(builder, beta):
+ return SoftmaxOptionsAddBeta(builder, beta)
def SoftmaxOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SoftmaxOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SpaceToBatchNDOptions.py b/ethosu/vela/tflite/SpaceToBatchNDOptions.py
index b61ef96f..18031b7e 100644
--- a/ethosu/vela/tflite/SpaceToBatchNDOptions.py
+++ b/ethosu/vela/tflite/SpaceToBatchNDOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SpaceToBatchNDOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSpaceToBatchNDOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SpaceToBatchNDOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSpaceToBatchNDOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SpaceToBatchNDOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SpaceToBatchNDOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SpaceToBatchNDOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SpaceToBatchNDOptionsStart(builder)
def SpaceToBatchNDOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SpaceToBatchNDOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SpaceToDepthOptions.py b/ethosu/vela/tflite/SpaceToDepthOptions.py
index d571174a..505e6d2f 100644
--- a/ethosu/vela/tflite/SpaceToDepthOptions.py
+++ b/ethosu/vela/tflite/SpaceToDepthOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SpaceToDepthOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSpaceToDepthOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SpaceToDepthOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSpaceToDepthOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SpaceToDepthOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SpaceToDepthOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class SpaceToDepthOptions(object):
return 0
def SpaceToDepthOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SpaceToDepthOptionsStart(builder)
def SpaceToDepthOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0)
+def AddBlockSize(builder, blockSize):
+ return SpaceToDepthOptionsAddBlockSize(builder, blockSize)
def SpaceToDepthOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SpaceToDepthOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SparseIndexVector.py b/ethosu/vela/tflite/SparseIndexVector.py
index fd35a03b..e2c9db78 100644
--- a/ethosu/vela/tflite/SparseIndexVector.py
+++ b/ethosu/vela/tflite/SparseIndexVector.py
@@ -7,4 +7,3 @@ class SparseIndexVector(object):
Int32Vector = 1
Uint16Vector = 2
Uint8Vector = 3
-
diff --git a/ethosu/vela/tflite/SparseToDenseOptions.py b/ethosu/vela/tflite/SparseToDenseOptions.py
index 826eee08..185b2a0c 100644
--- a/ethosu/vela/tflite/SparseToDenseOptions.py
+++ b/ethosu/vela/tflite/SparseToDenseOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SparseToDenseOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSparseToDenseOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SparseToDenseOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSparseToDenseOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SparseToDenseOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SparseToDenseOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class SparseToDenseOptions(object):
return False
def SparseToDenseOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SparseToDenseOptionsStart(builder)
def SparseToDenseOptionsAddValidateIndices(builder, validateIndices): builder.PrependBoolSlot(0, validateIndices, 0)
+def AddValidateIndices(builder, validateIndices):
+ return SparseToDenseOptionsAddValidateIndices(builder, validateIndices)
def SparseToDenseOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SparseToDenseOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SparsityParameters.py b/ethosu/vela/tflite/SparsityParameters.py
index de550a67..421910f8 100644
--- a/ethosu/vela/tflite/SparsityParameters.py
+++ b/ethosu/vela/tflite/SparsityParameters.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SparsityParameters(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSparsityParameters(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SparsityParameters()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSparsityParameters(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SparsityParametersBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SparsityParameters
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +51,11 @@ class SparsityParameters(object):
return 0
# SparsityParameters
+ def TraversalOrderIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SparsityParameters
def BlockMap(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -63,6 +78,11 @@ class SparsityParameters(object):
return 0
# SparsityParameters
+ def BlockMapIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SparsityParameters
def DimMetadata(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -82,11 +102,32 @@ class SparsityParameters(object):
return self._tab.VectorLen(o)
return 0
+ # SparsityParameters
+ def DimMetadataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
def SparsityParametersStart(builder): builder.StartObject(3)
+def Start(builder):
+ return SparsityParametersStart(builder)
def SparsityParametersAddTraversalOrder(builder, traversalOrder): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(traversalOrder), 0)
+def AddTraversalOrder(builder, traversalOrder):
+ return SparsityParametersAddTraversalOrder(builder, traversalOrder)
def SparsityParametersStartTraversalOrderVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartTraversalOrderVector(builder, numElems):
+ return SparsityParametersStartTraversalOrderVector(builder, numElems)
def SparsityParametersAddBlockMap(builder, blockMap): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(blockMap), 0)
+def AddBlockMap(builder, blockMap):
+ return SparsityParametersAddBlockMap(builder, blockMap)
def SparsityParametersStartBlockMapVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartBlockMapVector(builder, numElems):
+ return SparsityParametersStartBlockMapVector(builder, numElems)
def SparsityParametersAddDimMetadata(builder, dimMetadata): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(dimMetadata), 0)
+def AddDimMetadata(builder, dimMetadata):
+ return SparsityParametersAddDimMetadata(builder, dimMetadata)
def SparsityParametersStartDimMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartDimMetadataVector(builder, numElems):
+ return SparsityParametersStartDimMetadataVector(builder, numElems)
def SparsityParametersEnd(builder): return builder.EndObject()
+def End(builder):
+ return SparsityParametersEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SplitOptions.py b/ethosu/vela/tflite/SplitOptions.py
index 3207525b..c7dd92f9 100644
--- a/ethosu/vela/tflite/SplitOptions.py
+++ b/ethosu/vela/tflite/SplitOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SplitOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSplitOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SplitOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSplitOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SplitOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SplitOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class SplitOptions(object):
return 0
def SplitOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SplitOptionsStart(builder)
def SplitOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0)
+def AddNumSplits(builder, numSplits):
+ return SplitOptionsAddNumSplits(builder, numSplits)
def SplitOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SplitOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SplitVOptions.py b/ethosu/vela/tflite/SplitVOptions.py
index 418959de..64355061 100644
--- a/ethosu/vela/tflite/SplitVOptions.py
+++ b/ethosu/vela/tflite/SplitVOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SplitVOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSplitVOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SplitVOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSplitVOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SplitVOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SplitVOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class SplitVOptions(object):
return 0
def SplitVOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SplitVOptionsStart(builder)
def SplitVOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0)
+def AddNumSplits(builder, numSplits):
+ return SplitVOptionsAddNumSplits(builder, numSplits)
def SplitVOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SplitVOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SquareOptions.py b/ethosu/vela/tflite/SquareOptions.py
index 56633f6a..c1bdca8e 100644
--- a/ethosu/vela/tflite/SquareOptions.py
+++ b/ethosu/vela/tflite/SquareOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SquareOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSquareOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SquareOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSquareOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SquareOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SquareOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SquareOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SquareOptionsStart(builder)
def SquareOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SquareOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SquaredDifferenceOptions.py b/ethosu/vela/tflite/SquaredDifferenceOptions.py
index 906855d1..115455b5 100644
--- a/ethosu/vela/tflite/SquaredDifferenceOptions.py
+++ b/ethosu/vela/tflite/SquaredDifferenceOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SquaredDifferenceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSquaredDifferenceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SquaredDifferenceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSquaredDifferenceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SquaredDifferenceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SquaredDifferenceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def SquaredDifferenceOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return SquaredDifferenceOptionsStart(builder)
def SquaredDifferenceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SquaredDifferenceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SqueezeOptions.py b/ethosu/vela/tflite/SqueezeOptions.py
index 25b294dc..1a8a6af4 100644
--- a/ethosu/vela/tflite/SqueezeOptions.py
+++ b/ethosu/vela/tflite/SqueezeOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SqueezeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSqueezeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SqueezeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSqueezeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SqueezeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SqueezeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class SqueezeOptions(object):
return self._tab.VectorLen(o)
return 0
+ # SqueezeOptions
+ def SqueezeDimsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def SqueezeOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return SqueezeOptionsStart(builder)
def SqueezeOptionsAddSqueezeDims(builder, squeezeDims): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(squeezeDims), 0)
+def AddSqueezeDims(builder, squeezeDims):
+ return SqueezeOptionsAddSqueezeDims(builder, squeezeDims)
def SqueezeOptionsStartSqueezeDimsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartSqueezeDimsVector(builder, numElems):
+ return SqueezeOptionsStartSqueezeDimsVector(builder, numElems)
def SqueezeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SqueezeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/StridedSliceOptions.py b/ethosu/vela/tflite/StridedSliceOptions.py
index 3bbb36b8..ccc2701c 100644
--- a/ethosu/vela/tflite/StridedSliceOptions.py
+++ b/ethosu/vela/tflite/StridedSliceOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class StridedSliceOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsStridedSliceOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = StridedSliceOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsStridedSliceOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def StridedSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# StridedSliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -54,9 +64,23 @@ class StridedSliceOptions(object):
return 0
def StridedSliceOptionsStart(builder): builder.StartObject(5)
+def Start(builder):
+ return StridedSliceOptionsStart(builder)
def StridedSliceOptionsAddBeginMask(builder, beginMask): builder.PrependInt32Slot(0, beginMask, 0)
+def AddBeginMask(builder, beginMask):
+ return StridedSliceOptionsAddBeginMask(builder, beginMask)
def StridedSliceOptionsAddEndMask(builder, endMask): builder.PrependInt32Slot(1, endMask, 0)
+def AddEndMask(builder, endMask):
+ return StridedSliceOptionsAddEndMask(builder, endMask)
def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask): builder.PrependInt32Slot(2, ellipsisMask, 0)
+def AddEllipsisMask(builder, ellipsisMask):
+ return StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask)
def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask): builder.PrependInt32Slot(3, newAxisMask, 0)
+def AddNewAxisMask(builder, newAxisMask):
+ return StridedSliceOptionsAddNewAxisMask(builder, newAxisMask)
def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask): builder.PrependInt32Slot(4, shrinkAxisMask, 0)
+def AddShrinkAxisMask(builder, shrinkAxisMask):
+ return StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask)
def StridedSliceOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return StridedSliceOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SubGraph.py b/ethosu/vela/tflite/SubGraph.py
index eaa42fac..6ceb2772 100644
--- a/ethosu/vela/tflite/SubGraph.py
+++ b/ethosu/vela/tflite/SubGraph.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SubGraph(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSubGraph(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SubGraph()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSubGraph(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SubGraphBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SubGraph
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -39,6 +49,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def TensorsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SubGraph
def Inputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -61,6 +76,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SubGraph
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -83,6 +103,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # SubGraph
def Operators(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -103,6 +128,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def OperatorsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+ return o == 0
+
+ # SubGraph
def Name(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
@@ -110,13 +140,35 @@ class SubGraph(object):
return None
def SubGraphStart(builder): builder.StartObject(5)
+def Start(builder):
+ return SubGraphStart(builder)
def SubGraphAddTensors(builder, tensors): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(tensors), 0)
+def AddTensors(builder, tensors):
+ return SubGraphAddTensors(builder, tensors)
def SubGraphStartTensorsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartTensorsVector(builder, numElems):
+ return SubGraphStartTensorsVector(builder, numElems)
def SubGraphAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0)
+def AddInputs(builder, inputs):
+ return SubGraphAddInputs(builder, inputs)
def SubGraphStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartInputsVector(builder, numElems):
+ return SubGraphStartInputsVector(builder, numElems)
def SubGraphAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0)
+def AddOutputs(builder, outputs):
+ return SubGraphAddOutputs(builder, outputs)
def SubGraphStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartOutputsVector(builder, numElems):
+ return SubGraphStartOutputsVector(builder, numElems)
def SubGraphAddOperators(builder, operators): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(operators), 0)
+def AddOperators(builder, operators):
+ return SubGraphAddOperators(builder, operators)
def SubGraphStartOperatorsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartOperatorsVector(builder, numElems):
+ return SubGraphStartOperatorsVector(builder, numElems)
def SubGraphAddName(builder, name): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+def AddName(builder, name):
+ return SubGraphAddName(builder, name)
def SubGraphEnd(builder): return builder.EndObject()
+def End(builder):
+ return SubGraphEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/SubOptions.py b/ethosu/vela/tflite/SubOptions.py
index c3ed40e1..65e9f5a0 100644
--- a/ethosu/vela/tflite/SubOptions.py
+++ b/ethosu/vela/tflite/SubOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SubOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSubOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = SubOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsSubOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def SubOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SubOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class SubOptions(object):
return True
def SubOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return SubOptionsStart(builder)
def SubOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return SubOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def SubOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1)
+def AddPotScaleInt16(builder, potScaleInt16):
+ return SubOptionsAddPotScaleInt16(builder, potScaleInt16)
def SubOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SubOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Tensor.py b/ethosu/vela/tflite/Tensor.py
index 4c39b7cb..87303e11 100644
--- a/ethosu/vela/tflite/Tensor.py
+++ b/ethosu/vela/tflite/Tensor.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Tensor(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTensor(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Tensor()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTensor(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TensorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Tensor
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +51,11 @@ class Tensor(object):
return 0
# Tensor
+ def ShapeIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # Tensor
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -112,15 +127,85 @@ class Tensor(object):
return self._tab.VectorLen(o)
return 0
-def TensorStart(builder): builder.StartObject(8)
+ # Tensor
+ def ShapeSignatureIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
+ # Tensor
+ def HasRank(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
+ if o != 0:
+ return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+ return False
+
+ # Tensor
+ def VariantTensors(self, j):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
+ if o != 0:
+ x = self._tab.Vector(o)
+ x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
+ x = self._tab.Indirect(x)
+ from .VariantSubType import VariantSubType
+ obj = VariantSubType()
+ obj.Init(self._tab.Bytes, x)
+ return obj
+ return None
+
+ # Tensor
+ def VariantTensorsLength(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
+ if o != 0:
+ return self._tab.VectorLen(o)
+ return 0
+
+ # Tensor
+ def VariantTensorsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
+ return o == 0
+
+def TensorStart(builder): builder.StartObject(10)
+def Start(builder):
+ return TensorStart(builder)
def TensorAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0)
+def AddShape(builder, shape):
+ return TensorAddShape(builder, shape)
def TensorStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartShapeVector(builder, numElems):
+ return TensorStartShapeVector(builder, numElems)
def TensorAddType(builder, type): builder.PrependInt8Slot(1, type, 0)
+def AddType(builder, type):
+ return TensorAddType(builder, type)
def TensorAddBuffer(builder, buffer): builder.PrependUint32Slot(2, buffer, 0)
+def AddBuffer(builder, buffer):
+ return TensorAddBuffer(builder, buffer)
def TensorAddName(builder, name): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+def AddName(builder, name):
+ return TensorAddName(builder, name)
def TensorAddQuantization(builder, quantization): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(quantization), 0)
+def AddQuantization(builder, quantization):
+ return TensorAddQuantization(builder, quantization)
def TensorAddIsVariable(builder, isVariable): builder.PrependBoolSlot(5, isVariable, 0)
+def AddIsVariable(builder, isVariable):
+ return TensorAddIsVariable(builder, isVariable)
def TensorAddSparsity(builder, sparsity): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(sparsity), 0)
+def AddSparsity(builder, sparsity):
+ return TensorAddSparsity(builder, sparsity)
def TensorAddShapeSignature(builder, shapeSignature): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(shapeSignature), 0)
+def AddShapeSignature(builder, shapeSignature):
+ return TensorAddShapeSignature(builder, shapeSignature)
def TensorStartShapeSignatureVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartShapeSignatureVector(builder, numElems):
+ return TensorStartShapeSignatureVector(builder, numElems)
+def TensorAddHasRank(builder, hasRank): builder.PrependBoolSlot(8, hasRank, 0)
+def AddHasRank(builder, hasRank):
+ return TensorAddHasRank(builder, hasRank)
+def TensorAddVariantTensors(builder, variantTensors): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(variantTensors), 0)
+def AddVariantTensors(builder, variantTensors):
+ return TensorAddVariantTensors(builder, variantTensors)
+def TensorStartVariantTensorsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartVariantTensorsVector(builder, numElems):
+ return TensorStartVariantTensorsVector(builder, numElems)
def TensorEnd(builder): return builder.EndObject()
+def End(builder):
+ return TensorEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/TensorMap.py b/ethosu/vela/tflite/TensorMap.py
index e9b036d9..3ade6fa7 100644
--- a/ethosu/vela/tflite/TensorMap.py
+++ b/ethosu/vela/tflite/TensorMap.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TensorMap(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTensorMap(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TensorMap()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTensorMap(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TensorMapBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TensorMap
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class TensorMap(object):
return 0
def TensorMapStart(builder): builder.StartObject(2)
+def Start(builder):
+ return TensorMapStart(builder)
def TensorMapAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
+def AddName(builder, name):
+ return TensorMapAddName(builder, name)
def TensorMapAddTensorIndex(builder, tensorIndex): builder.PrependUint32Slot(1, tensorIndex, 0)
+def AddTensorIndex(builder, tensorIndex):
+ return TensorMapAddTensorIndex(builder, tensorIndex)
def TensorMapEnd(builder): return builder.EndObject()
+def End(builder):
+ return TensorMapEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/TensorType.py b/ethosu/vela/tflite/TensorType.py
index 30306998..621d0c54 100644
--- a/ethosu/vela/tflite/TensorType.py
+++ b/ethosu/vela/tflite/TensorType.py
@@ -20,4 +20,3 @@ class TensorType(object):
VARIANT = 14
UINT32 = 15
UINT16 = 16
-
diff --git a/ethosu/vela/tflite/TileOptions.py b/ethosu/vela/tflite/TileOptions.py
index ec8396dc..645cf34a 100644
--- a/ethosu/vela/tflite/TileOptions.py
+++ b/ethosu/vela/tflite/TileOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TileOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTileOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TileOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTileOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TileOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TileOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def TileOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return TileOptionsStart(builder)
def TileOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return TileOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/TopKV2Options.py b/ethosu/vela/tflite/TopKV2Options.py
index ccd51033..da080741 100644
--- a/ethosu/vela/tflite/TopKV2Options.py
+++ b/ethosu/vela/tflite/TopKV2Options.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TopKV2Options(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTopKV2Options(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TopKV2Options()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTopKV2Options(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TopKV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TopKV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def TopKV2OptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return TopKV2OptionsStart(builder)
def TopKV2OptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return TopKV2OptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/TransposeConvOptions.py b/ethosu/vela/tflite/TransposeConvOptions.py
index 423571c8..a11a79e9 100644
--- a/ethosu/vela/tflite/TransposeConvOptions.py
+++ b/ethosu/vela/tflite/TransposeConvOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TransposeConvOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTransposeConvOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TransposeConvOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTransposeConvOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TransposeConvOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TransposeConvOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,17 @@ class TransposeConvOptions(object):
return 0
def TransposeConvOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return TransposeConvOptionsStart(builder)
def TransposeConvOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def AddPadding(builder, padding):
+ return TransposeConvOptionsAddPadding(builder, padding)
def TransposeConvOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
+def AddStrideW(builder, strideW):
+ return TransposeConvOptionsAddStrideW(builder, strideW)
def TransposeConvOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
+def AddStrideH(builder, strideH):
+ return TransposeConvOptionsAddStrideH(builder, strideH)
def TransposeConvOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return TransposeConvOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/TransposeOptions.py b/ethosu/vela/tflite/TransposeOptions.py
index 42c596d9..7dd90ff7 100644
--- a/ethosu/vela/tflite/TransposeOptions.py
+++ b/ethosu/vela/tflite/TransposeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TransposeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsTransposeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = TransposeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsTransposeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def TransposeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TransposeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def TransposeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return TransposeOptionsStart(builder)
def TransposeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return TransposeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Uint16Vector.py b/ethosu/vela/tflite/Uint16Vector.py
index 750e52a4..61549c5d 100644
--- a/ethosu/vela/tflite/Uint16Vector.py
+++ b/ethosu/vela/tflite/Uint16Vector.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Uint16Vector(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUint16Vector(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Uint16Vector()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUint16Vector(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Uint16VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Uint16Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class Uint16Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Uint16Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Uint16VectorStart(builder): builder.StartObject(1)
+def Start(builder):
+ return Uint16VectorStart(builder)
def Uint16VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
+def AddValues(builder, values):
+ return Uint16VectorAddValues(builder, values)
def Uint16VectorStartValuesVector(builder, numElems): return builder.StartVector(2, numElems, 2)
+def StartValuesVector(builder, numElems):
+ return Uint16VectorStartValuesVector(builder, numElems)
def Uint16VectorEnd(builder): return builder.EndObject()
+def End(builder):
+ return Uint16VectorEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/Uint8Vector.py b/ethosu/vela/tflite/Uint8Vector.py
index dc475f9f..1f29c600 100644
--- a/ethosu/vela/tflite/Uint8Vector.py
+++ b/ethosu/vela/tflite/Uint8Vector.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Uint8Vector(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUint8Vector(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Uint8Vector()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUint8Vector(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def Uint8VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Uint8Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,7 +50,20 @@ class Uint8Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Uint8Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Uint8VectorStart(builder): builder.StartObject(1)
+def Start(builder):
+ return Uint8VectorStart(builder)
def Uint8VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
+def AddValues(builder, values):
+ return Uint8VectorAddValues(builder, values)
def Uint8VectorStartValuesVector(builder, numElems): return builder.StartVector(1, numElems, 1)
+def StartValuesVector(builder, numElems):
+ return Uint8VectorStartValuesVector(builder, numElems)
def Uint8VectorEnd(builder): return builder.EndObject()
+def End(builder):
+ return Uint8VectorEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
index b734f3ff..16641a74 100644
--- a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UnidirectionalSequenceLSTMOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUnidirectionalSequenceLSTMOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = UnidirectionalSequenceLSTMOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUnidirectionalSequenceLSTMOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnidirectionalSequenceLSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UnidirectionalSequenceLSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -54,9 +64,23 @@ class UnidirectionalSequenceLSTMOptions(object):
return False
def UnidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(5)
+def Start(builder):
+ return UnidirectionalSequenceLSTMOptionsStart(builder)
def UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddFusedActivationFunction(builder, fusedActivationFunction):
+ return UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction)
def UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
+def AddCellClip(builder, cellClip):
+ return UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip)
def UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
+def AddProjClip(builder, projClip):
+ return UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip)
def UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(3, timeMajor, 0)
+def AddTimeMajor(builder, timeMajor):
+ return UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor)
def UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0)
+def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs):
+ return UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs)
def UnidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnidirectionalSequenceLSTMOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UniqueOptions.py b/ethosu/vela/tflite/UniqueOptions.py
index 841c6977..7b21d095 100644
--- a/ethosu/vela/tflite/UniqueOptions.py
+++ b/ethosu/vela/tflite/UniqueOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UniqueOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUniqueOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = UniqueOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUniqueOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UniqueOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UniqueOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -26,5 +36,11 @@ class UniqueOptions(object):
return 2
def UniqueOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return UniqueOptionsStart(builder)
def UniqueOptionsAddIdxOutType(builder, idxOutType): builder.PrependInt8Slot(0, idxOutType, 2)
+def AddIdxOutType(builder, idxOutType):
+ return UniqueOptionsAddIdxOutType(builder, idxOutType)
def UniqueOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UniqueOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnpackOptions.py b/ethosu/vela/tflite/UnpackOptions.py
index eed40193..f7c2a0dc 100644
--- a/ethosu/vela/tflite/UnpackOptions.py
+++ b/ethosu/vela/tflite/UnpackOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UnpackOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUnpackOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = UnpackOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUnpackOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnpackOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UnpackOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class UnpackOptions(object):
return 0
def UnpackOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return UnpackOptionsStart(builder)
def UnpackOptionsAddNum(builder, num): builder.PrependInt32Slot(0, num, 0)
+def AddNum(builder, num):
+ return UnpackOptionsAddNum(builder, num)
def UnpackOptionsAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0)
+def AddAxis(builder, axis):
+ return UnpackOptionsAddAxis(builder, axis)
def UnpackOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnpackOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnsortedSegmentMaxOptions.py b/ethosu/vela/tflite/UnsortedSegmentMaxOptions.py
new file mode 100644
index 00000000..05d57c01
--- /dev/null
+++ b/ethosu/vela/tflite/UnsortedSegmentMaxOptions.py
@@ -0,0 +1,36 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class UnsortedSegmentMaxOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = UnsortedSegmentMaxOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsUnsortedSegmentMaxOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnsortedSegmentMaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # UnsortedSegmentMaxOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def UnsortedSegmentMaxOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return UnsortedSegmentMaxOptionsStart(builder)
+def UnsortedSegmentMaxOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnsortedSegmentMaxOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnsortedSegmentMinOptions.py b/ethosu/vela/tflite/UnsortedSegmentMinOptions.py
new file mode 100644
index 00000000..9ce63a93
--- /dev/null
+++ b/ethosu/vela/tflite/UnsortedSegmentMinOptions.py
@@ -0,0 +1,36 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class UnsortedSegmentMinOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = UnsortedSegmentMinOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsUnsortedSegmentMinOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnsortedSegmentMinOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # UnsortedSegmentMinOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def UnsortedSegmentMinOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return UnsortedSegmentMinOptionsStart(builder)
+def UnsortedSegmentMinOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnsortedSegmentMinOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnsortedSegmentProdOptions.py b/ethosu/vela/tflite/UnsortedSegmentProdOptions.py
index 46650192..e83b6d52 100644
--- a/ethosu/vela/tflite/UnsortedSegmentProdOptions.py
+++ b/ethosu/vela/tflite/UnsortedSegmentProdOptions.py
@@ -3,28 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UnsortedSegmentProdOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsUnsortedSegmentProdOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = UnsortedSegmentProdOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsUnsortedSegmentProdOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnsortedSegmentProdOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UnsortedSegmentProdOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
- # UnsortedSegmentProdOptions
- def NumSegments(self):
- o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
- if o != 0:
- return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
- return 0
-
-def UnsortedSegmentProdOptionsStart(builder): builder.StartObject(1)
-def UnsortedSegmentProdOptionsAddNumSegments(builder, numSegments): builder.PrependInt32Slot(0, numSegments, 0)
+def UnsortedSegmentProdOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return UnsortedSegmentProdOptionsStart(builder)
def UnsortedSegmentProdOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnsortedSegmentProdOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/UnsortedSegmentSumOptions.py b/ethosu/vela/tflite/UnsortedSegmentSumOptions.py
new file mode 100644
index 00000000..b4844295
--- /dev/null
+++ b/ethosu/vela/tflite/UnsortedSegmentSumOptions.py
@@ -0,0 +1,36 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class UnsortedSegmentSumOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = UnsortedSegmentSumOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsUnsortedSegmentSumOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def UnsortedSegmentSumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # UnsortedSegmentSumOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def UnsortedSegmentSumOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return UnsortedSegmentSumOptionsStart(builder)
+def UnsortedSegmentSumOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return UnsortedSegmentSumOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/VarHandleOptions.py b/ethosu/vela/tflite/VarHandleOptions.py
index ff05e77f..57305602 100644
--- a/ethosu/vela/tflite/VarHandleOptions.py
+++ b/ethosu/vela/tflite/VarHandleOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class VarHandleOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsVarHandleOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = VarHandleOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsVarHandleOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def VarHandleOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# VarHandleOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class VarHandleOptions(object):
return None
def VarHandleOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return VarHandleOptionsStart(builder)
def VarHandleOptionsAddContainer(builder, container): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(container), 0)
+def AddContainer(builder, container):
+ return VarHandleOptionsAddContainer(builder, container)
def VarHandleOptionsAddSharedName(builder, sharedName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(sharedName), 0)
+def AddSharedName(builder, sharedName):
+ return VarHandleOptionsAddSharedName(builder, sharedName)
def VarHandleOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return VarHandleOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/VariantSubType.py b/ethosu/vela/tflite/VariantSubType.py
new file mode 100644
index 00000000..96f329a8
--- /dev/null
+++ b/ethosu/vela/tflite/VariantSubType.py
@@ -0,0 +1,89 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class VariantSubType(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAs(cls, buf, offset=0):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = VariantSubType()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def GetRootAsVariantSubType(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def VariantSubTypeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # VariantSubType
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+ # VariantSubType
+ def Shape(self, j):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ a = self._tab.Vector(o)
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
+ return 0
+
+ # VariantSubType
+ def ShapeAsNumpy(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
+ return 0
+
+ # VariantSubType
+ def ShapeLength(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ return self._tab.VectorLen(o)
+ return 0
+
+ # VariantSubType
+ def ShapeIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # VariantSubType
+ def Type(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
+ return 0
+
+ # VariantSubType
+ def HasRank(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ if o != 0:
+ return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+ return False
+
+def VariantSubTypeStart(builder): builder.StartObject(3)
+def Start(builder):
+ return VariantSubTypeStart(builder)
+def VariantSubTypeAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0)
+def AddShape(builder, shape):
+ return VariantSubTypeAddShape(builder, shape)
+def VariantSubTypeStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartShapeVector(builder, numElems):
+ return VariantSubTypeStartShapeVector(builder, numElems)
+def VariantSubTypeAddType(builder, type): builder.PrependInt8Slot(1, type, 0)
+def AddType(builder, type):
+ return VariantSubTypeAddType(builder, type)
+def VariantSubTypeAddHasRank(builder, hasRank): builder.PrependBoolSlot(2, hasRank, 0)
+def AddHasRank(builder, hasRank):
+ return VariantSubTypeAddHasRank(builder, hasRank)
+def VariantSubTypeEnd(builder): return builder.EndObject()
+def End(builder):
+ return VariantSubTypeEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/WhereOptions.py b/ethosu/vela/tflite/WhereOptions.py
index ab69f6aa..6c6f509e 100644
--- a/ethosu/vela/tflite/WhereOptions.py
+++ b/ethosu/vela/tflite/WhereOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class WhereOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsWhereOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = WhereOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsWhereOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def WhereOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# WhereOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def WhereOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return WhereOptionsStart(builder)
def WhereOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return WhereOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/WhileOptions.py b/ethosu/vela/tflite/WhileOptions.py
index 7d5a6dfa..40a386a0 100644
--- a/ethosu/vela/tflite/WhileOptions.py
+++ b/ethosu/vela/tflite/WhileOptions.py
@@ -3,17 +3,27 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class WhileOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsWhileOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = WhileOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsWhileOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def WhileOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# WhileOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -33,6 +43,14 @@ class WhileOptions(object):
return 0
def WhileOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return WhileOptionsStart(builder)
def WhileOptionsAddCondSubgraphIndex(builder, condSubgraphIndex): builder.PrependInt32Slot(0, condSubgraphIndex, 0)
+def AddCondSubgraphIndex(builder, condSubgraphIndex):
+ return WhileOptionsAddCondSubgraphIndex(builder, condSubgraphIndex)
def WhileOptionsAddBodySubgraphIndex(builder, bodySubgraphIndex): builder.PrependInt32Slot(1, bodySubgraphIndex, 0)
+def AddBodySubgraphIndex(builder, bodySubgraphIndex):
+ return WhileOptionsAddBodySubgraphIndex(builder, bodySubgraphIndex)
def WhileOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return WhileOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite/ZerosLikeOptions.py b/ethosu/vela/tflite/ZerosLikeOptions.py
index e6aa9639..62f60511 100644
--- a/ethosu/vela/tflite/ZerosLikeOptions.py
+++ b/ethosu/vela/tflite/ZerosLikeOptions.py
@@ -3,20 +3,34 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ZerosLikeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsZerosLikeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ZerosLikeOptions()
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GetRootAsZerosLikeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
+ def ZerosLikeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ZerosLikeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
def ZerosLikeOptionsStart(builder): builder.StartObject(0)
+def Start(builder):
+ return ZerosLikeOptionsStart(builder)
def ZerosLikeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ZerosLikeOptionsEnd(builder) \ No newline at end of file
diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py
index 3ccedc73..4e8507d0 100644
--- a/ethosu/vela/tflite_mapping.py
+++ b/ethosu/vela/tflite_mapping.py
@@ -32,6 +32,7 @@ from .tflite import AddOptions
from .tflite import ArgMaxOptions
from .tflite import ArgMinOptions
from .tflite import AssignVariableOptions
+from .tflite import ATan2Options
from .tflite import BatchMatMulOptions
from .tflite import BatchToSpaceNDOptions
from .tflite import BidirectionalSequenceLSTMOptions
@@ -118,6 +119,7 @@ from .tflite import SelectOptions
from .tflite import SelectV2Options
from .tflite import SequenceRNNOptions
from .tflite import ShapeOptions
+from .tflite import SignOptions
from .tflite import SkipGramOptions
from .tflite import SliceOptions
from .tflite import SoftmaxOptions
@@ -139,7 +141,10 @@ from .tflite import TransposeOptions
from .tflite import UnidirectionalSequenceLSTMOptions
from .tflite import UniqueOptions
from .tflite import UnpackOptions
+from .tflite import UnsortedSegmentMaxOptions
+from .tflite import UnsortedSegmentMinOptions
from .tflite import UnsortedSegmentProdOptions
+from .tflite import UnsortedSegmentSumOptions
from .tflite import VarHandleOptions
from .tflite import WhereOptions
from .tflite import WhileOptions
@@ -323,6 +328,11 @@ builtin_options_map = {
BuiltinOptions.DynamicUpdateSliceOptions: DynamicUpdateSliceOptions.DynamicUpdateSliceOptions,
BuiltinOptions.GeluOptions: GeluOptions.GeluOptions,
BuiltinOptions.UnsortedSegmentProdOptions: UnsortedSegmentProdOptions.UnsortedSegmentProdOptions,
+ BuiltinOptions.UnsortedSegmentMaxOptions: UnsortedSegmentMaxOptions.UnsortedSegmentMaxOptions,
+ BuiltinOptions.UnsortedSegmentMinOptions: UnsortedSegmentMinOptions.UnsortedSegmentMinOptions,
+ BuiltinOptions.UnsortedSegmentSumOptions: UnsortedSegmentSumOptions.UnsortedSegmentSumOptions,
+ BuiltinOptions.ATan2Options: ATan2Options.ATan2Options,
+ BuiltinOptions.SignOptions: SignOptions.SignOptions,
}
@@ -369,14 +379,14 @@ def write_byte_vector(builder, v):
builder.StartVector(1, len(v), 1)
for e in v[::-1]:
builder.PrependByte(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def write_int_vector(builder, v):
builder.StartVector(4, len(v), 4)
for e in v[::-1]:
builder.PrependInt32(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
class OptionsSerializer:
@@ -519,6 +529,7 @@ builtin_operator_map = {
),
TFLITE_IFM_INDICES,
),
+ BuiltinOperator.ATAN2: (Op.Atan2, OptionsSerializer("ATan2Options", ()), TFLITE_IFM_IFM2_INDICES),
BuiltinOperator.CONCATENATION: (
Op.ConcatTFLite,
OptionsSerializer("ConcatenationOptions", ("axis", fused_act)),
@@ -754,6 +765,7 @@ builtin_operator_map = {
OptionsSerializer("TransposeConvOptions", (padding, "stride_h", "stride_w")),
TFLITE_CONV2D_BACKPROP_INDICES,
),
+ BuiltinOperator.SIGN: (Op.Sign, OptionsSerializer("SignOptions"), TFLITE_IFM_INDICES),
BuiltinOperator.SPARSE_TO_DENSE: (
Op.SparseToDense,
OptionsSerializer("SparseToDenseOptions", ("validate_indices",)),
@@ -970,7 +982,22 @@ builtin_operator_map = {
),
BuiltinOperator.UNSORTED_SEGMENT_PROD: (
Op.UnsortedSegmentProd,
- OptionsSerializer("UnsortedSegmentProdOptions", ("numsegments",)),
+ OptionsSerializer("UnsortedSegmentProdOptions"),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.UNSORTED_SEGMENT_MAX: (
+ Op.UnsortedSegmentMax,
+ OptionsSerializer("UnsortedSegmentMaxOptions"),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.UNSORTED_SEGMENT_MIN: (
+ Op.UnsortedSegmentMin,
+ OptionsSerializer("UnsortedSegmentMinOptions"),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.UNSORTED_SEGMENT_SUM: (
+ Op.UnsortedSegmentSum,
+ OptionsSerializer("UnsortedSegmentSumOptions"),
TFLITE_NO_INDICES,
),
BuiltinOperator.CUSTOM: (Op.Custom, CustomOptionsSerializer(), TFLITE_NO_INDICES),
diff --git a/ethosu/vela/tflite_writer.py b/ethosu/vela/tflite_writer.py
index d134c07c..7aab01f2 100644
--- a/ethosu/vela/tflite_writer.py
+++ b/ethosu/vela/tflite_writer.py
@@ -116,35 +116,35 @@ class TFLiteSerialiser:
builder.StartVector(1, len(v), alignment)
for e in v[::-1]:
builder.PrependByte(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def write_int_vector(self, v):
builder = self.builder
builder.StartVector(4, len(v), 4)
for e in v[::-1]:
builder.PrependInt32(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def write_long_vector(self, v):
builder = self.builder
builder.StartVector(8, len(v), 8)
for e in v[::-1]:
builder.PrependInt64(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def write_float_vector(self, v):
builder = self.builder
builder.StartVector(4, len(v), 4)
for e in v[::-1]:
builder.PrependFloat32(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def write_offset_vector(self, v):
builder = self.builder
builder.StartVector(4, len(v), 4)
for e in v[::-1]:
builder.PrependUOffsetTRelative(e)
- return builder.EndVector(len(v))
+ return builder.EndVector()
def assign_buffers_to_tensors(self, tensors, scratch_tensor):
if scratch_tensor is not None:
@@ -389,13 +389,15 @@ class TFLiteSerialiser:
def write_aligned_bytes(self, buf):
builder = self.builder
+ builder.assertNotNested()
builder.nested = True
data = bytes(buf)
length_bytes = UOffsetTFlags.py_type(len(data))
+ builder.vectorNumElems = length_bytes
builder.Prep(16, length_bytes) # Reserve aligned storage
builder.head = UOffsetTFlags.py_type(builder.Head() - length_bytes) # Update FlatBuffer internal pointer
builder.Bytes[builder.Head() : builder.Head() + length_bytes] = data # Assign bytes to aligned area
- return builder.EndVector(length_bytes)
+ return builder.EndVector()
def serialise_buffer(self, buf):
builder = self.builder
diff --git a/setup.py b/setup.py
index bc5ed0d6..b3011f86 100644
--- a/setup.py
+++ b/setup.py
@@ -93,7 +93,7 @@ setup(
package_data={"ethosu": ["config_files/*/*.ini"]},
python_requires="~=3.7",
install_requires=[
- "flatbuffers==1.12.0",
+ "flatbuffers==2.0.7",
"numpy<=1.21.3",
"lxml>=4.5.1",
],