diff options
author | Johan Alfvén <johan.alfven@arm.com> | 2022-07-19 12:26:32 +0200 |
---|---|---|
committer | Johan Alfvén <johan.alfven@arm.com> | 2022-07-19 12:29:35 +0200 |
commit | a9fba260ec050794bd24e968c3dbd4e202b9d643 (patch) | |
tree | b60fd29842a74481e8a5ffb1a533ec07f3a419a9 /ethosu/vela | |
parent | 1156317a8a8df1bc0c25a54db8475d84495f1a79 (diff) | |
download | ethos-u-vela-a9fba260ec050794bd24e968c3dbd4e202b9d643.tar.gz |
MLBEDSW-6710: Revert Tensorflow 2.9
Tensorflow 2.9 contains a bug for int16x8 without biases.
Revert "MLBEDSW-6635: Update to TensorFlow 2.9"
This reverts commit 93f492bae9c4dd16a1f64b851b237263695ee03e.
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Change-Id: I366d201ce4134a877d333be2aade546dfcb5d6d7
Diffstat (limited to 'ethosu/vela')
138 files changed, 3671 insertions, 683 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index db1c6f18..f3eace7e 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -241,7 +241,6 @@ class Op(Enum): Rank = OperatorInfo() ReduceSum = OperatorInfo(block_type=NpuBlockType.ReduceSum, indices=NNG_IFM_INDICES) Relu = OperatorInfo(indices=NNG_IFM_INDICES) - Relu0To1 = OperatorInfo(indices=NNG_IFM_INDICES) Relu6 = OperatorInfo(indices=NNG_IFM_INDICES) ReluN1To1 = OperatorInfo(indices=NNG_IFM_INDICES) ReluN = OperatorInfo(indices=NNG_IFM_INDICES) # TOSA specific @@ -320,7 +319,6 @@ class Op(Enum): Multinomial = OperatorInfo() Gelu = OperatorInfo() DynamicUpdateSlice = OperatorInfo() - UnsortedSegmentProd = OperatorInfo() @property def info(self): diff --git a/ethosu/vela/tflite/AbsOptions.py b/ethosu/vela/tflite/AbsOptions.py index 0cbfb8c0..4c259ac8 100644 --- a/ethosu/vela/tflite/AbsOptions.py +++ b/ethosu/vela/tflite/AbsOptions.py @@ -3,20 +3,36 @@ # 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 AbsOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def AbsOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def AbsOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/AddNOptions.py b/ethosu/vela/tflite/AddNOptions.py index b5c2ddb7..8d1381f7 100644 --- a/ethosu/vela/tflite/AddNOptions.py +++ b/ethosu/vela/tflite/AddNOptions.py @@ -3,20 +3,36 @@ # 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 AddNOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def AddNOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def AddNOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/AddOptions.py b/ethosu/vela/tflite/AddOptions.py index 154e6d18..dfb12b3e 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) @@ -32,7 +42,19 @@ class AddOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return True -def AddOptionsStart(builder): builder.StartObject(2) -def AddOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def AddOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1) -def AddOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def AddOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def AddOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1) +def AddOptionsAddPotScaleInt16(builder, potScaleInt16): + """This method is deprecated. Please switch to AddPotScaleInt16.""" + return AddPotScaleInt16(builder, potScaleInt16) +def End(builder): return builder.EndObject() +def AddOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ArgMaxOptions.py b/ethosu/vela/tflite/ArgMaxOptions.py index fbf1415e..e2f02667 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) @@ -25,6 +35,15 @@ class ArgMaxOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def ArgMaxOptionsStart(builder): builder.StartObject(1) -def ArgMaxOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) -def ArgMaxOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def ArgMaxOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) +def ArgMaxOptionsAddOutputType(builder, outputType): + """This method is deprecated. Please switch to AddOutputType.""" + return AddOutputType(builder, outputType) +def End(builder): return builder.EndObject() +def ArgMaxOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ArgMinOptions.py b/ethosu/vela/tflite/ArgMinOptions.py index 120fdca2..ffe6c982 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) @@ -25,6 +35,15 @@ class ArgMinOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def ArgMinOptionsStart(builder): builder.StartObject(1) -def ArgMinOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) -def ArgMinOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def ArgMinOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) +def ArgMinOptionsAddOutputType(builder, outputType): + """This method is deprecated. Please switch to AddOutputType.""" + return AddOutputType(builder, outputType) +def End(builder): return builder.EndObject() +def ArgMinOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/AssignVariableOptions.py b/ethosu/vela/tflite/AssignVariableOptions.py index f214bcb6..813ff5e6 100644 --- a/ethosu/vela/tflite/AssignVariableOptions.py +++ b/ethosu/vela/tflite/AssignVariableOptions.py @@ -3,20 +3,36 @@ # 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 AssignVariableOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def AssignVariableOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def AssignVariableOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BatchMatMulOptions.py b/ethosu/vela/tflite/BatchMatMulOptions.py index c0f755bd..a093ee5e 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) @@ -39,8 +49,23 @@ class BatchMatMulOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def BatchMatMulOptionsStart(builder): builder.StartObject(3) -def BatchMatMulOptionsAddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0) -def BatchMatMulOptionsAddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0) -def BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) -def BatchMatMulOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def BatchMatMulOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0) +def BatchMatMulOptionsAddAdjX(builder, adjX): + """This method is deprecated. Please switch to AddAdjX.""" + return AddAdjX(builder, adjX) +def AddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0) +def BatchMatMulOptionsAddAdjY(builder, adjY): + """This method is deprecated. Please switch to AddAdjY.""" + return AddAdjY(builder, adjY) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) +def BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def BatchMatMulOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BatchToSpaceNDOptions.py b/ethosu/vela/tflite/BatchToSpaceNDOptions.py index 3ddcfd3f..c6df0350 100644 --- a/ethosu/vela/tflite/BatchToSpaceNDOptions.py +++ b/ethosu/vela/tflite/BatchToSpaceNDOptions.py @@ -3,20 +3,36 @@ # 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 BatchToSpaceNDOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def BatchToSpaceNDOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def BatchToSpaceNDOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py index 0a0a83b7..f24b311e 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) @@ -60,11 +70,35 @@ class BidirectionalSequenceLSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def BidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(6) -def BidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def BidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) -def BidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) -def BidirectionalSequenceLSTMOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(3, mergeOutputs, 0) -def BidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(4, timeMajor, 1) -def BidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(5, asymmetricQuantizeInputs, 0) -def BidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(6) +def BidirectionalSequenceLSTMOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def BidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) +def BidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): + """This method is deprecated. Please switch to AddCellClip.""" + return AddCellClip(builder, cellClip) +def AddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) +def BidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): + """This method is deprecated. Please switch to AddProjClip.""" + return AddProjClip(builder, projClip) +def AddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(3, mergeOutputs, 0) +def BidirectionalSequenceLSTMOptionsAddMergeOutputs(builder, mergeOutputs): + """This method is deprecated. Please switch to AddMergeOutputs.""" + return AddMergeOutputs(builder, mergeOutputs) +def AddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(4, timeMajor, 1) +def BidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): + """This method is deprecated. Please switch to AddTimeMajor.""" + return AddTimeMajor(builder, timeMajor) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(5, asymmetricQuantizeInputs, 0) +def BidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def BidirectionalSequenceLSTMOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py index e1f66ce2..9e15c4b9 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) @@ -46,9 +56,27 @@ class BidirectionalSequenceRNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def BidirectionalSequenceRNNOptionsStart(builder): builder.StartObject(4) -def BidirectionalSequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0) -def BidirectionalSequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) -def BidirectionalSequenceRNNOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(2, mergeOutputs, 0) -def BidirectionalSequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0) -def BidirectionalSequenceRNNOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def BidirectionalSequenceRNNOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0) +def BidirectionalSequenceRNNOptionsAddTimeMajor(builder, timeMajor): + """This method is deprecated. Please switch to AddTimeMajor.""" + return AddTimeMajor(builder, timeMajor) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) +def BidirectionalSequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(2, mergeOutputs, 0) +def BidirectionalSequenceRNNOptionsAddMergeOutputs(builder, mergeOutputs): + """This method is deprecated. Please switch to AddMergeOutputs.""" + return AddMergeOutputs(builder, mergeOutputs) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0) +def BidirectionalSequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def BidirectionalSequenceRNNOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BroadcastToOptions.py b/ethosu/vela/tflite/BroadcastToOptions.py index 3b3dce85..55afcfac 100644 --- a/ethosu/vela/tflite/BroadcastToOptions.py +++ b/ethosu/vela/tflite/BroadcastToOptions.py @@ -3,20 +3,36 @@ # 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 BroadcastToOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def BroadcastToOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def BroadcastToOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BucketizeOptions.py b/ethosu/vela/tflite/BucketizeOptions.py index d4a87015..e54d8294 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,24 @@ class BucketizeOptions(object): return self._tab.VectorLen(o) return 0 -def BucketizeOptionsStart(builder): builder.StartObject(1) -def BucketizeOptionsAddBoundaries(builder, boundaries): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(boundaries), 0) -def BucketizeOptionsStartBoundariesVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def BucketizeOptionsEnd(builder): return builder.EndObject() + # BucketizeOptions + def BoundariesIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def BucketizeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddBoundaries(builder, boundaries): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(boundaries), 0) +def BucketizeOptionsAddBoundaries(builder, boundaries): + """This method is deprecated. Please switch to AddBoundaries.""" + return AddBoundaries(builder, boundaries) +def StartBoundariesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def BucketizeOptionsStartBoundariesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartBoundariesVector(builder, numElems) +def End(builder): return builder.EndObject() +def BucketizeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Buffer.py b/ethosu/vela/tflite/Buffer.py index 754dee3b..ea2abede 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,24 @@ class Buffer(object): return self._tab.VectorLen(o) return 0 -def BufferStart(builder): builder.StartObject(1) -def BufferAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def BufferStartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def BufferEnd(builder): return builder.EndObject() + # Buffer + def DataIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def BufferStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) +def BufferAddData(builder, data): + """This method is deprecated. Please switch to AddData.""" + return AddData(builder, data) +def StartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def BufferStartDataVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartDataVector(builder, numElems) +def End(builder): return builder.EndObject() +def BufferEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/BuiltinOperator.py b/ethosu/vela/tflite/BuiltinOperator.py index 4004a3b0..5ddcf202 100644 --- a/ethosu/vela/tflite/BuiltinOperator.py +++ b/ethosu/vela/tflite/BuiltinOperator.py @@ -155,6 +155,4 @@ class BuiltinOperator(object): MULTINOMIAL = 149 GELU = 150 DYNAMIC_UPDATE_SLICE = 151 - RELU_0_TO_1 = 152 - UNSORTED_SEGMENT_PROD = 153 diff --git a/ethosu/vela/tflite/BuiltinOptions.py b/ethosu/vela/tflite/BuiltinOptions.py index 2ab36db6..4358605c 100644 --- a/ethosu/vela/tflite/BuiltinOptions.py +++ b/ethosu/vela/tflite/BuiltinOptions.py @@ -121,5 +121,4 @@ class BuiltinOptions(object): BucketizeOptions = 115 GeluOptions = 116 DynamicUpdateSliceOptions = 117 - UnsortedSegmentProdOptions = 118 diff --git a/ethosu/vela/tflite/CallOnceOptions.py b/ethosu/vela/tflite/CallOnceOptions.py index 6a687913..f43715fa 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) @@ -25,6 +35,15 @@ class CallOnceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def CallOnceOptionsStart(builder): builder.StartObject(1) -def CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex): builder.PrependInt32Slot(0, initSubgraphIndex, 0) -def CallOnceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def CallOnceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddInitSubgraphIndex(builder, initSubgraphIndex): builder.PrependInt32Slot(0, initSubgraphIndex, 0) +def CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex): + """This method is deprecated. Please switch to AddInitSubgraphIndex.""" + return AddInitSubgraphIndex(builder, initSubgraphIndex) +def End(builder): return builder.EndObject() +def CallOnceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/CallOptions.py b/ethosu/vela/tflite/CallOptions.py index 5ae2eeae..c3b2eec4 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) @@ -25,6 +35,15 @@ class CallOptions(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -def CallOptionsStart(builder): builder.StartObject(1) -def CallOptionsAddSubgraph(builder, subgraph): builder.PrependUint32Slot(0, subgraph, 0) -def CallOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def CallOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddSubgraph(builder, subgraph): builder.PrependUint32Slot(0, subgraph, 0) +def CallOptionsAddSubgraph(builder, subgraph): + """This method is deprecated. Please switch to AddSubgraph.""" + return AddSubgraph(builder, subgraph) +def End(builder): return builder.EndObject() +def CallOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/CastOptions.py b/ethosu/vela/tflite/CastOptions.py index 70ae2e37..9060b51f 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) @@ -32,7 +42,19 @@ class CastOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def CastOptionsStart(builder): builder.StartObject(2) -def CastOptionsAddInDataType(builder, inDataType): builder.PrependInt8Slot(0, inDataType, 0) -def CastOptionsAddOutDataType(builder, outDataType): builder.PrependInt8Slot(1, outDataType, 0) -def CastOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def CastOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddInDataType(builder, inDataType): builder.PrependInt8Slot(0, inDataType, 0) +def CastOptionsAddInDataType(builder, inDataType): + """This method is deprecated. Please switch to AddInDataType.""" + return AddInDataType(builder, inDataType) +def AddOutDataType(builder, outDataType): builder.PrependInt8Slot(1, outDataType, 0) +def CastOptionsAddOutDataType(builder, outDataType): + """This method is deprecated. Please switch to AddOutDataType.""" + return AddOutDataType(builder, outDataType) +def End(builder): return builder.EndObject() +def CastOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py index 9d26c510..250f7544 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,36 @@ class ConcatEmbeddingsOptions(object): return self._tab.VectorLen(o) return 0 -def ConcatEmbeddingsOptionsStart(builder): builder.StartObject(3) -def ConcatEmbeddingsOptionsAddNumChannels(builder, numChannels): builder.PrependInt32Slot(0, numChannels, 0) -def ConcatEmbeddingsOptionsAddNumColumnsPerChannel(builder, numColumnsPerChannel): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(numColumnsPerChannel), 0) -def ConcatEmbeddingsOptionsStartNumColumnsPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ConcatEmbeddingsOptionsAddEmbeddingDimPerChannel(builder, embeddingDimPerChannel): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(embeddingDimPerChannel), 0) -def ConcatEmbeddingsOptionsStartEmbeddingDimPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ConcatEmbeddingsOptionsEnd(builder): return builder.EndObject() + # ConcatEmbeddingsOptions + def EmbeddingDimPerChannelIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + return o == 0 + +def Start(builder): builder.StartObject(3) +def ConcatEmbeddingsOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNumChannels(builder, numChannels): builder.PrependInt32Slot(0, numChannels, 0) +def ConcatEmbeddingsOptionsAddNumChannels(builder, numChannels): + """This method is deprecated. Please switch to AddNumChannels.""" + return AddNumChannels(builder, numChannels) +def AddNumColumnsPerChannel(builder, numColumnsPerChannel): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(numColumnsPerChannel), 0) +def ConcatEmbeddingsOptionsAddNumColumnsPerChannel(builder, numColumnsPerChannel): + """This method is deprecated. Please switch to AddNumColumnsPerChannel.""" + return AddNumColumnsPerChannel(builder, numColumnsPerChannel) +def StartNumColumnsPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ConcatEmbeddingsOptionsStartNumColumnsPerChannelVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartNumColumnsPerChannelVector(builder, numElems) +def AddEmbeddingDimPerChannel(builder, embeddingDimPerChannel): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(embeddingDimPerChannel), 0) +def ConcatEmbeddingsOptionsAddEmbeddingDimPerChannel(builder, embeddingDimPerChannel): + """This method is deprecated. Please switch to AddEmbeddingDimPerChannel.""" + return AddEmbeddingDimPerChannel(builder, embeddingDimPerChannel) +def StartEmbeddingDimPerChannelVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ConcatEmbeddingsOptionsStartEmbeddingDimPerChannelVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartEmbeddingDimPerChannelVector(builder, numElems) +def End(builder): return builder.EndObject() +def ConcatEmbeddingsOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ConcatenationOptions.py b/ethosu/vela/tflite/ConcatenationOptions.py index c8e0b6ab..19f76800 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) @@ -32,7 +42,19 @@ class ConcatenationOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def ConcatenationOptionsStart(builder): builder.StartObject(2) -def ConcatenationOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) -def ConcatenationOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) -def ConcatenationOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def ConcatenationOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) +def ConcatenationOptionsAddAxis(builder, axis): + """This method is deprecated. Please switch to AddAxis.""" + return AddAxis(builder, axis) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) +def ConcatenationOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def End(builder): return builder.EndObject() +def ConcatenationOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Conv2DOptions.py b/ethosu/vela/tflite/Conv2DOptions.py index ef49f751..33a8569d 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) @@ -60,11 +70,35 @@ class Conv2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -def Conv2DOptionsStart(builder): builder.StartObject(6) -def Conv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) -def Conv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) -def Conv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) -def Conv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(3, fusedActivationFunction, 0) -def Conv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(4, dilationWFactor, 1) -def Conv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(5, dilationHFactor, 1) -def Conv2DOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(6) +def Conv2DOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) +def Conv2DOptionsAddPadding(builder, padding): + """This method is deprecated. Please switch to AddPadding.""" + return AddPadding(builder, padding) +def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) +def Conv2DOptionsAddStrideW(builder, strideW): + """This method is deprecated. Please switch to AddStrideW.""" + return AddStrideW(builder, strideW) +def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) +def Conv2DOptionsAddStrideH(builder, strideH): + """This method is deprecated. Please switch to AddStrideH.""" + return AddStrideH(builder, strideH) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(3, fusedActivationFunction, 0) +def Conv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(4, dilationWFactor, 1) +def Conv2DOptionsAddDilationWFactor(builder, dilationWFactor): + """This method is deprecated. Please switch to AddDilationWFactor.""" + return AddDilationWFactor(builder, dilationWFactor) +def AddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(5, dilationHFactor, 1) +def Conv2DOptionsAddDilationHFactor(builder, dilationHFactor): + """This method is deprecated. Please switch to AddDilationHFactor.""" + return AddDilationHFactor(builder, dilationHFactor) +def End(builder): return builder.EndObject() +def Conv2DOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Conv3DOptions.py b/ethosu/vela/tflite/Conv3DOptions.py index e8f4ab2d..849df22e 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) @@ -74,13 +84,43 @@ class Conv3DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -def Conv3DOptionsStart(builder): builder.StartObject(8) -def Conv3DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) -def Conv3DOptionsAddStrideD(builder, strideD): builder.PrependInt32Slot(1, strideD, 0) -def Conv3DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(2, strideW, 0) -def Conv3DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(3, strideH, 0) -def Conv3DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0) -def Conv3DOptionsAddDilationDFactor(builder, dilationDFactor): builder.PrependInt32Slot(5, dilationDFactor, 1) -def Conv3DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(6, dilationWFactor, 1) -def Conv3DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(7, dilationHFactor, 1) -def Conv3DOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(8) +def Conv3DOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) +def Conv3DOptionsAddPadding(builder, padding): + """This method is deprecated. Please switch to AddPadding.""" + return AddPadding(builder, padding) +def AddStrideD(builder, strideD): builder.PrependInt32Slot(1, strideD, 0) +def Conv3DOptionsAddStrideD(builder, strideD): + """This method is deprecated. Please switch to AddStrideD.""" + return AddStrideD(builder, strideD) +def AddStrideW(builder, strideW): builder.PrependInt32Slot(2, strideW, 0) +def Conv3DOptionsAddStrideW(builder, strideW): + """This method is deprecated. Please switch to AddStrideW.""" + return AddStrideW(builder, strideW) +def AddStrideH(builder, strideH): builder.PrependInt32Slot(3, strideH, 0) +def Conv3DOptionsAddStrideH(builder, strideH): + """This method is deprecated. Please switch to AddStrideH.""" + return AddStrideH(builder, strideH) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0) +def Conv3DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddDilationDFactor(builder, dilationDFactor): builder.PrependInt32Slot(5, dilationDFactor, 1) +def Conv3DOptionsAddDilationDFactor(builder, dilationDFactor): + """This method is deprecated. Please switch to AddDilationDFactor.""" + return AddDilationDFactor(builder, dilationDFactor) +def AddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(6, dilationWFactor, 1) +def Conv3DOptionsAddDilationWFactor(builder, dilationWFactor): + """This method is deprecated. Please switch to AddDilationWFactor.""" + return AddDilationWFactor(builder, dilationWFactor) +def AddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(7, dilationHFactor, 1) +def Conv3DOptionsAddDilationHFactor(builder, dilationHFactor): + """This method is deprecated. Please switch to AddDilationHFactor.""" + return AddDilationHFactor(builder, dilationHFactor) +def End(builder): return builder.EndObject() +def Conv3DOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/CosOptions.py b/ethosu/vela/tflite/CosOptions.py index 7fbf8487..6f03822a 100644 --- a/ethosu/vela/tflite/CosOptions.py +++ b/ethosu/vela/tflite/CosOptions.py @@ -3,20 +3,36 @@ # 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 CosOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def CosOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def CosOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/CumsumOptions.py b/ethosu/vela/tflite/CumsumOptions.py index 33e086ef..66410f16 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) @@ -32,7 +42,19 @@ class CumsumOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def CumsumOptionsStart(builder): builder.StartObject(2) -def CumsumOptionsAddExclusive(builder, exclusive): builder.PrependBoolSlot(0, exclusive, 0) -def CumsumOptionsAddReverse(builder, reverse): builder.PrependBoolSlot(1, reverse, 0) -def CumsumOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def CumsumOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddExclusive(builder, exclusive): builder.PrependBoolSlot(0, exclusive, 0) +def CumsumOptionsAddExclusive(builder, exclusive): + """This method is deprecated. Please switch to AddExclusive.""" + return AddExclusive(builder, exclusive) +def AddReverse(builder, reverse): builder.PrependBoolSlot(1, reverse, 0) +def CumsumOptionsAddReverse(builder, reverse): + """This method is deprecated. Please switch to AddReverse.""" + return AddReverse(builder, reverse) +def End(builder): return builder.EndObject() +def CumsumOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/CustomQuantization.py b/ethosu/vela/tflite/CustomQuantization.py index 21ec0da4..c04c280e 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,24 @@ class CustomQuantization(object): return self._tab.VectorLen(o) return 0 -def CustomQuantizationStart(builder): builder.StartObject(1) -def CustomQuantizationAddCustom(builder, custom): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(custom), 0) -def CustomQuantizationStartCustomVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def CustomQuantizationEnd(builder): return builder.EndObject() + # CustomQuantization + def CustomIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def CustomQuantizationStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddCustom(builder, custom): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(custom), 0) +def CustomQuantizationAddCustom(builder, custom): + """This method is deprecated. Please switch to AddCustom.""" + return AddCustom(builder, custom) +def StartCustomVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def CustomQuantizationStartCustomVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartCustomVector(builder, numElems) +def End(builder): return builder.EndObject() +def CustomQuantizationEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DensifyOptions.py b/ethosu/vela/tflite/DensifyOptions.py index 12cbfb29..aa8ff7f3 100644 --- a/ethosu/vela/tflite/DensifyOptions.py +++ b/ethosu/vela/tflite/DensifyOptions.py @@ -3,20 +3,36 @@ # 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 DensifyOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def DensifyOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def DensifyOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DepthToSpaceOptions.py b/ethosu/vela/tflite/DepthToSpaceOptions.py index 97b93aa7..46a46e8c 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) @@ -25,6 +35,15 @@ class DepthToSpaceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def DepthToSpaceOptionsStart(builder): builder.StartObject(1) -def DepthToSpaceOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) -def DepthToSpaceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def DepthToSpaceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) +def DepthToSpaceOptionsAddBlockSize(builder, blockSize): + """This method is deprecated. Please switch to AddBlockSize.""" + return AddBlockSize(builder, blockSize) +def End(builder): return builder.EndObject() +def DepthToSpaceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DepthwiseConv2DOptions.py b/ethosu/vela/tflite/DepthwiseConv2DOptions.py index 9689383b..9a07d1a8 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) @@ -67,12 +77,39 @@ class DepthwiseConv2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -def DepthwiseConv2DOptionsStart(builder): builder.StartObject(7) -def DepthwiseConv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) -def DepthwiseConv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) -def DepthwiseConv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) -def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0) -def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0) -def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1) -def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1) -def DepthwiseConv2DOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(7) +def DepthwiseConv2DOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) +def DepthwiseConv2DOptionsAddPadding(builder, padding): + """This method is deprecated. Please switch to AddPadding.""" + return AddPadding(builder, padding) +def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) +def DepthwiseConv2DOptionsAddStrideW(builder, strideW): + """This method is deprecated. Please switch to AddStrideW.""" + return AddStrideW(builder, strideW) +def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) +def DepthwiseConv2DOptionsAddStrideH(builder, strideH): + """This method is deprecated. Please switch to AddStrideH.""" + return AddStrideH(builder, strideH) +def AddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0) +def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier): + """This method is deprecated. Please switch to AddDepthMultiplier.""" + return AddDepthMultiplier(builder, depthMultiplier) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0) +def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1) +def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor): + """This method is deprecated. Please switch to AddDilationWFactor.""" + return AddDilationWFactor(builder, dilationWFactor) +def AddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1) +def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor): + """This method is deprecated. Please switch to AddDilationHFactor.""" + return AddDilationHFactor(builder, dilationHFactor) +def End(builder): return builder.EndObject() +def DepthwiseConv2DOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DequantizeOptions.py b/ethosu/vela/tflite/DequantizeOptions.py index 5ef8b8dd..1eb6842a 100644 --- a/ethosu/vela/tflite/DequantizeOptions.py +++ b/ethosu/vela/tflite/DequantizeOptions.py @@ -3,20 +3,36 @@ # 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 DequantizeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def DequantizeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def DequantizeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DimensionMetadata.py b/ethosu/vela/tflite/DimensionMetadata.py index c9fe7cd6..86a3cc6b 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) @@ -66,11 +76,35 @@ class DimensionMetadata(object): return obj return None -def DimensionMetadataStart(builder): builder.StartObject(6) -def DimensionMetadataAddFormat(builder, format): builder.PrependInt8Slot(0, format, 0) -def DimensionMetadataAddDenseSize(builder, denseSize): builder.PrependInt32Slot(1, denseSize, 0) -def DimensionMetadataAddArraySegmentsType(builder, arraySegmentsType): builder.PrependUint8Slot(2, arraySegmentsType, 0) -def DimensionMetadataAddArraySegments(builder, arraySegments): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(arraySegments), 0) -def DimensionMetadataAddArrayIndicesType(builder, arrayIndicesType): builder.PrependUint8Slot(4, arrayIndicesType, 0) -def DimensionMetadataAddArrayIndices(builder, arrayIndices): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(arrayIndices), 0) -def DimensionMetadataEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(6) +def DimensionMetadataStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFormat(builder, format): builder.PrependInt8Slot(0, format, 0) +def DimensionMetadataAddFormat(builder, format): + """This method is deprecated. Please switch to AddFormat.""" + return AddFormat(builder, format) +def AddDenseSize(builder, denseSize): builder.PrependInt32Slot(1, denseSize, 0) +def DimensionMetadataAddDenseSize(builder, denseSize): + """This method is deprecated. Please switch to AddDenseSize.""" + return AddDenseSize(builder, denseSize) +def AddArraySegmentsType(builder, arraySegmentsType): builder.PrependUint8Slot(2, arraySegmentsType, 0) +def DimensionMetadataAddArraySegmentsType(builder, arraySegmentsType): + """This method is deprecated. Please switch to AddArraySegmentsType.""" + return AddArraySegmentsType(builder, arraySegmentsType) +def AddArraySegments(builder, arraySegments): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(arraySegments), 0) +def DimensionMetadataAddArraySegments(builder, arraySegments): + """This method is deprecated. Please switch to AddArraySegments.""" + return AddArraySegments(builder, arraySegments) +def AddArrayIndicesType(builder, arrayIndicesType): builder.PrependUint8Slot(4, arrayIndicesType, 0) +def DimensionMetadataAddArrayIndicesType(builder, arrayIndicesType): + """This method is deprecated. Please switch to AddArrayIndicesType.""" + return AddArrayIndicesType(builder, arrayIndicesType) +def AddArrayIndices(builder, arrayIndices): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(arrayIndices), 0) +def DimensionMetadataAddArrayIndices(builder, arrayIndices): + """This method is deprecated. Please switch to AddArrayIndices.""" + return AddArrayIndices(builder, arrayIndices) +def End(builder): return builder.EndObject() +def DimensionMetadataEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DivOptions.py b/ethosu/vela/tflite/DivOptions.py index 905a3be0..d05746ef 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) @@ -25,6 +35,15 @@ class DivOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def DivOptionsStart(builder): builder.StartObject(1) -def DivOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def DivOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def DivOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def DivOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def End(builder): return builder.EndObject() +def DivOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py index 80d55398..232b55d8 100644 --- a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py +++ b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py @@ -3,20 +3,36 @@ # 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 DynamicUpdateSliceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def DynamicUpdateSliceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def DynamicUpdateSliceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py index 7d9c1442..9ee57a1f 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) @@ -25,6 +35,15 @@ class EmbeddingLookupSparseOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def EmbeddingLookupSparseOptionsStart(builder): builder.StartObject(1) -def EmbeddingLookupSparseOptionsAddCombiner(builder, combiner): builder.PrependInt8Slot(0, combiner, 0) -def EmbeddingLookupSparseOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def EmbeddingLookupSparseOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddCombiner(builder, combiner): builder.PrependInt8Slot(0, combiner, 0) +def EmbeddingLookupSparseOptionsAddCombiner(builder, combiner): + """This method is deprecated. Please switch to AddCombiner.""" + return AddCombiner(builder, combiner) +def End(builder): return builder.EndObject() +def EmbeddingLookupSparseOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/EqualOptions.py b/ethosu/vela/tflite/EqualOptions.py index f787ef85..c616d258 100644 --- a/ethosu/vela/tflite/EqualOptions.py +++ b/ethosu/vela/tflite/EqualOptions.py @@ -3,20 +3,36 @@ # 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 EqualOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def EqualOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def EqualOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ExpOptions.py b/ethosu/vela/tflite/ExpOptions.py index eac1456e..ca17de00 100644 --- a/ethosu/vela/tflite/ExpOptions.py +++ b/ethosu/vela/tflite/ExpOptions.py @@ -3,20 +3,36 @@ # 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 ExpOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ExpOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ExpOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ExpandDimsOptions.py b/ethosu/vela/tflite/ExpandDimsOptions.py index 69d63665..5e38a0d3 100644 --- a/ethosu/vela/tflite/ExpandDimsOptions.py +++ b/ethosu/vela/tflite/ExpandDimsOptions.py @@ -3,20 +3,36 @@ # 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 ExpandDimsOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ExpandDimsOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ExpandDimsOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/FakeQuantOptions.py b/ethosu/vela/tflite/FakeQuantOptions.py index 46c371c3..43d5a780 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) @@ -46,9 +56,27 @@ class FakeQuantOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def FakeQuantOptionsStart(builder): builder.StartObject(4) -def FakeQuantOptionsAddMin(builder, min): builder.PrependFloat32Slot(0, min, 0.0) -def FakeQuantOptionsAddMax(builder, max): builder.PrependFloat32Slot(1, max, 0.0) -def FakeQuantOptionsAddNumBits(builder, numBits): builder.PrependInt32Slot(2, numBits, 0) -def FakeQuantOptionsAddNarrowRange(builder, narrowRange): builder.PrependBoolSlot(3, narrowRange, 0) -def FakeQuantOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def FakeQuantOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddMin(builder, min): builder.PrependFloat32Slot(0, min, 0.0) +def FakeQuantOptionsAddMin(builder, min): + """This method is deprecated. Please switch to AddMin.""" + return AddMin(builder, min) +def AddMax(builder, max): builder.PrependFloat32Slot(1, max, 0.0) +def FakeQuantOptionsAddMax(builder, max): + """This method is deprecated. Please switch to AddMax.""" + return AddMax(builder, max) +def AddNumBits(builder, numBits): builder.PrependInt32Slot(2, numBits, 0) +def FakeQuantOptionsAddNumBits(builder, numBits): + """This method is deprecated. Please switch to AddNumBits.""" + return AddNumBits(builder, numBits) +def AddNarrowRange(builder, narrowRange): builder.PrependBoolSlot(3, narrowRange, 0) +def FakeQuantOptionsAddNarrowRange(builder, narrowRange): + """This method is deprecated. Please switch to AddNarrowRange.""" + return AddNarrowRange(builder, narrowRange) +def End(builder): return builder.EndObject() +def FakeQuantOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/FillOptions.py b/ethosu/vela/tflite/FillOptions.py index 5a1e651a..bc2bcd28 100644 --- a/ethosu/vela/tflite/FillOptions.py +++ b/ethosu/vela/tflite/FillOptions.py @@ -3,20 +3,36 @@ # 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 FillOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def FillOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def FillOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/FloorDivOptions.py b/ethosu/vela/tflite/FloorDivOptions.py index 64b474fb..3fed6755 100644 --- a/ethosu/vela/tflite/FloorDivOptions.py +++ b/ethosu/vela/tflite/FloorDivOptions.py @@ -3,20 +3,36 @@ # 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 FloorDivOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def FloorDivOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def FloorDivOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/FloorModOptions.py b/ethosu/vela/tflite/FloorModOptions.py index 37c8e5a5..df3b2c3d 100644 --- a/ethosu/vela/tflite/FloorModOptions.py +++ b/ethosu/vela/tflite/FloorModOptions.py @@ -3,20 +3,36 @@ # 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 FloorModOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def FloorModOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def FloorModOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/FullyConnectedOptions.py b/ethosu/vela/tflite/FullyConnectedOptions.py index 5475e3d9..72ae00ba 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) @@ -46,9 +56,27 @@ class FullyConnectedOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def FullyConnectedOptionsStart(builder): builder.StartObject(4) -def FullyConnectedOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def FullyConnectedOptionsAddWeightsFormat(builder, weightsFormat): builder.PrependInt8Slot(1, weightsFormat, 0) -def FullyConnectedOptionsAddKeepNumDims(builder, keepNumDims): builder.PrependBoolSlot(2, keepNumDims, 0) -def FullyConnectedOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0) -def FullyConnectedOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def FullyConnectedOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def FullyConnectedOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddWeightsFormat(builder, weightsFormat): builder.PrependInt8Slot(1, weightsFormat, 0) +def FullyConnectedOptionsAddWeightsFormat(builder, weightsFormat): + """This method is deprecated. Please switch to AddWeightsFormat.""" + return AddWeightsFormat(builder, weightsFormat) +def AddKeepNumDims(builder, keepNumDims): builder.PrependBoolSlot(2, keepNumDims, 0) +def FullyConnectedOptionsAddKeepNumDims(builder, keepNumDims): + """This method is deprecated. Please switch to AddKeepNumDims.""" + return AddKeepNumDims(builder, keepNumDims) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0) +def FullyConnectedOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def FullyConnectedOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/GatherNdOptions.py b/ethosu/vela/tflite/GatherNdOptions.py index f515eb5c..8d76f402 100644 --- a/ethosu/vela/tflite/GatherNdOptions.py +++ b/ethosu/vela/tflite/GatherNdOptions.py @@ -3,20 +3,36 @@ # 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 GatherNdOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def GatherNdOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def GatherNdOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/GatherOptions.py b/ethosu/vela/tflite/GatherOptions.py index fd933219..2235e07c 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) @@ -32,7 +42,19 @@ class GatherOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def GatherOptionsStart(builder): builder.StartObject(2) -def GatherOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) -def GatherOptionsAddBatchDims(builder, batchDims): builder.PrependInt32Slot(1, batchDims, 0) -def GatherOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def GatherOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) +def GatherOptionsAddAxis(builder, axis): + """This method is deprecated. Please switch to AddAxis.""" + return AddAxis(builder, axis) +def AddBatchDims(builder, batchDims): builder.PrependInt32Slot(1, batchDims, 0) +def GatherOptionsAddBatchDims(builder, batchDims): + """This method is deprecated. Please switch to AddBatchDims.""" + return AddBatchDims(builder, batchDims) +def End(builder): return builder.EndObject() +def GatherOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/GeluOptions.py b/ethosu/vela/tflite/GeluOptions.py index 3705084d..71b9a32b 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) @@ -25,6 +35,15 @@ class GeluOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def GeluOptionsStart(builder): builder.StartObject(1) -def GeluOptionsAddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0) -def GeluOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def GeluOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0) +def GeluOptionsAddApproximate(builder, approximate): + """This method is deprecated. Please switch to AddApproximate.""" + return AddApproximate(builder, approximate) +def End(builder): return builder.EndObject() +def GeluOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/GreaterEqualOptions.py b/ethosu/vela/tflite/GreaterEqualOptions.py index a29e200a..c1606565 100644 --- a/ethosu/vela/tflite/GreaterEqualOptions.py +++ b/ethosu/vela/tflite/GreaterEqualOptions.py @@ -3,20 +3,36 @@ # 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 GreaterEqualOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def GreaterEqualOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def GreaterEqualOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/GreaterOptions.py b/ethosu/vela/tflite/GreaterOptions.py index 59d63501..6904bb92 100644 --- a/ethosu/vela/tflite/GreaterOptions.py +++ b/ethosu/vela/tflite/GreaterOptions.py @@ -3,20 +3,36 @@ # 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 GreaterOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def GreaterOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def GreaterOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/HardSwishOptions.py b/ethosu/vela/tflite/HardSwishOptions.py index 4f6a5200..6903501c 100644 --- a/ethosu/vela/tflite/HardSwishOptions.py +++ b/ethosu/vela/tflite/HardSwishOptions.py @@ -3,20 +3,36 @@ # 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 HardSwishOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def HardSwishOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def HardSwishOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/HashtableFindOptions.py b/ethosu/vela/tflite/HashtableFindOptions.py index fa9d31d1..5dcb5339 100644 --- a/ethosu/vela/tflite/HashtableFindOptions.py +++ b/ethosu/vela/tflite/HashtableFindOptions.py @@ -3,20 +3,36 @@ # 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 HashtableFindOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def HashtableFindOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def HashtableFindOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/HashtableImportOptions.py b/ethosu/vela/tflite/HashtableImportOptions.py index cd72df49..846f76ec 100644 --- a/ethosu/vela/tflite/HashtableImportOptions.py +++ b/ethosu/vela/tflite/HashtableImportOptions.py @@ -3,20 +3,36 @@ # 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 HashtableImportOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def HashtableImportOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def HashtableImportOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/HashtableOptions.py b/ethosu/vela/tflite/HashtableOptions.py index acdd9daa..2bc1a877 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) @@ -39,8 +49,23 @@ class HashtableOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def HashtableOptionsStart(builder): builder.StartObject(3) -def HashtableOptionsAddTableId(builder, tableId): builder.PrependInt32Slot(0, tableId, 0) -def HashtableOptionsAddKeyDtype(builder, keyDtype): builder.PrependInt8Slot(1, keyDtype, 0) -def HashtableOptionsAddValueDtype(builder, valueDtype): builder.PrependInt8Slot(2, valueDtype, 0) -def HashtableOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def HashtableOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddTableId(builder, tableId): builder.PrependInt32Slot(0, tableId, 0) +def HashtableOptionsAddTableId(builder, tableId): + """This method is deprecated. Please switch to AddTableId.""" + return AddTableId(builder, tableId) +def AddKeyDtype(builder, keyDtype): builder.PrependInt8Slot(1, keyDtype, 0) +def HashtableOptionsAddKeyDtype(builder, keyDtype): + """This method is deprecated. Please switch to AddKeyDtype.""" + return AddKeyDtype(builder, keyDtype) +def AddValueDtype(builder, valueDtype): builder.PrependInt8Slot(2, valueDtype, 0) +def HashtableOptionsAddValueDtype(builder, valueDtype): + """This method is deprecated. Please switch to AddValueDtype.""" + return AddValueDtype(builder, valueDtype) +def End(builder): return builder.EndObject() +def HashtableOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/HashtableSizeOptions.py b/ethosu/vela/tflite/HashtableSizeOptions.py index b69650d1..5e71aa8e 100644 --- a/ethosu/vela/tflite/HashtableSizeOptions.py +++ b/ethosu/vela/tflite/HashtableSizeOptions.py @@ -3,20 +3,36 @@ # 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 HashtableSizeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def HashtableSizeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def HashtableSizeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/IfOptions.py b/ethosu/vela/tflite/IfOptions.py index 13f4e697..bdc56b2f 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) @@ -32,7 +42,19 @@ class IfOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def IfOptionsStart(builder): builder.StartObject(2) -def IfOptionsAddThenSubgraphIndex(builder, thenSubgraphIndex): builder.PrependInt32Slot(0, thenSubgraphIndex, 0) -def IfOptionsAddElseSubgraphIndex(builder, elseSubgraphIndex): builder.PrependInt32Slot(1, elseSubgraphIndex, 0) -def IfOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def IfOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddThenSubgraphIndex(builder, thenSubgraphIndex): builder.PrependInt32Slot(0, thenSubgraphIndex, 0) +def IfOptionsAddThenSubgraphIndex(builder, thenSubgraphIndex): + """This method is deprecated. Please switch to AddThenSubgraphIndex.""" + return AddThenSubgraphIndex(builder, thenSubgraphIndex) +def AddElseSubgraphIndex(builder, elseSubgraphIndex): builder.PrependInt32Slot(1, elseSubgraphIndex, 0) +def IfOptionsAddElseSubgraphIndex(builder, elseSubgraphIndex): + """This method is deprecated. Please switch to AddElseSubgraphIndex.""" + return AddElseSubgraphIndex(builder, elseSubgraphIndex) +def End(builder): return builder.EndObject() +def IfOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Int32Vector.py b/ethosu/vela/tflite/Int32Vector.py index e70851b2..bfa5b3a2 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,24 @@ class Int32Vector(object): return self._tab.VectorLen(o) return 0 -def Int32VectorStart(builder): builder.StartObject(1) -def Int32VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) -def Int32VectorStartValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Int32VectorEnd(builder): return builder.EndObject() + # Int32Vector + def ValuesIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def Int32VectorStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) +def Int32VectorAddValues(builder, values): + """This method is deprecated. Please switch to AddValues.""" + return AddValues(builder, values) +def StartValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def Int32VectorStartValuesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartValuesVector(builder, numElems) +def End(builder): return builder.EndObject() +def Int32VectorEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/L2NormOptions.py b/ethosu/vela/tflite/L2NormOptions.py index 38bdf573..6e033ca1 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) @@ -25,6 +35,15 @@ class L2NormOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def L2NormOptionsStart(builder): builder.StartObject(1) -def L2NormOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def L2NormOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def L2NormOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def L2NormOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def End(builder): return builder.EndObject() +def L2NormOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LSHProjectionOptions.py b/ethosu/vela/tflite/LSHProjectionOptions.py index ad550be2..569d1135 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) @@ -25,6 +35,15 @@ class LSHProjectionOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def LSHProjectionOptionsStart(builder): builder.StartObject(1) -def LSHProjectionOptionsAddType(builder, type): builder.PrependInt8Slot(0, type, 0) -def LSHProjectionOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def LSHProjectionOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddType(builder, type): builder.PrependInt8Slot(0, type, 0) +def LSHProjectionOptionsAddType(builder, type): + """This method is deprecated. Please switch to AddType.""" + return AddType(builder, type) +def End(builder): return builder.EndObject() +def LSHProjectionOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LSTMOptions.py b/ethosu/vela/tflite/LSTMOptions.py index 2f519bc2..04e2ac92 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) @@ -53,10 +63,31 @@ class LSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def LSTMOptionsStart(builder): builder.StartObject(5) -def LSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def LSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) -def LSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) -def LSTMOptionsAddKernelType(builder, kernelType): builder.PrependInt8Slot(3, kernelType, 0) -def LSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0) -def LSTMOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(5) +def LSTMOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def LSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) +def LSTMOptionsAddCellClip(builder, cellClip): + """This method is deprecated. Please switch to AddCellClip.""" + return AddCellClip(builder, cellClip) +def AddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) +def LSTMOptionsAddProjClip(builder, projClip): + """This method is deprecated. Please switch to AddProjClip.""" + return AddProjClip(builder, projClip) +def AddKernelType(builder, kernelType): builder.PrependInt8Slot(3, kernelType, 0) +def LSTMOptionsAddKernelType(builder, kernelType): + """This method is deprecated. Please switch to AddKernelType.""" + return AddKernelType(builder, kernelType) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0) +def LSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def LSTMOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LeakyReluOptions.py b/ethosu/vela/tflite/LeakyReluOptions.py index b61b21d5..ab4bfc24 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) @@ -25,6 +35,15 @@ class LeakyReluOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -def LeakyReluOptionsStart(builder): builder.StartObject(1) -def LeakyReluOptionsAddAlpha(builder, alpha): builder.PrependFloat32Slot(0, alpha, 0.0) -def LeakyReluOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def LeakyReluOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAlpha(builder, alpha): builder.PrependFloat32Slot(0, alpha, 0.0) +def LeakyReluOptionsAddAlpha(builder, alpha): + """This method is deprecated. Please switch to AddAlpha.""" + return AddAlpha(builder, alpha) +def End(builder): return builder.EndObject() +def LeakyReluOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LessEqualOptions.py b/ethosu/vela/tflite/LessEqualOptions.py index d49b7289..8861b8cf 100644 --- a/ethosu/vela/tflite/LessEqualOptions.py +++ b/ethosu/vela/tflite/LessEqualOptions.py @@ -3,20 +3,36 @@ # 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 LessEqualOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LessEqualOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LessEqualOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LessOptions.py b/ethosu/vela/tflite/LessOptions.py index 469cb0b0..a207b775 100644 --- a/ethosu/vela/tflite/LessOptions.py +++ b/ethosu/vela/tflite/LessOptions.py @@ -3,20 +3,36 @@ # 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 LessOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LessOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LessOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py index db875603..3831c873 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) @@ -46,9 +56,27 @@ class LocalResponseNormalizationOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -def LocalResponseNormalizationOptionsStart(builder): builder.StartObject(4) -def LocalResponseNormalizationOptionsAddRadius(builder, radius): builder.PrependInt32Slot(0, radius, 0) -def LocalResponseNormalizationOptionsAddBias(builder, bias): builder.PrependFloat32Slot(1, bias, 0.0) -def LocalResponseNormalizationOptionsAddAlpha(builder, alpha): builder.PrependFloat32Slot(2, alpha, 0.0) -def LocalResponseNormalizationOptionsAddBeta(builder, beta): builder.PrependFloat32Slot(3, beta, 0.0) -def LocalResponseNormalizationOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def LocalResponseNormalizationOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddRadius(builder, radius): builder.PrependInt32Slot(0, radius, 0) +def LocalResponseNormalizationOptionsAddRadius(builder, radius): + """This method is deprecated. Please switch to AddRadius.""" + return AddRadius(builder, radius) +def AddBias(builder, bias): builder.PrependFloat32Slot(1, bias, 0.0) +def LocalResponseNormalizationOptionsAddBias(builder, bias): + """This method is deprecated. Please switch to AddBias.""" + return AddBias(builder, bias) +def AddAlpha(builder, alpha): builder.PrependFloat32Slot(2, alpha, 0.0) +def LocalResponseNormalizationOptionsAddAlpha(builder, alpha): + """This method is deprecated. Please switch to AddAlpha.""" + return AddAlpha(builder, alpha) +def AddBeta(builder, beta): builder.PrependFloat32Slot(3, beta, 0.0) +def LocalResponseNormalizationOptionsAddBeta(builder, beta): + """This method is deprecated. Please switch to AddBeta.""" + return AddBeta(builder, beta) +def End(builder): return builder.EndObject() +def LocalResponseNormalizationOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LogSoftmaxOptions.py b/ethosu/vela/tflite/LogSoftmaxOptions.py index 47893855..9c88b4c7 100644 --- a/ethosu/vela/tflite/LogSoftmaxOptions.py +++ b/ethosu/vela/tflite/LogSoftmaxOptions.py @@ -3,20 +3,36 @@ # 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 LogSoftmaxOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LogSoftmaxOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LogSoftmaxOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LogicalAndOptions.py b/ethosu/vela/tflite/LogicalAndOptions.py index cee1cdb4..62d3025e 100644 --- a/ethosu/vela/tflite/LogicalAndOptions.py +++ b/ethosu/vela/tflite/LogicalAndOptions.py @@ -3,20 +3,36 @@ # 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 LogicalAndOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LogicalAndOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LogicalAndOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LogicalNotOptions.py b/ethosu/vela/tflite/LogicalNotOptions.py index 9971450c..2a793ccb 100644 --- a/ethosu/vela/tflite/LogicalNotOptions.py +++ b/ethosu/vela/tflite/LogicalNotOptions.py @@ -3,20 +3,36 @@ # 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 LogicalNotOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LogicalNotOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LogicalNotOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/LogicalOrOptions.py b/ethosu/vela/tflite/LogicalOrOptions.py index e94a5dec..6e9ec5b2 100644 --- a/ethosu/vela/tflite/LogicalOrOptions.py +++ b/ethosu/vela/tflite/LogicalOrOptions.py @@ -3,20 +3,36 @@ # 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 LogicalOrOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def LogicalOrOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def LogicalOrOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/MatrixDiagOptions.py b/ethosu/vela/tflite/MatrixDiagOptions.py index 0f64e657..f4a4a669 100644 --- a/ethosu/vela/tflite/MatrixDiagOptions.py +++ b/ethosu/vela/tflite/MatrixDiagOptions.py @@ -3,20 +3,36 @@ # 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 MatrixDiagOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def MatrixDiagOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def MatrixDiagOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/MatrixSetDiagOptions.py b/ethosu/vela/tflite/MatrixSetDiagOptions.py index 14178cf8..d0a93159 100644 --- a/ethosu/vela/tflite/MatrixSetDiagOptions.py +++ b/ethosu/vela/tflite/MatrixSetDiagOptions.py @@ -3,20 +3,36 @@ # 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 MatrixSetDiagOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def MatrixSetDiagOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def MatrixSetDiagOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/MaximumMinimumOptions.py b/ethosu/vela/tflite/MaximumMinimumOptions.py index f0806e2d..f5b91f8d 100644 --- a/ethosu/vela/tflite/MaximumMinimumOptions.py +++ b/ethosu/vela/tflite/MaximumMinimumOptions.py @@ -3,20 +3,36 @@ # 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 MaximumMinimumOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def MaximumMinimumOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def MaximumMinimumOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Metadata.py b/ethosu/vela/tflite/Metadata.py index 273e51ee..c0a83917 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) @@ -32,7 +42,19 @@ class Metadata(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -def MetadataStart(builder): builder.StartObject(2) -def MetadataAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def MetadataAddBuffer(builder, buffer): builder.PrependUint32Slot(1, buffer, 0) -def MetadataEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def MetadataStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def MetadataAddName(builder, name): + """This method is deprecated. Please switch to AddName.""" + return AddName(builder, name) +def AddBuffer(builder, buffer): builder.PrependUint32Slot(1, buffer, 0) +def MetadataAddBuffer(builder, buffer): + """This method is deprecated. Please switch to AddBuffer.""" + return AddBuffer(builder, buffer) +def End(builder): return builder.EndObject() +def MetadataEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/MirrorPadOptions.py b/ethosu/vela/tflite/MirrorPadOptions.py index 254ae217..76a0076a 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) @@ -25,6 +35,15 @@ class MirrorPadOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def MirrorPadOptionsStart(builder): builder.StartObject(1) -def MirrorPadOptionsAddMode(builder, mode): builder.PrependInt8Slot(0, mode, 0) -def MirrorPadOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def MirrorPadOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddMode(builder, mode): builder.PrependInt8Slot(0, mode, 0) +def MirrorPadOptionsAddMode(builder, mode): + """This method is deprecated. Please switch to AddMode.""" + return AddMode(builder, mode) +def End(builder): return builder.EndObject() +def MirrorPadOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Model.py b/ethosu/vela/tflite/Model.py index 52aac021..8a12d103 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,72 @@ class Model(object): return self._tab.VectorLen(o) return 0 -def ModelStart(builder): builder.StartObject(8) -def ModelAddVersion(builder, version): builder.PrependUint32Slot(0, version, 0) -def ModelAddOperatorCodes(builder, operatorCodes): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(operatorCodes), 0) -def ModelStartOperatorCodesVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelAddSubgraphs(builder, subgraphs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(subgraphs), 0) -def ModelStartSubgraphsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelAddDescription(builder, description): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(description), 0) -def ModelAddBuffers(builder, buffers): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(buffers), 0) -def ModelStartBuffersVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelAddMetadataBuffer(builder, metadataBuffer): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(metadataBuffer), 0) -def ModelStartMetadataBufferVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelAddMetadata(builder, metadata): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(metadata), 0) -def ModelStartMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelAddSignatureDefs(builder, signatureDefs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(signatureDefs), 0) -def ModelStartSignatureDefsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ModelEnd(builder): return builder.EndObject() + # Model + def SignatureDefsIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + return o == 0 + +def Start(builder): builder.StartObject(8) +def ModelStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddVersion(builder, version): builder.PrependUint32Slot(0, version, 0) +def ModelAddVersion(builder, version): + """This method is deprecated. Please switch to AddVersion.""" + return AddVersion(builder, version) +def AddOperatorCodes(builder, operatorCodes): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(operatorCodes), 0) +def ModelAddOperatorCodes(builder, operatorCodes): + """This method is deprecated. Please switch to AddOperatorCodes.""" + return AddOperatorCodes(builder, operatorCodes) +def StartOperatorCodesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartOperatorCodesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartOperatorCodesVector(builder, numElems) +def AddSubgraphs(builder, subgraphs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(subgraphs), 0) +def ModelAddSubgraphs(builder, subgraphs): + """This method is deprecated. Please switch to AddSubgraphs.""" + return AddSubgraphs(builder, subgraphs) +def StartSubgraphsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartSubgraphsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartSubgraphsVector(builder, numElems) +def AddDescription(builder, description): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(description), 0) +def ModelAddDescription(builder, description): + """This method is deprecated. Please switch to AddDescription.""" + return AddDescription(builder, description) +def AddBuffers(builder, buffers): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(buffers), 0) +def ModelAddBuffers(builder, buffers): + """This method is deprecated. Please switch to AddBuffers.""" + return AddBuffers(builder, buffers) +def StartBuffersVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartBuffersVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartBuffersVector(builder, numElems) +def AddMetadataBuffer(builder, metadataBuffer): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(metadataBuffer), 0) +def ModelAddMetadataBuffer(builder, metadataBuffer): + """This method is deprecated. Please switch to AddMetadataBuffer.""" + return AddMetadataBuffer(builder, metadataBuffer) +def StartMetadataBufferVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartMetadataBufferVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartMetadataBufferVector(builder, numElems) +def AddMetadata(builder, metadata): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(metadata), 0) +def ModelAddMetadata(builder, metadata): + """This method is deprecated. Please switch to AddMetadata.""" + return AddMetadata(builder, metadata) +def StartMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartMetadataVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartMetadataVector(builder, numElems) +def AddSignatureDefs(builder, signatureDefs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(signatureDefs), 0) +def ModelAddSignatureDefs(builder, signatureDefs): + """This method is deprecated. Please switch to AddSignatureDefs.""" + return AddSignatureDefs(builder, signatureDefs) +def StartSignatureDefsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ModelStartSignatureDefsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartSignatureDefsVector(builder, numElems) +def End(builder): return builder.EndObject() +def ModelEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/MulOptions.py b/ethosu/vela/tflite/MulOptions.py index 55b9506f..9ef9eb36 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) @@ -25,6 +35,15 @@ class MulOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def MulOptionsStart(builder): builder.StartObject(1) -def MulOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def MulOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def MulOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def MulOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def End(builder): return builder.EndObject() +def MulOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/NegOptions.py b/ethosu/vela/tflite/NegOptions.py index 05d55c26..62a544c0 100644 --- a/ethosu/vela/tflite/NegOptions.py +++ b/ethosu/vela/tflite/NegOptions.py @@ -3,20 +3,36 @@ # 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 NegOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def NegOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def NegOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py index 6ad10a2e..beb361da 100644 --- a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py +++ b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py @@ -3,20 +3,36 @@ # 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 NonMaxSuppressionV4OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def NonMaxSuppressionV4OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def NonMaxSuppressionV4OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py index 99cbdbbf..1c87108d 100644 --- a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py +++ b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py @@ -3,20 +3,36 @@ # 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 NonMaxSuppressionV5OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def NonMaxSuppressionV5OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def NonMaxSuppressionV5OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/NotEqualOptions.py b/ethosu/vela/tflite/NotEqualOptions.py index 4c511e93..54652705 100644 --- a/ethosu/vela/tflite/NotEqualOptions.py +++ b/ethosu/vela/tflite/NotEqualOptions.py @@ -3,20 +3,36 @@ # 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 NotEqualOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def NotEqualOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def NotEqualOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/OneHotOptions.py b/ethosu/vela/tflite/OneHotOptions.py index 793a3e75..a4de3e4b 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) @@ -25,6 +35,15 @@ class OneHotOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def OneHotOptionsStart(builder): builder.StartObject(1) -def OneHotOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) -def OneHotOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def OneHotOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) +def OneHotOptionsAddAxis(builder, axis): + """This method is deprecated. Please switch to AddAxis.""" + return AddAxis(builder, axis) +def End(builder): return builder.EndObject() +def OneHotOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py index cbae3dab..ce23bedc 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,72 @@ class Operator(object): return self._tab.VectorLen(o) return 0 -def OperatorStart(builder): builder.StartObject(9) -def OperatorAddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0) -def OperatorAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) -def OperatorStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def OperatorAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) -def OperatorStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def OperatorAddBuiltinOptionsType(builder, builtinOptionsType): builder.PrependUint8Slot(3, builtinOptionsType, 0) -def OperatorAddBuiltinOptions(builder, builtinOptions): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(builtinOptions), 0) -def OperatorAddCustomOptions(builder, customOptions): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(customOptions), 0) -def OperatorStartCustomOptionsVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def OperatorAddCustomOptionsFormat(builder, customOptionsFormat): builder.PrependInt8Slot(6, customOptionsFormat, 0) -def OperatorAddMutatingVariableInputs(builder, mutatingVariableInputs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(mutatingVariableInputs), 0) -def OperatorStartMutatingVariableInputsVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def OperatorAddIntermediates(builder, intermediates): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(intermediates), 0) -def OperatorStartIntermediatesVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def OperatorEnd(builder): return builder.EndObject() + # Operator + def IntermediatesIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + return o == 0 + +def Start(builder): builder.StartObject(9) +def OperatorStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0) +def OperatorAddOpcodeIndex(builder, opcodeIndex): + """This method is deprecated. Please switch to AddOpcodeIndex.""" + return AddOpcodeIndex(builder, opcodeIndex) +def AddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) +def OperatorAddInputs(builder, inputs): + """This method is deprecated. Please switch to AddInputs.""" + return AddInputs(builder, inputs) +def StartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def OperatorStartInputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartInputsVector(builder, numElems) +def AddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def OperatorAddOutputs(builder, outputs): + """This method is deprecated. Please switch to AddOutputs.""" + return AddOutputs(builder, outputs) +def StartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def OperatorStartOutputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartOutputsVector(builder, numElems) +def AddBuiltinOptionsType(builder, builtinOptionsType): builder.PrependUint8Slot(3, builtinOptionsType, 0) +def OperatorAddBuiltinOptionsType(builder, builtinOptionsType): + """This method is deprecated. Please switch to AddBuiltinOptionsType.""" + return AddBuiltinOptionsType(builder, builtinOptionsType) +def AddBuiltinOptions(builder, builtinOptions): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(builtinOptions), 0) +def OperatorAddBuiltinOptions(builder, builtinOptions): + """This method is deprecated. Please switch to AddBuiltinOptions.""" + return AddBuiltinOptions(builder, builtinOptions) +def AddCustomOptions(builder, customOptions): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(customOptions), 0) +def OperatorAddCustomOptions(builder, customOptions): + """This method is deprecated. Please switch to AddCustomOptions.""" + return AddCustomOptions(builder, customOptions) +def StartCustomOptionsVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def OperatorStartCustomOptionsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartCustomOptionsVector(builder, numElems) +def AddCustomOptionsFormat(builder, customOptionsFormat): builder.PrependInt8Slot(6, customOptionsFormat, 0) +def OperatorAddCustomOptionsFormat(builder, customOptionsFormat): + """This method is deprecated. Please switch to AddCustomOptionsFormat.""" + return AddCustomOptionsFormat(builder, customOptionsFormat) +def AddMutatingVariableInputs(builder, mutatingVariableInputs): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(mutatingVariableInputs), 0) +def OperatorAddMutatingVariableInputs(builder, mutatingVariableInputs): + """This method is deprecated. Please switch to AddMutatingVariableInputs.""" + return AddMutatingVariableInputs(builder, mutatingVariableInputs) +def StartMutatingVariableInputsVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def OperatorStartMutatingVariableInputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartMutatingVariableInputsVector(builder, numElems) +def AddIntermediates(builder, intermediates): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(intermediates), 0) +def OperatorAddIntermediates(builder, intermediates): + """This method is deprecated. Please switch to AddIntermediates.""" + return AddIntermediates(builder, intermediates) +def StartIntermediatesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def OperatorStartIntermediatesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartIntermediatesVector(builder, numElems) +def End(builder): return builder.EndObject() +def OperatorEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/OperatorCode.py b/ethosu/vela/tflite/OperatorCode.py index 5a0ba2a4..1b95a23d 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) @@ -46,9 +56,27 @@ class OperatorCode(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def OperatorCodeStart(builder): builder.StartObject(4) -def OperatorCodeAddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode): builder.PrependInt8Slot(0, deprecatedBuiltinCode, 0) -def OperatorCodeAddCustomCode(builder, customCode): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(customCode), 0) -def OperatorCodeAddVersion(builder, version): builder.PrependInt32Slot(2, version, 1) -def OperatorCodeAddBuiltinCode(builder, builtinCode): builder.PrependInt32Slot(3, builtinCode, 0) -def OperatorCodeEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def OperatorCodeStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode): builder.PrependInt8Slot(0, deprecatedBuiltinCode, 0) +def OperatorCodeAddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode): + """This method is deprecated. Please switch to AddDeprecatedBuiltinCode.""" + return AddDeprecatedBuiltinCode(builder, deprecatedBuiltinCode) +def AddCustomCode(builder, customCode): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(customCode), 0) +def OperatorCodeAddCustomCode(builder, customCode): + """This method is deprecated. Please switch to AddCustomCode.""" + return AddCustomCode(builder, customCode) +def AddVersion(builder, version): builder.PrependInt32Slot(2, version, 1) +def OperatorCodeAddVersion(builder, version): + """This method is deprecated. Please switch to AddVersion.""" + return AddVersion(builder, version) +def AddBuiltinCode(builder, builtinCode): builder.PrependInt32Slot(3, builtinCode, 0) +def OperatorCodeAddBuiltinCode(builder, builtinCode): + """This method is deprecated. Please switch to AddBuiltinCode.""" + return AddBuiltinCode(builder, builtinCode) +def End(builder): return builder.EndObject() +def OperatorCodeEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/PackOptions.py b/ethosu/vela/tflite/PackOptions.py index 6a8ee2bb..89bf80aa 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) @@ -32,7 +42,19 @@ class PackOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def PackOptionsStart(builder): builder.StartObject(2) -def PackOptionsAddValuesCount(builder, valuesCount): builder.PrependInt32Slot(0, valuesCount, 0) -def PackOptionsAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0) -def PackOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def PackOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddValuesCount(builder, valuesCount): builder.PrependInt32Slot(0, valuesCount, 0) +def PackOptionsAddValuesCount(builder, valuesCount): + """This method is deprecated. Please switch to AddValuesCount.""" + return AddValuesCount(builder, valuesCount) +def AddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0) +def PackOptionsAddAxis(builder, axis): + """This method is deprecated. Please switch to AddAxis.""" + return AddAxis(builder, axis) +def End(builder): return builder.EndObject() +def PackOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/PadOptions.py b/ethosu/vela/tflite/PadOptions.py index d0833c68..5a336bf1 100644 --- a/ethosu/vela/tflite/PadOptions.py +++ b/ethosu/vela/tflite/PadOptions.py @@ -3,20 +3,36 @@ # 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 PadOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def PadOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def PadOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/PadV2Options.py b/ethosu/vela/tflite/PadV2Options.py index 5ea0d70c..62bfbc78 100644 --- a/ethosu/vela/tflite/PadV2Options.py +++ b/ethosu/vela/tflite/PadV2Options.py @@ -3,20 +3,36 @@ # 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 PadV2OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def PadV2OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def PadV2OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Pool2DOptions.py b/ethosu/vela/tflite/Pool2DOptions.py index b8b9f178..e7e16237 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) @@ -60,11 +70,35 @@ class Pool2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def Pool2DOptionsStart(builder): builder.StartObject(6) -def Pool2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) -def Pool2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) -def Pool2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) -def Pool2DOptionsAddFilterWidth(builder, filterWidth): builder.PrependInt32Slot(3, filterWidth, 0) -def Pool2DOptionsAddFilterHeight(builder, filterHeight): builder.PrependInt32Slot(4, filterHeight, 0) -def Pool2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(5, fusedActivationFunction, 0) -def Pool2DOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(6) +def Pool2DOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) +def Pool2DOptionsAddPadding(builder, padding): + """This method is deprecated. Please switch to AddPadding.""" + return AddPadding(builder, padding) +def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) +def Pool2DOptionsAddStrideW(builder, strideW): + """This method is deprecated. Please switch to AddStrideW.""" + return AddStrideW(builder, strideW) +def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) +def Pool2DOptionsAddStrideH(builder, strideH): + """This method is deprecated. Please switch to AddStrideH.""" + return AddStrideH(builder, strideH) +def AddFilterWidth(builder, filterWidth): builder.PrependInt32Slot(3, filterWidth, 0) +def Pool2DOptionsAddFilterWidth(builder, filterWidth): + """This method is deprecated. Please switch to AddFilterWidth.""" + return AddFilterWidth(builder, filterWidth) +def AddFilterHeight(builder, filterHeight): builder.PrependInt32Slot(4, filterHeight, 0) +def Pool2DOptionsAddFilterHeight(builder, filterHeight): + """This method is deprecated. Please switch to AddFilterHeight.""" + return AddFilterHeight(builder, filterHeight) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(5, fusedActivationFunction, 0) +def Pool2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def End(builder): return builder.EndObject() +def Pool2DOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/PowOptions.py b/ethosu/vela/tflite/PowOptions.py index 666ca488..0ce6adec 100644 --- a/ethosu/vela/tflite/PowOptions.py +++ b/ethosu/vela/tflite/PowOptions.py @@ -3,20 +3,36 @@ # 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 PowOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def PowOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def PowOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/QuantizationParameters.py b/ethosu/vela/tflite/QuantizationParameters.py index fcd686cf..8b6a35e5 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: @@ -130,16 +160,55 @@ class QuantizationParameters(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def QuantizationParametersStart(builder): builder.StartObject(7) -def QuantizationParametersAddMin(builder, min): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(min), 0) -def QuantizationParametersStartMinVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def QuantizationParametersAddMax(builder, max): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(max), 0) -def QuantizationParametersStartMaxVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def QuantizationParametersAddScale(builder, scale): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(scale), 0) -def QuantizationParametersStartScaleVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def QuantizationParametersAddZeroPoint(builder, zeroPoint): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(zeroPoint), 0) -def QuantizationParametersStartZeroPointVector(builder, numElems): return builder.StartVector(8, numElems, 8) -def QuantizationParametersAddDetailsType(builder, detailsType): builder.PrependUint8Slot(4, detailsType, 0) -def QuantizationParametersAddDetails(builder, details): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(details), 0) -def QuantizationParametersAddQuantizedDimension(builder, quantizedDimension): builder.PrependInt32Slot(6, quantizedDimension, 0) -def QuantizationParametersEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(7) +def QuantizationParametersStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddMin(builder, min): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(min), 0) +def QuantizationParametersAddMin(builder, min): + """This method is deprecated. Please switch to AddMin.""" + return AddMin(builder, min) +def StartMinVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def QuantizationParametersStartMinVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartMinVector(builder, numElems) +def AddMax(builder, max): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(max), 0) +def QuantizationParametersAddMax(builder, max): + """This method is deprecated. Please switch to AddMax.""" + return AddMax(builder, max) +def StartMaxVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def QuantizationParametersStartMaxVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartMaxVector(builder, numElems) +def AddScale(builder, scale): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(scale), 0) +def QuantizationParametersAddScale(builder, scale): + """This method is deprecated. Please switch to AddScale.""" + return AddScale(builder, scale) +def StartScaleVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def QuantizationParametersStartScaleVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartScaleVector(builder, numElems) +def AddZeroPoint(builder, zeroPoint): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(zeroPoint), 0) +def QuantizationParametersAddZeroPoint(builder, zeroPoint): + """This method is deprecated. Please switch to AddZeroPoint.""" + return AddZeroPoint(builder, zeroPoint) +def StartZeroPointVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def QuantizationParametersStartZeroPointVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartZeroPointVector(builder, numElems) +def AddDetailsType(builder, detailsType): builder.PrependUint8Slot(4, detailsType, 0) +def QuantizationParametersAddDetailsType(builder, detailsType): + """This method is deprecated. Please switch to AddDetailsType.""" + return AddDetailsType(builder, detailsType) +def AddDetails(builder, details): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(details), 0) +def QuantizationParametersAddDetails(builder, details): + """This method is deprecated. Please switch to AddDetails.""" + return AddDetails(builder, details) +def AddQuantizedDimension(builder, quantizedDimension): builder.PrependInt32Slot(6, quantizedDimension, 0) +def QuantizationParametersAddQuantizedDimension(builder, quantizedDimension): + """This method is deprecated. Please switch to AddQuantizedDimension.""" + return AddQuantizedDimension(builder, quantizedDimension) +def End(builder): return builder.EndObject() +def QuantizationParametersEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/QuantizeOptions.py b/ethosu/vela/tflite/QuantizeOptions.py index 28af8cc9..404a2cfc 100644 --- a/ethosu/vela/tflite/QuantizeOptions.py +++ b/ethosu/vela/tflite/QuantizeOptions.py @@ -3,20 +3,36 @@ # 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 QuantizeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def QuantizeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def QuantizeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/RNNOptions.py b/ethosu/vela/tflite/RNNOptions.py index 397d716f..67c48011 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) @@ -32,7 +42,19 @@ class RNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def RNNOptionsStart(builder): builder.StartObject(2) -def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0) -def RNNOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def RNNOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0) +def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def RNNOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/RandomOptions.py b/ethosu/vela/tflite/RandomOptions.py index 18ffc5fb..e9411ffd 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) @@ -32,7 +42,19 @@ class RandomOptions(object): return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0 -def RandomOptionsStart(builder): builder.StartObject(2) -def RandomOptionsAddSeed(builder, seed): builder.PrependInt64Slot(0, seed, 0) -def RandomOptionsAddSeed2(builder, seed2): builder.PrependInt64Slot(1, seed2, 0) -def RandomOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def RandomOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddSeed(builder, seed): builder.PrependInt64Slot(0, seed, 0) +def RandomOptionsAddSeed(builder, seed): + """This method is deprecated. Please switch to AddSeed.""" + return AddSeed(builder, seed) +def AddSeed2(builder, seed2): builder.PrependInt64Slot(1, seed2, 0) +def RandomOptionsAddSeed2(builder, seed2): + """This method is deprecated. Please switch to AddSeed2.""" + return AddSeed2(builder, seed2) +def End(builder): return builder.EndObject() +def RandomOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/RangeOptions.py b/ethosu/vela/tflite/RangeOptions.py index cb705b57..fdc73176 100644 --- a/ethosu/vela/tflite/RangeOptions.py +++ b/ethosu/vela/tflite/RangeOptions.py @@ -3,20 +3,36 @@ # 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 RangeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def RangeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def RangeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/RankOptions.py b/ethosu/vela/tflite/RankOptions.py index 4e4a5ecd..64ea9979 100644 --- a/ethosu/vela/tflite/RankOptions.py +++ b/ethosu/vela/tflite/RankOptions.py @@ -3,20 +3,36 @@ # 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 RankOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def RankOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def RankOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ReadVariableOptions.py b/ethosu/vela/tflite/ReadVariableOptions.py index 6484ef2f..468ad27a 100644 --- a/ethosu/vela/tflite/ReadVariableOptions.py +++ b/ethosu/vela/tflite/ReadVariableOptions.py @@ -3,20 +3,36 @@ # 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 ReadVariableOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ReadVariableOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ReadVariableOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ReducerOptions.py b/ethosu/vela/tflite/ReducerOptions.py index 93bbde17..45318056 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) @@ -25,6 +35,15 @@ class ReducerOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def ReducerOptionsStart(builder): builder.StartObject(1) -def ReducerOptionsAddKeepDims(builder, keepDims): builder.PrependBoolSlot(0, keepDims, 0) -def ReducerOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def ReducerOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddKeepDims(builder, keepDims): builder.PrependBoolSlot(0, keepDims, 0) +def ReducerOptionsAddKeepDims(builder, keepDims): + """This method is deprecated. Please switch to AddKeepDims.""" + return AddKeepDims(builder, keepDims) +def End(builder): return builder.EndObject() +def ReducerOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ReshapeOptions.py b/ethosu/vela/tflite/ReshapeOptions.py index 157d45d9..204fa69b 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,24 @@ class ReshapeOptions(object): return self._tab.VectorLen(o) return 0 -def ReshapeOptionsStart(builder): builder.StartObject(1) -def ReshapeOptionsAddNewShape(builder, newShape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(newShape), 0) -def ReshapeOptionsStartNewShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ReshapeOptionsEnd(builder): return builder.EndObject() + # ReshapeOptions + def NewShapeIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def ReshapeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNewShape(builder, newShape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(newShape), 0) +def ReshapeOptionsAddNewShape(builder, newShape): + """This method is deprecated. Please switch to AddNewShape.""" + return AddNewShape(builder, newShape) +def StartNewShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def ReshapeOptionsStartNewShapeVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartNewShapeVector(builder, numElems) +def End(builder): return builder.EndObject() +def ReshapeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ResizeBilinearOptions.py b/ethosu/vela/tflite/ResizeBilinearOptions.py index fb05ca4b..ce7fe451 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) @@ -32,7 +42,19 @@ class ResizeBilinearOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def ResizeBilinearOptionsStart(builder): builder.StartObject(4) -def ResizeBilinearOptionsAddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(2, alignCorners, 0) -def ResizeBilinearOptionsAddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(3, halfPixelCenters, 0) -def ResizeBilinearOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(4) +def ResizeBilinearOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(2, alignCorners, 0) +def ResizeBilinearOptionsAddAlignCorners(builder, alignCorners): + """This method is deprecated. Please switch to AddAlignCorners.""" + return AddAlignCorners(builder, alignCorners) +def AddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(3, halfPixelCenters, 0) +def ResizeBilinearOptionsAddHalfPixelCenters(builder, halfPixelCenters): + """This method is deprecated. Please switch to AddHalfPixelCenters.""" + return AddHalfPixelCenters(builder, halfPixelCenters) +def End(builder): return builder.EndObject() +def ResizeBilinearOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py index e2642cef..4eeba35a 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) @@ -32,7 +42,19 @@ class ResizeNearestNeighborOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def ResizeNearestNeighborOptionsStart(builder): builder.StartObject(2) -def ResizeNearestNeighborOptionsAddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(0, alignCorners, 0) -def ResizeNearestNeighborOptionsAddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(1, halfPixelCenters, 0) -def ResizeNearestNeighborOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def ResizeNearestNeighborOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(0, alignCorners, 0) +def ResizeNearestNeighborOptionsAddAlignCorners(builder, alignCorners): + """This method is deprecated. Please switch to AddAlignCorners.""" + return AddAlignCorners(builder, alignCorners) +def AddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(1, halfPixelCenters, 0) +def ResizeNearestNeighborOptionsAddHalfPixelCenters(builder, halfPixelCenters): + """This method is deprecated. Please switch to AddHalfPixelCenters.""" + return AddHalfPixelCenters(builder, halfPixelCenters) +def End(builder): return builder.EndObject() +def ResizeNearestNeighborOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ReverseSequenceOptions.py b/ethosu/vela/tflite/ReverseSequenceOptions.py index cbaf96db..e4b00288 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) @@ -32,7 +42,19 @@ class ReverseSequenceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def ReverseSequenceOptionsStart(builder): builder.StartObject(2) -def ReverseSequenceOptionsAddSeqDim(builder, seqDim): builder.PrependInt32Slot(0, seqDim, 0) -def ReverseSequenceOptionsAddBatchDim(builder, batchDim): builder.PrependInt32Slot(1, batchDim, 0) -def ReverseSequenceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def ReverseSequenceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddSeqDim(builder, seqDim): builder.PrependInt32Slot(0, seqDim, 0) +def ReverseSequenceOptionsAddSeqDim(builder, seqDim): + """This method is deprecated. Please switch to AddSeqDim.""" + return AddSeqDim(builder, seqDim) +def AddBatchDim(builder, batchDim): builder.PrependInt32Slot(1, batchDim, 0) +def ReverseSequenceOptionsAddBatchDim(builder, batchDim): + """This method is deprecated. Please switch to AddBatchDim.""" + return AddBatchDim(builder, batchDim) +def End(builder): return builder.EndObject() +def ReverseSequenceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ReverseV2Options.py b/ethosu/vela/tflite/ReverseV2Options.py index dbac9362..9dae7acf 100644 --- a/ethosu/vela/tflite/ReverseV2Options.py +++ b/ethosu/vela/tflite/ReverseV2Options.py @@ -3,20 +3,36 @@ # 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 ReverseV2OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ReverseV2OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ReverseV2OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Rfft2dOptions.py b/ethosu/vela/tflite/Rfft2dOptions.py index f4f2bf3f..ab91a882 100644 --- a/ethosu/vela/tflite/Rfft2dOptions.py +++ b/ethosu/vela/tflite/Rfft2dOptions.py @@ -3,20 +3,36 @@ # 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 Rfft2dOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def Rfft2dOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def Rfft2dOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SVDFOptions.py b/ethosu/vela/tflite/SVDFOptions.py index e4b34611..3b45b6af 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) @@ -39,8 +49,23 @@ class SVDFOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def SVDFOptionsStart(builder): builder.StartObject(3) -def SVDFOptionsAddRank(builder, rank): builder.PrependInt32Slot(0, rank, 0) -def SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) -def SVDFOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) -def SVDFOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def SVDFOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddRank(builder, rank): builder.PrependInt32Slot(0, rank, 0) +def SVDFOptionsAddRank(builder, rank): + """This method is deprecated. Please switch to AddRank.""" + return AddRank(builder, rank) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) +def SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) +def SVDFOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def SVDFOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ScatterNdOptions.py b/ethosu/vela/tflite/ScatterNdOptions.py index e6bf3a11..93affc9f 100644 --- a/ethosu/vela/tflite/ScatterNdOptions.py +++ b/ethosu/vela/tflite/ScatterNdOptions.py @@ -3,20 +3,36 @@ # 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 ScatterNdOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ScatterNdOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ScatterNdOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SegmentSumOptions.py b/ethosu/vela/tflite/SegmentSumOptions.py index d1c32133..482a35a0 100644 --- a/ethosu/vela/tflite/SegmentSumOptions.py +++ b/ethosu/vela/tflite/SegmentSumOptions.py @@ -3,20 +3,36 @@ # 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 SegmentSumOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SegmentSumOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SegmentSumOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SelectOptions.py b/ethosu/vela/tflite/SelectOptions.py index d67daf36..039a5189 100644 --- a/ethosu/vela/tflite/SelectOptions.py +++ b/ethosu/vela/tflite/SelectOptions.py @@ -3,20 +3,36 @@ # 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 SelectOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SelectOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SelectOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SelectV2Options.py b/ethosu/vela/tflite/SelectV2Options.py index 5d03fc2d..b123872c 100644 --- a/ethosu/vela/tflite/SelectV2Options.py +++ b/ethosu/vela/tflite/SelectV2Options.py @@ -3,20 +3,36 @@ # 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 SelectV2OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SelectV2OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SelectV2OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SequenceRNNOptions.py b/ethosu/vela/tflite/SequenceRNNOptions.py index 16eaf090..668acca6 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) @@ -39,8 +49,23 @@ class SequenceRNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def SequenceRNNOptionsStart(builder): builder.StartObject(3) -def SequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0) -def SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) -def SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) -def SequenceRNNOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def SequenceRNNOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0) +def SequenceRNNOptionsAddTimeMajor(builder, timeMajor): + """This method is deprecated. Please switch to AddTimeMajor.""" + return AddTimeMajor(builder, timeMajor) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0) +def SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) +def SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def SequenceRNNOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ShapeOptions.py b/ethosu/vela/tflite/ShapeOptions.py index 2d24c05f..92079352 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) @@ -25,6 +35,15 @@ class ShapeOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -def ShapeOptionsStart(builder): builder.StartObject(1) -def ShapeOptionsAddOutType(builder, outType): builder.PrependInt8Slot(0, outType, 0) -def ShapeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def ShapeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddOutType(builder, outType): builder.PrependInt8Slot(0, outType, 0) +def ShapeOptionsAddOutType(builder, outType): + """This method is deprecated. Please switch to AddOutType.""" + return AddOutType(builder, outType) +def End(builder): return builder.EndObject() +def ShapeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SignatureDef.py b/ethosu/vela/tflite/SignatureDef.py index b9394a46..f75494b5 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: @@ -72,11 +92,35 @@ class SignatureDef(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -def SignatureDefStart(builder): builder.StartObject(5) -def SignatureDefAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) -def SignatureDefStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SignatureDefAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) -def SignatureDefStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SignatureDefAddSignatureKey(builder, signatureKey): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(signatureKey), 0) -def SignatureDefAddSubgraphIndex(builder, subgraphIndex): builder.PrependUint32Slot(4, subgraphIndex, 0) -def SignatureDefEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(5) +def SignatureDefStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) +def SignatureDefAddInputs(builder, inputs): + """This method is deprecated. Please switch to AddInputs.""" + return AddInputs(builder, inputs) +def StartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SignatureDefStartInputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartInputsVector(builder, numElems) +def AddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def SignatureDefAddOutputs(builder, outputs): + """This method is deprecated. Please switch to AddOutputs.""" + return AddOutputs(builder, outputs) +def StartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SignatureDefStartOutputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartOutputsVector(builder, numElems) +def AddSignatureKey(builder, signatureKey): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(signatureKey), 0) +def SignatureDefAddSignatureKey(builder, signatureKey): + """This method is deprecated. Please switch to AddSignatureKey.""" + return AddSignatureKey(builder, signatureKey) +def AddSubgraphIndex(builder, subgraphIndex): builder.PrependUint32Slot(4, subgraphIndex, 0) +def SignatureDefAddSubgraphIndex(builder, subgraphIndex): + """This method is deprecated. Please switch to AddSubgraphIndex.""" + return AddSubgraphIndex(builder, subgraphIndex) +def End(builder): return builder.EndObject() +def SignatureDefEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SkipGramOptions.py b/ethosu/vela/tflite/SkipGramOptions.py index 0e8bdc1d..c1173a58 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) @@ -39,8 +49,23 @@ class SkipGramOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def SkipGramOptionsStart(builder): builder.StartObject(3) -def SkipGramOptionsAddNgramSize(builder, ngramSize): builder.PrependInt32Slot(0, ngramSize, 0) -def SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize): builder.PrependInt32Slot(1, maxSkipSize, 0) -def SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams): builder.PrependBoolSlot(2, includeAllNgrams, 0) -def SkipGramOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def SkipGramOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNgramSize(builder, ngramSize): builder.PrependInt32Slot(0, ngramSize, 0) +def SkipGramOptionsAddNgramSize(builder, ngramSize): + """This method is deprecated. Please switch to AddNgramSize.""" + return AddNgramSize(builder, ngramSize) +def AddMaxSkipSize(builder, maxSkipSize): builder.PrependInt32Slot(1, maxSkipSize, 0) +def SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize): + """This method is deprecated. Please switch to AddMaxSkipSize.""" + return AddMaxSkipSize(builder, maxSkipSize) +def AddIncludeAllNgrams(builder, includeAllNgrams): builder.PrependBoolSlot(2, includeAllNgrams, 0) +def SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams): + """This method is deprecated. Please switch to AddIncludeAllNgrams.""" + return AddIncludeAllNgrams(builder, includeAllNgrams) +def End(builder): return builder.EndObject() +def SkipGramOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SliceOptions.py b/ethosu/vela/tflite/SliceOptions.py index 4b41568d..83a57106 100644 --- a/ethosu/vela/tflite/SliceOptions.py +++ b/ethosu/vela/tflite/SliceOptions.py @@ -3,20 +3,36 @@ # 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 SliceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SliceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SliceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SoftmaxOptions.py b/ethosu/vela/tflite/SoftmaxOptions.py index a7168534..43dd7e62 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) @@ -25,6 +35,15 @@ class SoftmaxOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -def SoftmaxOptionsStart(builder): builder.StartObject(1) -def SoftmaxOptionsAddBeta(builder, beta): builder.PrependFloat32Slot(0, beta, 0.0) -def SoftmaxOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def SoftmaxOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddBeta(builder, beta): builder.PrependFloat32Slot(0, beta, 0.0) +def SoftmaxOptionsAddBeta(builder, beta): + """This method is deprecated. Please switch to AddBeta.""" + return AddBeta(builder, beta) +def End(builder): return builder.EndObject() +def SoftmaxOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SpaceToBatchNDOptions.py b/ethosu/vela/tflite/SpaceToBatchNDOptions.py index b61ef96f..02ede8a8 100644 --- a/ethosu/vela/tflite/SpaceToBatchNDOptions.py +++ b/ethosu/vela/tflite/SpaceToBatchNDOptions.py @@ -3,20 +3,36 @@ # 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 SpaceToBatchNDOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SpaceToBatchNDOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SpaceToBatchNDOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SpaceToDepthOptions.py b/ethosu/vela/tflite/SpaceToDepthOptions.py index d571174a..49756cda 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) @@ -25,6 +35,15 @@ class SpaceToDepthOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def SpaceToDepthOptionsStart(builder): builder.StartObject(1) -def SpaceToDepthOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) -def SpaceToDepthOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def SpaceToDepthOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) +def SpaceToDepthOptionsAddBlockSize(builder, blockSize): + """This method is deprecated. Please switch to AddBlockSize.""" + return AddBlockSize(builder, blockSize) +def End(builder): return builder.EndObject() +def SpaceToDepthOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SparseToDenseOptions.py b/ethosu/vela/tflite/SparseToDenseOptions.py index 826eee08..0cf22b45 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) @@ -25,6 +35,15 @@ class SparseToDenseOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def SparseToDenseOptionsStart(builder): builder.StartObject(1) -def SparseToDenseOptionsAddValidateIndices(builder, validateIndices): builder.PrependBoolSlot(0, validateIndices, 0) -def SparseToDenseOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def SparseToDenseOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddValidateIndices(builder, validateIndices): builder.PrependBoolSlot(0, validateIndices, 0) +def SparseToDenseOptionsAddValidateIndices(builder, validateIndices): + """This method is deprecated. Please switch to AddValidateIndices.""" + return AddValidateIndices(builder, validateIndices) +def End(builder): return builder.EndObject() +def SparseToDenseOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SparsityParameters.py b/ethosu/vela/tflite/SparsityParameters.py index de550a67..5da46927 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,40 @@ class SparsityParameters(object): return self._tab.VectorLen(o) return 0 -def SparsityParametersStart(builder): builder.StartObject(3) -def SparsityParametersAddTraversalOrder(builder, traversalOrder): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(traversalOrder), 0) -def SparsityParametersStartTraversalOrderVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SparsityParametersAddBlockMap(builder, blockMap): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(blockMap), 0) -def SparsityParametersStartBlockMapVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SparsityParametersAddDimMetadata(builder, dimMetadata): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(dimMetadata), 0) -def SparsityParametersStartDimMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SparsityParametersEnd(builder): return builder.EndObject() + # SparsityParameters + def DimMetadataIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + return o == 0 + +def Start(builder): builder.StartObject(3) +def SparsityParametersStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddTraversalOrder(builder, traversalOrder): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(traversalOrder), 0) +def SparsityParametersAddTraversalOrder(builder, traversalOrder): + """This method is deprecated. Please switch to AddTraversalOrder.""" + return AddTraversalOrder(builder, traversalOrder) +def StartTraversalOrderVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SparsityParametersStartTraversalOrderVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartTraversalOrderVector(builder, numElems) +def AddBlockMap(builder, blockMap): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(blockMap), 0) +def SparsityParametersAddBlockMap(builder, blockMap): + """This method is deprecated. Please switch to AddBlockMap.""" + return AddBlockMap(builder, blockMap) +def StartBlockMapVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SparsityParametersStartBlockMapVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartBlockMapVector(builder, numElems) +def AddDimMetadata(builder, dimMetadata): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(dimMetadata), 0) +def SparsityParametersAddDimMetadata(builder, dimMetadata): + """This method is deprecated. Please switch to AddDimMetadata.""" + return AddDimMetadata(builder, dimMetadata) +def StartDimMetadataVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SparsityParametersStartDimMetadataVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartDimMetadataVector(builder, numElems) +def End(builder): return builder.EndObject() +def SparsityParametersEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SplitOptions.py b/ethosu/vela/tflite/SplitOptions.py index 3207525b..b5ed2a43 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) @@ -25,6 +35,15 @@ class SplitOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def SplitOptionsStart(builder): builder.StartObject(1) -def SplitOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) -def SplitOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def SplitOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) +def SplitOptionsAddNumSplits(builder, numSplits): + """This method is deprecated. Please switch to AddNumSplits.""" + return AddNumSplits(builder, numSplits) +def End(builder): return builder.EndObject() +def SplitOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SplitVOptions.py b/ethosu/vela/tflite/SplitVOptions.py index 418959de..393b4ab2 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) @@ -25,6 +35,15 @@ class SplitVOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def SplitVOptionsStart(builder): builder.StartObject(1) -def SplitVOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) -def SplitVOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def SplitVOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) +def SplitVOptionsAddNumSplits(builder, numSplits): + """This method is deprecated. Please switch to AddNumSplits.""" + return AddNumSplits(builder, numSplits) +def End(builder): return builder.EndObject() +def SplitVOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SquareOptions.py b/ethosu/vela/tflite/SquareOptions.py index 56633f6a..e1b40f47 100644 --- a/ethosu/vela/tflite/SquareOptions.py +++ b/ethosu/vela/tflite/SquareOptions.py @@ -3,20 +3,36 @@ # 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 SquareOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SquareOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SquareOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SquaredDifferenceOptions.py b/ethosu/vela/tflite/SquaredDifferenceOptions.py index 906855d1..3b5bedf1 100644 --- a/ethosu/vela/tflite/SquaredDifferenceOptions.py +++ b/ethosu/vela/tflite/SquaredDifferenceOptions.py @@ -3,20 +3,36 @@ # 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 SquaredDifferenceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def SquaredDifferenceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def SquaredDifferenceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SqueezeOptions.py b/ethosu/vela/tflite/SqueezeOptions.py index 25b294dc..c0840d29 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,24 @@ class SqueezeOptions(object): return self._tab.VectorLen(o) return 0 -def SqueezeOptionsStart(builder): builder.StartObject(1) -def SqueezeOptionsAddSqueezeDims(builder, squeezeDims): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(squeezeDims), 0) -def SqueezeOptionsStartSqueezeDimsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SqueezeOptionsEnd(builder): return builder.EndObject() + # SqueezeOptions + def SqueezeDimsIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def SqueezeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddSqueezeDims(builder, squeezeDims): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(squeezeDims), 0) +def SqueezeOptionsAddSqueezeDims(builder, squeezeDims): + """This method is deprecated. Please switch to AddSqueezeDims.""" + return AddSqueezeDims(builder, squeezeDims) +def StartSqueezeDimsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SqueezeOptionsStartSqueezeDimsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartSqueezeDimsVector(builder, numElems) +def End(builder): return builder.EndObject() +def SqueezeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/StridedSliceOptions.py b/ethosu/vela/tflite/StridedSliceOptions.py index 3bbb36b8..6e34fe57 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) @@ -53,10 +63,31 @@ class StridedSliceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def StridedSliceOptionsStart(builder): builder.StartObject(5) -def StridedSliceOptionsAddBeginMask(builder, beginMask): builder.PrependInt32Slot(0, beginMask, 0) -def StridedSliceOptionsAddEndMask(builder, endMask): builder.PrependInt32Slot(1, endMask, 0) -def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask): builder.PrependInt32Slot(2, ellipsisMask, 0) -def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask): builder.PrependInt32Slot(3, newAxisMask, 0) -def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask): builder.PrependInt32Slot(4, shrinkAxisMask, 0) -def StridedSliceOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(5) +def StridedSliceOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddBeginMask(builder, beginMask): builder.PrependInt32Slot(0, beginMask, 0) +def StridedSliceOptionsAddBeginMask(builder, beginMask): + """This method is deprecated. Please switch to AddBeginMask.""" + return AddBeginMask(builder, beginMask) +def AddEndMask(builder, endMask): builder.PrependInt32Slot(1, endMask, 0) +def StridedSliceOptionsAddEndMask(builder, endMask): + """This method is deprecated. Please switch to AddEndMask.""" + return AddEndMask(builder, endMask) +def AddEllipsisMask(builder, ellipsisMask): builder.PrependInt32Slot(2, ellipsisMask, 0) +def StridedSliceOptionsAddEllipsisMask(builder, ellipsisMask): + """This method is deprecated. Please switch to AddEllipsisMask.""" + return AddEllipsisMask(builder, ellipsisMask) +def AddNewAxisMask(builder, newAxisMask): builder.PrependInt32Slot(3, newAxisMask, 0) +def StridedSliceOptionsAddNewAxisMask(builder, newAxisMask): + """This method is deprecated. Please switch to AddNewAxisMask.""" + return AddNewAxisMask(builder, newAxisMask) +def AddShrinkAxisMask(builder, shrinkAxisMask): builder.PrependInt32Slot(4, shrinkAxisMask, 0) +def StridedSliceOptionsAddShrinkAxisMask(builder, shrinkAxisMask): + """This method is deprecated. Please switch to AddShrinkAxisMask.""" + return AddShrinkAxisMask(builder, shrinkAxisMask) +def End(builder): return builder.EndObject() +def StridedSliceOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SubGraph.py b/ethosu/vela/tflite/SubGraph.py index eaa42fac..7cd97f26 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,20 +128,58 @@ 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: return self._tab.String(o + self._tab.Pos) return None -def SubGraphStart(builder): builder.StartObject(5) -def SubGraphAddTensors(builder, tensors): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(tensors), 0) -def SubGraphStartTensorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SubGraphAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) -def SubGraphStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SubGraphAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) -def SubGraphStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SubGraphAddOperators(builder, operators): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(operators), 0) -def SubGraphStartOperatorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SubGraphAddName(builder, name): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def SubGraphEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(5) +def SubGraphStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddTensors(builder, tensors): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(tensors), 0) +def SubGraphAddTensors(builder, tensors): + """This method is deprecated. Please switch to AddTensors.""" + return AddTensors(builder, tensors) +def StartTensorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SubGraphStartTensorsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartTensorsVector(builder, numElems) +def AddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) +def SubGraphAddInputs(builder, inputs): + """This method is deprecated. Please switch to AddInputs.""" + return AddInputs(builder, inputs) +def StartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SubGraphStartInputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartInputsVector(builder, numElems) +def AddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def SubGraphAddOutputs(builder, outputs): + """This method is deprecated. Please switch to AddOutputs.""" + return AddOutputs(builder, outputs) +def StartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SubGraphStartOutputsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartOutputsVector(builder, numElems) +def AddOperators(builder, operators): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(operators), 0) +def SubGraphAddOperators(builder, operators): + """This method is deprecated. Please switch to AddOperators.""" + return AddOperators(builder, operators) +def StartOperatorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def SubGraphStartOperatorsVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartOperatorsVector(builder, numElems) +def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def SubGraphAddName(builder, name): + """This method is deprecated. Please switch to AddName.""" + return AddName(builder, name) +def End(builder): return builder.EndObject() +def SubGraphEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/SubOptions.py b/ethosu/vela/tflite/SubOptions.py index c3ed40e1..de2df8a1 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) @@ -32,7 +42,19 @@ class SubOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return True -def SubOptionsStart(builder): builder.StartObject(2) -def SubOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def SubOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1) -def SubOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def SubOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def SubOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1) +def SubOptionsAddPotScaleInt16(builder, potScaleInt16): + """This method is deprecated. Please switch to AddPotScaleInt16.""" + return AddPotScaleInt16(builder, potScaleInt16) +def End(builder): return builder.EndObject() +def SubOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Tensor.py b/ethosu/vela/tflite/Tensor.py index 4c39b7cb..2d7f9b6c 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,56 @@ class Tensor(object): return self._tab.VectorLen(o) return 0 -def TensorStart(builder): builder.StartObject(8) -def TensorAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) -def TensorStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TensorAddType(builder, type): builder.PrependInt8Slot(1, type, 0) -def TensorAddBuffer(builder, buffer): builder.PrependUint32Slot(2, buffer, 0) -def TensorAddName(builder, name): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def TensorAddQuantization(builder, quantization): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(quantization), 0) -def TensorAddIsVariable(builder, isVariable): builder.PrependBoolSlot(5, isVariable, 0) -def TensorAddSparsity(builder, sparsity): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(sparsity), 0) -def TensorAddShapeSignature(builder, shapeSignature): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(shapeSignature), 0) -def TensorStartShapeSignatureVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TensorEnd(builder): return builder.EndObject() + # Tensor + def ShapeSignatureIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + return o == 0 + +def Start(builder): builder.StartObject(8) +def TensorStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) +def TensorAddShape(builder, shape): + """This method is deprecated. Please switch to AddShape.""" + return AddShape(builder, shape) +def StartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def TensorStartShapeVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartShapeVector(builder, numElems) +def AddType(builder, type): builder.PrependInt8Slot(1, type, 0) +def TensorAddType(builder, type): + """This method is deprecated. Please switch to AddType.""" + return AddType(builder, type) +def AddBuffer(builder, buffer): builder.PrependUint32Slot(2, buffer, 0) +def TensorAddBuffer(builder, buffer): + """This method is deprecated. Please switch to AddBuffer.""" + return AddBuffer(builder, buffer) +def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def TensorAddName(builder, name): + """This method is deprecated. Please switch to AddName.""" + return AddName(builder, name) +def AddQuantization(builder, quantization): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(quantization), 0) +def TensorAddQuantization(builder, quantization): + """This method is deprecated. Please switch to AddQuantization.""" + return AddQuantization(builder, quantization) +def AddIsVariable(builder, isVariable): builder.PrependBoolSlot(5, isVariable, 0) +def TensorAddIsVariable(builder, isVariable): + """This method is deprecated. Please switch to AddIsVariable.""" + return AddIsVariable(builder, isVariable) +def AddSparsity(builder, sparsity): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(sparsity), 0) +def TensorAddSparsity(builder, sparsity): + """This method is deprecated. Please switch to AddSparsity.""" + return AddSparsity(builder, sparsity) +def AddShapeSignature(builder, shapeSignature): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(shapeSignature), 0) +def TensorAddShapeSignature(builder, shapeSignature): + """This method is deprecated. Please switch to AddShapeSignature.""" + return AddShapeSignature(builder, shapeSignature) +def StartShapeSignatureVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def TensorStartShapeSignatureVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartShapeSignatureVector(builder, numElems) +def End(builder): return builder.EndObject() +def TensorEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/TensorMap.py b/ethosu/vela/tflite/TensorMap.py index e9b036d9..b3572f8b 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) @@ -32,7 +42,19 @@ class TensorMap(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -def TensorMapStart(builder): builder.StartObject(2) -def TensorMapAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def TensorMapAddTensorIndex(builder, tensorIndex): builder.PrependUint32Slot(1, tensorIndex, 0) -def TensorMapEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def TensorMapStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def TensorMapAddName(builder, name): + """This method is deprecated. Please switch to AddName.""" + return AddName(builder, name) +def AddTensorIndex(builder, tensorIndex): builder.PrependUint32Slot(1, tensorIndex, 0) +def TensorMapAddTensorIndex(builder, tensorIndex): + """This method is deprecated. Please switch to AddTensorIndex.""" + return AddTensorIndex(builder, tensorIndex) +def End(builder): return builder.EndObject() +def TensorMapEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/TileOptions.py b/ethosu/vela/tflite/TileOptions.py index ec8396dc..926585a9 100644 --- a/ethosu/vela/tflite/TileOptions.py +++ b/ethosu/vela/tflite/TileOptions.py @@ -3,20 +3,36 @@ # 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 TileOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def TileOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def TileOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/TopKV2Options.py b/ethosu/vela/tflite/TopKV2Options.py index ccd51033..849ab528 100644 --- a/ethosu/vela/tflite/TopKV2Options.py +++ b/ethosu/vela/tflite/TopKV2Options.py @@ -3,20 +3,36 @@ # 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 TopKV2OptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def TopKV2OptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def TopKV2OptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/TransposeConvOptions.py b/ethosu/vela/tflite/TransposeConvOptions.py index 423571c8..09153b03 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) @@ -39,8 +49,23 @@ class TransposeConvOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def TransposeConvOptionsStart(builder): builder.StartObject(3) -def TransposeConvOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) -def TransposeConvOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) -def TransposeConvOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) -def TransposeConvOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(3) +def TransposeConvOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) +def TransposeConvOptionsAddPadding(builder, padding): + """This method is deprecated. Please switch to AddPadding.""" + return AddPadding(builder, padding) +def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0) +def TransposeConvOptionsAddStrideW(builder, strideW): + """This method is deprecated. Please switch to AddStrideW.""" + return AddStrideW(builder, strideW) +def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) +def TransposeConvOptionsAddStrideH(builder, strideH): + """This method is deprecated. Please switch to AddStrideH.""" + return AddStrideH(builder, strideH) +def End(builder): return builder.EndObject() +def TransposeConvOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/TransposeOptions.py b/ethosu/vela/tflite/TransposeOptions.py index 42c596d9..662c5420 100644 --- a/ethosu/vela/tflite/TransposeOptions.py +++ b/ethosu/vela/tflite/TransposeOptions.py @@ -3,20 +3,36 @@ # 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 TransposeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def TransposeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def TransposeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Uint16Vector.py b/ethosu/vela/tflite/Uint16Vector.py index 750e52a4..55d49f57 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,24 @@ class Uint16Vector(object): return self._tab.VectorLen(o) return 0 -def Uint16VectorStart(builder): builder.StartObject(1) -def Uint16VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) -def Uint16VectorStartValuesVector(builder, numElems): return builder.StartVector(2, numElems, 2) -def Uint16VectorEnd(builder): return builder.EndObject() + # Uint16Vector + def ValuesIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def Uint16VectorStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) +def Uint16VectorAddValues(builder, values): + """This method is deprecated. Please switch to AddValues.""" + return AddValues(builder, values) +def StartValuesVector(builder, numElems): return builder.StartVector(2, numElems, 2) +def Uint16VectorStartValuesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartValuesVector(builder, numElems) +def End(builder): return builder.EndObject() +def Uint16VectorEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/Uint8Vector.py b/ethosu/vela/tflite/Uint8Vector.py index dc475f9f..9f078378 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,24 @@ class Uint8Vector(object): return self._tab.VectorLen(o) return 0 -def Uint8VectorStart(builder): builder.StartObject(1) -def Uint8VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) -def Uint8VectorStartValuesVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def Uint8VectorEnd(builder): return builder.EndObject() + # Uint8Vector + def ValuesIsNone(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + return o == 0 + +def Start(builder): builder.StartObject(1) +def Uint8VectorStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0) +def Uint8VectorAddValues(builder, values): + """This method is deprecated. Please switch to AddValues.""" + return AddValues(builder, values) +def StartValuesVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def Uint8VectorStartValuesVector(builder, numElems): + """This method is deprecated. Please switch to Start.""" + return StartValuesVector(builder, numElems) +def End(builder): return builder.EndObject() +def Uint8VectorEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py index b734f3ff..374a33ac 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) @@ -53,10 +63,31 @@ class UnidirectionalSequenceLSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -def UnidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(5) -def UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) -def UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) -def UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) -def UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(3, timeMajor, 0) -def UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0) -def UnidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(5) +def UnidirectionalSequenceLSTMOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): + """This method is deprecated. Please switch to AddFusedActivationFunction.""" + return AddFusedActivationFunction(builder, fusedActivationFunction) +def AddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0) +def UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): + """This method is deprecated. Please switch to AddCellClip.""" + return AddCellClip(builder, cellClip) +def AddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0) +def UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): + """This method is deprecated. Please switch to AddProjClip.""" + return AddProjClip(builder, projClip) +def AddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(3, timeMajor, 0) +def UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): + """This method is deprecated. Please switch to AddTimeMajor.""" + return AddTimeMajor(builder, timeMajor) +def AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0) +def UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): + """This method is deprecated. Please switch to AddAsymmetricQuantizeInputs.""" + return AddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs) +def End(builder): return builder.EndObject() +def UnidirectionalSequenceLSTMOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/UniqueOptions.py b/ethosu/vela/tflite/UniqueOptions.py index 841c6977..3d0612f9 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) @@ -25,6 +35,15 @@ class UniqueOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 2 -def UniqueOptionsStart(builder): builder.StartObject(1) -def UniqueOptionsAddIdxOutType(builder, idxOutType): builder.PrependInt8Slot(0, idxOutType, 2) -def UniqueOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(1) +def UniqueOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddIdxOutType(builder, idxOutType): builder.PrependInt8Slot(0, idxOutType, 2) +def UniqueOptionsAddIdxOutType(builder, idxOutType): + """This method is deprecated. Please switch to AddIdxOutType.""" + return AddIdxOutType(builder, idxOutType) +def End(builder): return builder.EndObject() +def UniqueOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/UnpackOptions.py b/ethosu/vela/tflite/UnpackOptions.py index eed40193..b70b0409 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) @@ -32,7 +42,19 @@ class UnpackOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def UnpackOptionsStart(builder): builder.StartObject(2) -def UnpackOptionsAddNum(builder, num): builder.PrependInt32Slot(0, num, 0) -def UnpackOptionsAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0) -def UnpackOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def UnpackOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddNum(builder, num): builder.PrependInt32Slot(0, num, 0) +def UnpackOptionsAddNum(builder, num): + """This method is deprecated. Please switch to AddNum.""" + return AddNum(builder, num) +def AddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0) +def UnpackOptionsAddAxis(builder, axis): + """This method is deprecated. Please switch to AddAxis.""" + return AddAxis(builder, axis) +def End(builder): return builder.EndObject() +def UnpackOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/UnsortedSegmentProdOptions.py b/ethosu/vela/tflite/UnsortedSegmentProdOptions.py deleted file mode 100644 index 46650192..00000000 --- a/ethosu/vela/tflite/UnsortedSegmentProdOptions.py +++ /dev/null @@ -1,30 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: tflite - -import flatbuffers - -class UnsortedSegmentProdOptions(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsUnsortedSegmentProdOptions(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = UnsortedSegmentProdOptions() - x.Init(buf, n + offset) - return x - - # 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 UnsortedSegmentProdOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/VarHandleOptions.py b/ethosu/vela/tflite/VarHandleOptions.py index ff05e77f..97164109 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) @@ -32,7 +42,19 @@ class VarHandleOptions(object): return self._tab.String(o + self._tab.Pos) return None -def VarHandleOptionsStart(builder): builder.StartObject(2) -def VarHandleOptionsAddContainer(builder, container): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(container), 0) -def VarHandleOptionsAddSharedName(builder, sharedName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(sharedName), 0) -def VarHandleOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def VarHandleOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddContainer(builder, container): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(container), 0) +def VarHandleOptionsAddContainer(builder, container): + """This method is deprecated. Please switch to AddContainer.""" + return AddContainer(builder, container) +def AddSharedName(builder, sharedName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(sharedName), 0) +def VarHandleOptionsAddSharedName(builder, sharedName): + """This method is deprecated. Please switch to AddSharedName.""" + return AddSharedName(builder, sharedName) +def End(builder): return builder.EndObject() +def VarHandleOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/WhereOptions.py b/ethosu/vela/tflite/WhereOptions.py index ab69f6aa..c0083a5a 100644 --- a/ethosu/vela/tflite/WhereOptions.py +++ b/ethosu/vela/tflite/WhereOptions.py @@ -3,20 +3,36 @@ # 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 WhereOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def WhereOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def WhereOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/WhileOptions.py b/ethosu/vela/tflite/WhileOptions.py index 7d5a6dfa..eca73e5e 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) @@ -32,7 +42,19 @@ class WhileOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def WhileOptionsStart(builder): builder.StartObject(2) -def WhileOptionsAddCondSubgraphIndex(builder, condSubgraphIndex): builder.PrependInt32Slot(0, condSubgraphIndex, 0) -def WhileOptionsAddBodySubgraphIndex(builder, bodySubgraphIndex): builder.PrependInt32Slot(1, bodySubgraphIndex, 0) -def WhileOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(2) +def WhileOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def AddCondSubgraphIndex(builder, condSubgraphIndex): builder.PrependInt32Slot(0, condSubgraphIndex, 0) +def WhileOptionsAddCondSubgraphIndex(builder, condSubgraphIndex): + """This method is deprecated. Please switch to AddCondSubgraphIndex.""" + return AddCondSubgraphIndex(builder, condSubgraphIndex) +def AddBodySubgraphIndex(builder, bodySubgraphIndex): builder.PrependInt32Slot(1, bodySubgraphIndex, 0) +def WhileOptionsAddBodySubgraphIndex(builder, bodySubgraphIndex): + """This method is deprecated. Please switch to AddBodySubgraphIndex.""" + return AddBodySubgraphIndex(builder, bodySubgraphIndex) +def End(builder): return builder.EndObject() +def WhileOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite/ZerosLikeOptions.py b/ethosu/vela/tflite/ZerosLikeOptions.py index e6aa9639..2b32f87c 100644 --- a/ethosu/vela/tflite/ZerosLikeOptions.py +++ b/ethosu/vela/tflite/ZerosLikeOptions.py @@ -3,20 +3,36 @@ # 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 ZerosLikeOptionsEnd(builder): return builder.EndObject() +def Start(builder): builder.StartObject(0) +def ZerosLikeOptionsStart(builder): + """This method is deprecated. Please switch to Start.""" + return Start(builder) +def End(builder): return builder.EndObject() +def ZerosLikeOptionsEnd(builder): + """This method is deprecated. Please switch to End.""" + return End(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py index ae9bdf05..bf155b9c 100644 --- a/ethosu/vela/tflite_mapping.py +++ b/ethosu/vela/tflite_mapping.py @@ -139,7 +139,6 @@ from .tflite import TransposeOptions from .tflite import UnidirectionalSequenceLSTMOptions from .tflite import UniqueOptions from .tflite import UnpackOptions -from .tflite import UnsortedSegmentProdOptions from .tflite import VarHandleOptions from .tflite import WhereOptions from .tflite import WhileOptions @@ -322,7 +321,6 @@ builtin_options_map = { BuiltinOptions.BucketizeOptions: BucketizeOptions.BucketizeOptions, BuiltinOptions.DynamicUpdateSliceOptions: DynamicUpdateSliceOptions.DynamicUpdateSliceOptions, BuiltinOptions.GeluOptions: GeluOptions.GeluOptions, - BuiltinOptions.UnsortedSegmentProdOptions: UnsortedSegmentProdOptions.UnsortedSegmentProdOptions, } @@ -590,7 +588,6 @@ builtin_operator_map = { ), BuiltinOperator.MUL: (Op.Mul, OptionsSerializer("MulOptions", (fused_act,)), TFLITE_IFM_IFM2_INDICES), BuiltinOperator.RELU: (Op.Relu, None, TFLITE_IFM_INDICES), - BuiltinOperator.RELU_0_TO_1: (Op.Relu0To1, None, TFLITE_IFM_INDICES), BuiltinOperator.RELU_N1_TO_1: (Op.ReluN1To1, None, TFLITE_IFM_INDICES), BuiltinOperator.RELU6: (Op.Relu6, None, TFLITE_IFM_INDICES), BuiltinOperator.RESHAPE: ( @@ -968,11 +965,6 @@ builtin_operator_map = { OptionsSerializer("DynamicUpdateSliceOptions"), TFLITE_NO_INDICES, ), - BuiltinOperator.UNSORTED_SEGMENT_PROD: ( - Op.UnsortedSegmentProd, - OptionsSerializer("UnsortedSegmentProdOptions", ("numsegments",)), - TFLITE_NO_INDICES, - ), BuiltinOperator.CUSTOM: (Op.Custom, CustomOptionsSerializer(), TFLITE_NO_INDICES), } |