diff options
author | erik.andersson@arm.com <erik.andersson@arm.com> | 2022-06-29 09:46:30 +0200 |
---|---|---|
committer | erik.andersson@arm.com <erik.andersson@arm.com> | 2022-07-14 14:09:44 +0200 |
commit | 93f492bae9c4dd16a1f64b851b237263695ee03e (patch) | |
tree | b3c3c7b8d091ebb737dc53df23b690eadea87335 /ethosu/vela | |
parent | d03dc504452dbb32db383121f3dad81f4280bb3c (diff) | |
download | ethos-u-vela-93f492bae9c4dd16a1f64b851b237263695ee03e.tar.gz |
MLBEDSW-6635: Update to TensorFlow 2.9
Update the flatbuffers generated code to comply with TensorFlow 2.9
Signed-off-by: erik.andersson@arm.com <erik.andersson@arm.com>
Change-Id: I6bf506ffb85da2d4a57a32198b471513deeaca73
Diffstat (limited to 'ethosu/vela')
138 files changed, 683 insertions, 3671 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 9488fb7f..5ed18621 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -241,6 +241,7 @@ 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 @@ -319,6 +320,7 @@ 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 4c259ac8..0cbfb8c0 100644 --- a/ethosu/vela/tflite/AbsOptions.py +++ b/ethosu/vela/tflite/AbsOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class AbsOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsAbsOptions(cls, buf, offset): 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 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 +def AbsOptionsStart(builder): builder.StartObject(0) +def AbsOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/AddNOptions.py b/ethosu/vela/tflite/AddNOptions.py index 8d1381f7..b5c2ddb7 100644 --- a/ethosu/vela/tflite/AddNOptions.py +++ b/ethosu/vela/tflite/AddNOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class AddNOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsAddNOptions(cls, buf, offset): 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 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 +def AddNOptionsStart(builder): builder.StartObject(0) +def AddNOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/AddOptions.py b/ethosu/vela/tflite/AddOptions.py index dfb12b3e..154e6d18 100644 --- a/ethosu/vela/tflite/AddOptions.py +++ b/ethosu/vela/tflite/AddOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class AddOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsAddOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class AddOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return True -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 +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() diff --git a/ethosu/vela/tflite/ArgMaxOptions.py b/ethosu/vela/tflite/ArgMaxOptions.py index e2f02667..fbf1415e 100644 --- a/ethosu/vela/tflite/ArgMaxOptions.py +++ b/ethosu/vela/tflite/ArgMaxOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ArgMaxOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsArgMaxOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class ArgMaxOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def ArgMaxOptionsStart(builder): builder.StartObject(1) +def ArgMaxOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) +def ArgMaxOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ArgMinOptions.py b/ethosu/vela/tflite/ArgMinOptions.py index ffe6c982..120fdca2 100644 --- a/ethosu/vela/tflite/ArgMinOptions.py +++ b/ethosu/vela/tflite/ArgMinOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ArgMinOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsArgMinOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class ArgMinOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def ArgMinOptionsStart(builder): builder.StartObject(1) +def ArgMinOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0) +def ArgMinOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/AssignVariableOptions.py b/ethosu/vela/tflite/AssignVariableOptions.py index 813ff5e6..f214bcb6 100644 --- a/ethosu/vela/tflite/AssignVariableOptions.py +++ b/ethosu/vela/tflite/AssignVariableOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class AssignVariableOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsAssignVariableOptions(cls, buf, offset): 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 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 +def AssignVariableOptionsStart(builder): builder.StartObject(0) +def AssignVariableOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/BatchMatMulOptions.py b/ethosu/vela/tflite/BatchMatMulOptions.py index a093ee5e..c0f755bd 100644 --- a/ethosu/vela/tflite/BatchMatMulOptions.py +++ b/ethosu/vela/tflite/BatchMatMulOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BatchMatMulOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBatchMatMulOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class BatchMatMulOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/BatchToSpaceNDOptions.py b/ethosu/vela/tflite/BatchToSpaceNDOptions.py index c6df0350..3ddcfd3f 100644 --- a/ethosu/vela/tflite/BatchToSpaceNDOptions.py +++ b/ethosu/vela/tflite/BatchToSpaceNDOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BatchToSpaceNDOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBatchToSpaceNDOptions(cls, buf, offset): 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 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 +def BatchToSpaceNDOptionsStart(builder): builder.StartObject(0) +def BatchToSpaceNDOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py index f24b311e..0a0a83b7 100644 --- a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py +++ b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BidirectionalSequenceLSTMOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBidirectionalSequenceLSTMOptions(cls, buf, offset): 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) @@ -70,35 +60,11 @@ class BidirectionalSequenceLSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py index 9e15c4b9..e1f66ce2 100644 --- a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py +++ b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BidirectionalSequenceRNNOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBidirectionalSequenceRNNOptions(cls, buf, offset): 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) @@ -56,27 +46,9 @@ class BidirectionalSequenceRNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/BroadcastToOptions.py b/ethosu/vela/tflite/BroadcastToOptions.py index 55afcfac..3b3dce85 100644 --- a/ethosu/vela/tflite/BroadcastToOptions.py +++ b/ethosu/vela/tflite/BroadcastToOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BroadcastToOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBroadcastToOptions(cls, buf, offset): 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 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 +def BroadcastToOptionsStart(builder): builder.StartObject(0) +def BroadcastToOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/BucketizeOptions.py b/ethosu/vela/tflite/BucketizeOptions.py index e54d8294..d4a87015 100644 --- a/ethosu/vela/tflite/BucketizeOptions.py +++ b/ethosu/vela/tflite/BucketizeOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class BucketizeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBucketizeOptions(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class BucketizeOptions(object): return self._tab.VectorLen(o) return 0 - # BucketizeOptions - def BoundariesIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/Buffer.py b/ethosu/vela/tflite/Buffer.py index ea2abede..754dee3b 100644 --- a/ethosu/vela/tflite/Buffer.py +++ b/ethosu/vela/tflite/Buffer.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Buffer(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsBuffer(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class Buffer(object): return self._tab.VectorLen(o) return 0 - # Buffer - def DataIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/BuiltinOperator.py b/ethosu/vela/tflite/BuiltinOperator.py index 5ddcf202..4004a3b0 100644 --- a/ethosu/vela/tflite/BuiltinOperator.py +++ b/ethosu/vela/tflite/BuiltinOperator.py @@ -155,4 +155,6 @@ 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 4358605c..2ab36db6 100644 --- a/ethosu/vela/tflite/BuiltinOptions.py +++ b/ethosu/vela/tflite/BuiltinOptions.py @@ -121,4 +121,5 @@ 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 f43715fa..6a687913 100644 --- a/ethosu/vela/tflite/CallOnceOptions.py +++ b/ethosu/vela/tflite/CallOnceOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CallOnceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCallOnceOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class CallOnceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def CallOnceOptionsStart(builder): builder.StartObject(1) +def CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex): builder.PrependInt32Slot(0, initSubgraphIndex, 0) +def CallOnceOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/CallOptions.py b/ethosu/vela/tflite/CallOptions.py index c3b2eec4..5ae2eeae 100644 --- a/ethosu/vela/tflite/CallOptions.py +++ b/ethosu/vela/tflite/CallOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CallOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCallOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class CallOptions(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -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 +def CallOptionsStart(builder): builder.StartObject(1) +def CallOptionsAddSubgraph(builder, subgraph): builder.PrependUint32Slot(0, subgraph, 0) +def CallOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/CastOptions.py b/ethosu/vela/tflite/CastOptions.py index 9060b51f..70ae2e37 100644 --- a/ethosu/vela/tflite/CastOptions.py +++ b/ethosu/vela/tflite/CastOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CastOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCastOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class CastOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py index 250f7544..9d26c510 100644 --- a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py +++ b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ConcatEmbeddingsOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsConcatEmbeddingsOptions(cls, buf, offset): 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) @@ -58,11 +48,6 @@ 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: @@ -84,36 +69,10 @@ class ConcatEmbeddingsOptions(object): return self._tab.VectorLen(o) return 0 - # ConcatEmbeddingsOptions - def EmbeddingDimPerChannelIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/ConcatenationOptions.py b/ethosu/vela/tflite/ConcatenationOptions.py index 19f76800..c8e0b6ab 100644 --- a/ethosu/vela/tflite/ConcatenationOptions.py +++ b/ethosu/vela/tflite/ConcatenationOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ConcatenationOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsConcatenationOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class ConcatenationOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/Conv2DOptions.py b/ethosu/vela/tflite/Conv2DOptions.py index 33a8569d..ef49f751 100644 --- a/ethosu/vela/tflite/Conv2DOptions.py +++ b/ethosu/vela/tflite/Conv2DOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Conv2DOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsConv2DOptions(cls, buf, offset): 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) @@ -70,35 +60,11 @@ class Conv2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -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 +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() diff --git a/ethosu/vela/tflite/Conv3DOptions.py b/ethosu/vela/tflite/Conv3DOptions.py index 849df22e..e8f4ab2d 100644 --- a/ethosu/vela/tflite/Conv3DOptions.py +++ b/ethosu/vela/tflite/Conv3DOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Conv3DOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsConv3DOptions(cls, buf, offset): 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) @@ -84,43 +74,13 @@ class Conv3DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -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 +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() diff --git a/ethosu/vela/tflite/CosOptions.py b/ethosu/vela/tflite/CosOptions.py index 6f03822a..7fbf8487 100644 --- a/ethosu/vela/tflite/CosOptions.py +++ b/ethosu/vela/tflite/CosOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CosOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCosOptions(cls, buf, offset): 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 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 +def CosOptionsStart(builder): builder.StartObject(0) +def CosOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/CumsumOptions.py b/ethosu/vela/tflite/CumsumOptions.py index 66410f16..33e086ef 100644 --- a/ethosu/vela/tflite/CumsumOptions.py +++ b/ethosu/vela/tflite/CumsumOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CumsumOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCumsumOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class CumsumOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/CustomQuantization.py b/ethosu/vela/tflite/CustomQuantization.py index c04c280e..21ec0da4 100644 --- a/ethosu/vela/tflite/CustomQuantization.py +++ b/ethosu/vela/tflite/CustomQuantization.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class CustomQuantization(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsCustomQuantization(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class CustomQuantization(object): return self._tab.VectorLen(o) return 0 - # CustomQuantization - def CustomIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/DensifyOptions.py b/ethosu/vela/tflite/DensifyOptions.py index aa8ff7f3..12cbfb29 100644 --- a/ethosu/vela/tflite/DensifyOptions.py +++ b/ethosu/vela/tflite/DensifyOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DensifyOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDensifyOptions(cls, buf, offset): 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 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 +def DensifyOptionsStart(builder): builder.StartObject(0) +def DensifyOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/DepthToSpaceOptions.py b/ethosu/vela/tflite/DepthToSpaceOptions.py index 46a46e8c..97b93aa7 100644 --- a/ethosu/vela/tflite/DepthToSpaceOptions.py +++ b/ethosu/vela/tflite/DepthToSpaceOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DepthToSpaceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDepthToSpaceOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class DepthToSpaceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def DepthToSpaceOptionsStart(builder): builder.StartObject(1) +def DepthToSpaceOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) +def DepthToSpaceOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/DepthwiseConv2DOptions.py b/ethosu/vela/tflite/DepthwiseConv2DOptions.py index 9a07d1a8..9689383b 100644 --- a/ethosu/vela/tflite/DepthwiseConv2DOptions.py +++ b/ethosu/vela/tflite/DepthwiseConv2DOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DepthwiseConv2DOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDepthwiseConv2DOptions(cls, buf, offset): 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) @@ -77,39 +67,12 @@ class DepthwiseConv2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 1 -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 +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() diff --git a/ethosu/vela/tflite/DequantizeOptions.py b/ethosu/vela/tflite/DequantizeOptions.py index 1eb6842a..5ef8b8dd 100644 --- a/ethosu/vela/tflite/DequantizeOptions.py +++ b/ethosu/vela/tflite/DequantizeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DequantizeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDequantizeOptions(cls, buf, offset): 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 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 +def DequantizeOptionsStart(builder): builder.StartObject(0) +def DequantizeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/DimensionMetadata.py b/ethosu/vela/tflite/DimensionMetadata.py index 86a3cc6b..c9fe7cd6 100644 --- a/ethosu/vela/tflite/DimensionMetadata.py +++ b/ethosu/vela/tflite/DimensionMetadata.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DimensionMetadata(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDimensionMetadata(cls, buf, offset): 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) @@ -76,35 +66,11 @@ class DimensionMetadata(object): return obj return None -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 +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() diff --git a/ethosu/vela/tflite/DivOptions.py b/ethosu/vela/tflite/DivOptions.py index d05746ef..905a3be0 100644 --- a/ethosu/vela/tflite/DivOptions.py +++ b/ethosu/vela/tflite/DivOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DivOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDivOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class DivOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def DivOptionsStart(builder): builder.StartObject(1) +def DivOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def DivOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py index 232b55d8..80d55398 100644 --- a/ethosu/vela/tflite/DynamicUpdateSliceOptions.py +++ b/ethosu/vela/tflite/DynamicUpdateSliceOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class DynamicUpdateSliceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsDynamicUpdateSliceOptions(cls, buf, offset): 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 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 +def DynamicUpdateSliceOptionsStart(builder): builder.StartObject(0) +def DynamicUpdateSliceOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py index 9ee57a1f..7d9c1442 100644 --- a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py +++ b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class EmbeddingLookupSparseOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsEmbeddingLookupSparseOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class EmbeddingLookupSparseOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def EmbeddingLookupSparseOptionsStart(builder): builder.StartObject(1) +def EmbeddingLookupSparseOptionsAddCombiner(builder, combiner): builder.PrependInt8Slot(0, combiner, 0) +def EmbeddingLookupSparseOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/EqualOptions.py b/ethosu/vela/tflite/EqualOptions.py index c616d258..f787ef85 100644 --- a/ethosu/vela/tflite/EqualOptions.py +++ b/ethosu/vela/tflite/EqualOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class EqualOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsEqualOptions(cls, buf, offset): 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 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 +def EqualOptionsStart(builder): builder.StartObject(0) +def EqualOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ExpOptions.py b/ethosu/vela/tflite/ExpOptions.py index ca17de00..eac1456e 100644 --- a/ethosu/vela/tflite/ExpOptions.py +++ b/ethosu/vela/tflite/ExpOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ExpOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsExpOptions(cls, buf, offset): 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 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 +def ExpOptionsStart(builder): builder.StartObject(0) +def ExpOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ExpandDimsOptions.py b/ethosu/vela/tflite/ExpandDimsOptions.py index 5e38a0d3..69d63665 100644 --- a/ethosu/vela/tflite/ExpandDimsOptions.py +++ b/ethosu/vela/tflite/ExpandDimsOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ExpandDimsOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsExpandDimsOptions(cls, buf, offset): 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 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 +def ExpandDimsOptionsStart(builder): builder.StartObject(0) +def ExpandDimsOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/FakeQuantOptions.py b/ethosu/vela/tflite/FakeQuantOptions.py index 43d5a780..46c371c3 100644 --- a/ethosu/vela/tflite/FakeQuantOptions.py +++ b/ethosu/vela/tflite/FakeQuantOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class FakeQuantOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsFakeQuantOptions(cls, buf, offset): 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) @@ -56,27 +46,9 @@ class FakeQuantOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/FillOptions.py b/ethosu/vela/tflite/FillOptions.py index bc2bcd28..5a1e651a 100644 --- a/ethosu/vela/tflite/FillOptions.py +++ b/ethosu/vela/tflite/FillOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class FillOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsFillOptions(cls, buf, offset): 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 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 +def FillOptionsStart(builder): builder.StartObject(0) +def FillOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/FloorDivOptions.py b/ethosu/vela/tflite/FloorDivOptions.py index 3fed6755..64b474fb 100644 --- a/ethosu/vela/tflite/FloorDivOptions.py +++ b/ethosu/vela/tflite/FloorDivOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class FloorDivOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsFloorDivOptions(cls, buf, offset): 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 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 +def FloorDivOptionsStart(builder): builder.StartObject(0) +def FloorDivOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/FloorModOptions.py b/ethosu/vela/tflite/FloorModOptions.py index df3b2c3d..37c8e5a5 100644 --- a/ethosu/vela/tflite/FloorModOptions.py +++ b/ethosu/vela/tflite/FloorModOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class FloorModOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsFloorModOptions(cls, buf, offset): 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 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 +def FloorModOptionsStart(builder): builder.StartObject(0) +def FloorModOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/FullyConnectedOptions.py b/ethosu/vela/tflite/FullyConnectedOptions.py index 72ae00ba..5475e3d9 100644 --- a/ethosu/vela/tflite/FullyConnectedOptions.py +++ b/ethosu/vela/tflite/FullyConnectedOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class FullyConnectedOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsFullyConnectedOptions(cls, buf, offset): 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) @@ -56,27 +46,9 @@ class FullyConnectedOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/GatherNdOptions.py b/ethosu/vela/tflite/GatherNdOptions.py index 8d76f402..f515eb5c 100644 --- a/ethosu/vela/tflite/GatherNdOptions.py +++ b/ethosu/vela/tflite/GatherNdOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class GatherNdOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsGatherNdOptions(cls, buf, offset): 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 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 +def GatherNdOptionsStart(builder): builder.StartObject(0) +def GatherNdOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/GatherOptions.py b/ethosu/vela/tflite/GatherOptions.py index 2235e07c..fd933219 100644 --- a/ethosu/vela/tflite/GatherOptions.py +++ b/ethosu/vela/tflite/GatherOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class GatherOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsGatherOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class GatherOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/GeluOptions.py b/ethosu/vela/tflite/GeluOptions.py index 71b9a32b..3705084d 100644 --- a/ethosu/vela/tflite/GeluOptions.py +++ b/ethosu/vela/tflite/GeluOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class GeluOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsGeluOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class GeluOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +def GeluOptionsStart(builder): builder.StartObject(1) +def GeluOptionsAddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0) +def GeluOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/GreaterEqualOptions.py b/ethosu/vela/tflite/GreaterEqualOptions.py index c1606565..a29e200a 100644 --- a/ethosu/vela/tflite/GreaterEqualOptions.py +++ b/ethosu/vela/tflite/GreaterEqualOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class GreaterEqualOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsGreaterEqualOptions(cls, buf, offset): 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 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 +def GreaterEqualOptionsStart(builder): builder.StartObject(0) +def GreaterEqualOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/GreaterOptions.py b/ethosu/vela/tflite/GreaterOptions.py index 6904bb92..59d63501 100644 --- a/ethosu/vela/tflite/GreaterOptions.py +++ b/ethosu/vela/tflite/GreaterOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class GreaterOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsGreaterOptions(cls, buf, offset): 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 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 +def GreaterOptionsStart(builder): builder.StartObject(0) +def GreaterOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/HardSwishOptions.py b/ethosu/vela/tflite/HardSwishOptions.py index 6903501c..4f6a5200 100644 --- a/ethosu/vela/tflite/HardSwishOptions.py +++ b/ethosu/vela/tflite/HardSwishOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class HardSwishOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsHardSwishOptions(cls, buf, offset): 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 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 +def HardSwishOptionsStart(builder): builder.StartObject(0) +def HardSwishOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/HashtableFindOptions.py b/ethosu/vela/tflite/HashtableFindOptions.py index 5dcb5339..fa9d31d1 100644 --- a/ethosu/vela/tflite/HashtableFindOptions.py +++ b/ethosu/vela/tflite/HashtableFindOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class HashtableFindOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsHashtableFindOptions(cls, buf, offset): 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 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 +def HashtableFindOptionsStart(builder): builder.StartObject(0) +def HashtableFindOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/HashtableImportOptions.py b/ethosu/vela/tflite/HashtableImportOptions.py index 846f76ec..cd72df49 100644 --- a/ethosu/vela/tflite/HashtableImportOptions.py +++ b/ethosu/vela/tflite/HashtableImportOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class HashtableImportOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsHashtableImportOptions(cls, buf, offset): 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 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 +def HashtableImportOptionsStart(builder): builder.StartObject(0) +def HashtableImportOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/HashtableOptions.py b/ethosu/vela/tflite/HashtableOptions.py index 2bc1a877..acdd9daa 100644 --- a/ethosu/vela/tflite/HashtableOptions.py +++ b/ethosu/vela/tflite/HashtableOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class HashtableOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsHashtableOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class HashtableOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/HashtableSizeOptions.py b/ethosu/vela/tflite/HashtableSizeOptions.py index 5e71aa8e..b69650d1 100644 --- a/ethosu/vela/tflite/HashtableSizeOptions.py +++ b/ethosu/vela/tflite/HashtableSizeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class HashtableSizeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsHashtableSizeOptions(cls, buf, offset): 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 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 +def HashtableSizeOptionsStart(builder): builder.StartObject(0) +def HashtableSizeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/IfOptions.py b/ethosu/vela/tflite/IfOptions.py index bdc56b2f..13f4e697 100644 --- a/ethosu/vela/tflite/IfOptions.py +++ b/ethosu/vela/tflite/IfOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class IfOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsIfOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class IfOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/Int32Vector.py b/ethosu/vela/tflite/Int32Vector.py index bfa5b3a2..e70851b2 100644 --- a/ethosu/vela/tflite/Int32Vector.py +++ b/ethosu/vela/tflite/Int32Vector.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Int32Vector(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsInt32Vector(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class Int32Vector(object): return self._tab.VectorLen(o) return 0 - # Int32Vector - def ValuesIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/L2NormOptions.py b/ethosu/vela/tflite/L2NormOptions.py index 6e033ca1..38bdf573 100644 --- a/ethosu/vela/tflite/L2NormOptions.py +++ b/ethosu/vela/tflite/L2NormOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class L2NormOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsL2NormOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class L2NormOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def L2NormOptionsStart(builder): builder.StartObject(1) +def L2NormOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def L2NormOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LSHProjectionOptions.py b/ethosu/vela/tflite/LSHProjectionOptions.py index 569d1135..ad550be2 100644 --- a/ethosu/vela/tflite/LSHProjectionOptions.py +++ b/ethosu/vela/tflite/LSHProjectionOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LSHProjectionOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLSHProjectionOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class LSHProjectionOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def LSHProjectionOptionsStart(builder): builder.StartObject(1) +def LSHProjectionOptionsAddType(builder, type): builder.PrependInt8Slot(0, type, 0) +def LSHProjectionOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LSTMOptions.py b/ethosu/vela/tflite/LSTMOptions.py index 04e2ac92..2f519bc2 100644 --- a/ethosu/vela/tflite/LSTMOptions.py +++ b/ethosu/vela/tflite/LSTMOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LSTMOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLSTMOptions(cls, buf, offset): 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) @@ -63,31 +53,10 @@ class LSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/LeakyReluOptions.py b/ethosu/vela/tflite/LeakyReluOptions.py index ab4bfc24..b61b21d5 100644 --- a/ethosu/vela/tflite/LeakyReluOptions.py +++ b/ethosu/vela/tflite/LeakyReluOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LeakyReluOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLeakyReluOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class LeakyReluOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -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 +def LeakyReluOptionsStart(builder): builder.StartObject(1) +def LeakyReluOptionsAddAlpha(builder, alpha): builder.PrependFloat32Slot(0, alpha, 0.0) +def LeakyReluOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LessEqualOptions.py b/ethosu/vela/tflite/LessEqualOptions.py index 8861b8cf..d49b7289 100644 --- a/ethosu/vela/tflite/LessEqualOptions.py +++ b/ethosu/vela/tflite/LessEqualOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LessEqualOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLessEqualOptions(cls, buf, offset): 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 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 +def LessEqualOptionsStart(builder): builder.StartObject(0) +def LessEqualOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LessOptions.py b/ethosu/vela/tflite/LessOptions.py index a207b775..469cb0b0 100644 --- a/ethosu/vela/tflite/LessOptions.py +++ b/ethosu/vela/tflite/LessOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LessOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLessOptions(cls, buf, offset): 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 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 +def LessOptionsStart(builder): builder.StartObject(0) +def LessOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py index 3831c873..db875603 100644 --- a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py +++ b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LocalResponseNormalizationOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLocalResponseNormalizationOptions(cls, buf, offset): 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) @@ -56,27 +46,9 @@ class LocalResponseNormalizationOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -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 +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() diff --git a/ethosu/vela/tflite/LogSoftmaxOptions.py b/ethosu/vela/tflite/LogSoftmaxOptions.py index 9c88b4c7..47893855 100644 --- a/ethosu/vela/tflite/LogSoftmaxOptions.py +++ b/ethosu/vela/tflite/LogSoftmaxOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LogSoftmaxOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLogSoftmaxOptions(cls, buf, offset): 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 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 +def LogSoftmaxOptionsStart(builder): builder.StartObject(0) +def LogSoftmaxOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LogicalAndOptions.py b/ethosu/vela/tflite/LogicalAndOptions.py index 62d3025e..cee1cdb4 100644 --- a/ethosu/vela/tflite/LogicalAndOptions.py +++ b/ethosu/vela/tflite/LogicalAndOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LogicalAndOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLogicalAndOptions(cls, buf, offset): 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 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 +def LogicalAndOptionsStart(builder): builder.StartObject(0) +def LogicalAndOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LogicalNotOptions.py b/ethosu/vela/tflite/LogicalNotOptions.py index 2a793ccb..9971450c 100644 --- a/ethosu/vela/tflite/LogicalNotOptions.py +++ b/ethosu/vela/tflite/LogicalNotOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LogicalNotOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLogicalNotOptions(cls, buf, offset): 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 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 +def LogicalNotOptionsStart(builder): builder.StartObject(0) +def LogicalNotOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/LogicalOrOptions.py b/ethosu/vela/tflite/LogicalOrOptions.py index 6e9ec5b2..e94a5dec 100644 --- a/ethosu/vela/tflite/LogicalOrOptions.py +++ b/ethosu/vela/tflite/LogicalOrOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class LogicalOrOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsLogicalOrOptions(cls, buf, offset): 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 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 +def LogicalOrOptionsStart(builder): builder.StartObject(0) +def LogicalOrOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/MatrixDiagOptions.py b/ethosu/vela/tflite/MatrixDiagOptions.py index f4a4a669..0f64e657 100644 --- a/ethosu/vela/tflite/MatrixDiagOptions.py +++ b/ethosu/vela/tflite/MatrixDiagOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class MatrixDiagOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMatrixDiagOptions(cls, buf, offset): 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 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 +def MatrixDiagOptionsStart(builder): builder.StartObject(0) +def MatrixDiagOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/MatrixSetDiagOptions.py b/ethosu/vela/tflite/MatrixSetDiagOptions.py index d0a93159..14178cf8 100644 --- a/ethosu/vela/tflite/MatrixSetDiagOptions.py +++ b/ethosu/vela/tflite/MatrixSetDiagOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class MatrixSetDiagOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMatrixSetDiagOptions(cls, buf, offset): 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 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 +def MatrixSetDiagOptionsStart(builder): builder.StartObject(0) +def MatrixSetDiagOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/MaximumMinimumOptions.py b/ethosu/vela/tflite/MaximumMinimumOptions.py index f5b91f8d..f0806e2d 100644 --- a/ethosu/vela/tflite/MaximumMinimumOptions.py +++ b/ethosu/vela/tflite/MaximumMinimumOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class MaximumMinimumOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMaximumMinimumOptions(cls, buf, offset): 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 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 +def MaximumMinimumOptionsStart(builder): builder.StartObject(0) +def MaximumMinimumOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Metadata.py b/ethosu/vela/tflite/Metadata.py index c0a83917..273e51ee 100644 --- a/ethosu/vela/tflite/Metadata.py +++ b/ethosu/vela/tflite/Metadata.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Metadata(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMetadata(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class Metadata(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/MirrorPadOptions.py b/ethosu/vela/tflite/MirrorPadOptions.py index 76a0076a..254ae217 100644 --- a/ethosu/vela/tflite/MirrorPadOptions.py +++ b/ethosu/vela/tflite/MirrorPadOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class MirrorPadOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMirrorPadOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class MirrorPadOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def MirrorPadOptionsStart(builder): builder.StartObject(1) +def MirrorPadOptionsAddMode(builder, mode): builder.PrependInt8Slot(0, mode, 0) +def MirrorPadOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Model.py b/ethosu/vela/tflite/Model.py index 8a12d103..52aac021 100644 --- a/ethosu/vela/tflite/Model.py +++ b/ethosu/vela/tflite/Model.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Model(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsModel(cls, buf, offset): 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) @@ -56,11 +46,6 @@ 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: @@ -81,11 +66,6 @@ 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: @@ -113,11 +93,6 @@ 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: @@ -140,11 +115,6 @@ 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: @@ -165,11 +135,6 @@ 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: @@ -189,72 +154,19 @@ class Model(object): return self._tab.VectorLen(o) return 0 - # Model - def SignatureDefsIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/MulOptions.py b/ethosu/vela/tflite/MulOptions.py index 9ef9eb36..55b9506f 100644 --- a/ethosu/vela/tflite/MulOptions.py +++ b/ethosu/vela/tflite/MulOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class MulOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsMulOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class MulOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def MulOptionsStart(builder): builder.StartObject(1) +def MulOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0) +def MulOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/NegOptions.py b/ethosu/vela/tflite/NegOptions.py index 62a544c0..05d55c26 100644 --- a/ethosu/vela/tflite/NegOptions.py +++ b/ethosu/vela/tflite/NegOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class NegOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsNegOptions(cls, buf, offset): 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 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 +def NegOptionsStart(builder): builder.StartObject(0) +def NegOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py index beb361da..6ad10a2e 100644 --- a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py +++ b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class NonMaxSuppressionV4Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsNonMaxSuppressionV4Options(cls, buf, offset): 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 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 +def NonMaxSuppressionV4OptionsStart(builder): builder.StartObject(0) +def NonMaxSuppressionV4OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py index 1c87108d..99cbdbbf 100644 --- a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py +++ b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class NonMaxSuppressionV5Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsNonMaxSuppressionV5Options(cls, buf, offset): 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 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 +def NonMaxSuppressionV5OptionsStart(builder): builder.StartObject(0) +def NonMaxSuppressionV5OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/NotEqualOptions.py b/ethosu/vela/tflite/NotEqualOptions.py index 54652705..4c511e93 100644 --- a/ethosu/vela/tflite/NotEqualOptions.py +++ b/ethosu/vela/tflite/NotEqualOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class NotEqualOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsNotEqualOptions(cls, buf, offset): 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 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 +def NotEqualOptionsStart(builder): builder.StartObject(0) +def NotEqualOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/OneHotOptions.py b/ethosu/vela/tflite/OneHotOptions.py index a4de3e4b..793a3e75 100644 --- a/ethosu/vela/tflite/OneHotOptions.py +++ b/ethosu/vela/tflite/OneHotOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class OneHotOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsOneHotOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class OneHotOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def OneHotOptionsStart(builder): builder.StartObject(1) +def OneHotOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) +def OneHotOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py index ce23bedc..cbae3dab 100644 --- a/ethosu/vela/tflite/Operator.py +++ b/ethosu/vela/tflite/Operator.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Operator(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsOperator(cls, buf, offset): 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) @@ -58,11 +48,6 @@ 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: @@ -85,11 +70,6 @@ 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: @@ -129,11 +109,6 @@ 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: @@ -163,11 +138,6 @@ 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: @@ -189,72 +159,19 @@ class Operator(object): return self._tab.VectorLen(o) return 0 - # Operator - def IntermediatesIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/OperatorCode.py b/ethosu/vela/tflite/OperatorCode.py index 1b95a23d..5a0ba2a4 100644 --- a/ethosu/vela/tflite/OperatorCode.py +++ b/ethosu/vela/tflite/OperatorCode.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class OperatorCode(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsOperatorCode(cls, buf, offset): 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) @@ -56,27 +46,9 @@ class OperatorCode(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/PackOptions.py b/ethosu/vela/tflite/PackOptions.py index 89bf80aa..6a8ee2bb 100644 --- a/ethosu/vela/tflite/PackOptions.py +++ b/ethosu/vela/tflite/PackOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class PackOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsPackOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class PackOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/PadOptions.py b/ethosu/vela/tflite/PadOptions.py index 5a336bf1..d0833c68 100644 --- a/ethosu/vela/tflite/PadOptions.py +++ b/ethosu/vela/tflite/PadOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class PadOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsPadOptions(cls, buf, offset): 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 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 +def PadOptionsStart(builder): builder.StartObject(0) +def PadOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/PadV2Options.py b/ethosu/vela/tflite/PadV2Options.py index 62bfbc78..5ea0d70c 100644 --- a/ethosu/vela/tflite/PadV2Options.py +++ b/ethosu/vela/tflite/PadV2Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class PadV2Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsPadV2Options(cls, buf, offset): 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 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 +def PadV2OptionsStart(builder): builder.StartObject(0) +def PadV2OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Pool2DOptions.py b/ethosu/vela/tflite/Pool2DOptions.py index e7e16237..b8b9f178 100644 --- a/ethosu/vela/tflite/Pool2DOptions.py +++ b/ethosu/vela/tflite/Pool2DOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Pool2DOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsPool2DOptions(cls, buf, offset): 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) @@ -70,35 +60,11 @@ class Pool2DOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/PowOptions.py b/ethosu/vela/tflite/PowOptions.py index 0ce6adec..666ca488 100644 --- a/ethosu/vela/tflite/PowOptions.py +++ b/ethosu/vela/tflite/PowOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class PowOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsPowOptions(cls, buf, offset): 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 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 +def PowOptionsStart(builder): builder.StartObject(0) +def PowOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/QuantizationParameters.py b/ethosu/vela/tflite/QuantizationParameters.py index 8b6a35e5..fcd686cf 100644 --- a/ethosu/vela/tflite/QuantizationParameters.py +++ b/ethosu/vela/tflite/QuantizationParameters.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class QuantizationParameters(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsQuantizationParameters(cls, buf, offset): 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) @@ -51,11 +41,6 @@ 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: @@ -78,11 +63,6 @@ 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: @@ -105,11 +85,6 @@ 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: @@ -132,11 +107,6 @@ 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: @@ -160,55 +130,16 @@ class QuantizationParameters(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/QuantizeOptions.py b/ethosu/vela/tflite/QuantizeOptions.py index 404a2cfc..28af8cc9 100644 --- a/ethosu/vela/tflite/QuantizeOptions.py +++ b/ethosu/vela/tflite/QuantizeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class QuantizeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsQuantizeOptions(cls, buf, offset): 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 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 +def QuantizeOptionsStart(builder): builder.StartObject(0) +def QuantizeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/RNNOptions.py b/ethosu/vela/tflite/RNNOptions.py index 67c48011..397d716f 100644 --- a/ethosu/vela/tflite/RNNOptions.py +++ b/ethosu/vela/tflite/RNNOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class RNNOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsRNNOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class RNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/RandomOptions.py b/ethosu/vela/tflite/RandomOptions.py index e9411ffd..18ffc5fb 100644 --- a/ethosu/vela/tflite/RandomOptions.py +++ b/ethosu/vela/tflite/RandomOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class RandomOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsRandomOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class RandomOptions(object): return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/RangeOptions.py b/ethosu/vela/tflite/RangeOptions.py index fdc73176..cb705b57 100644 --- a/ethosu/vela/tflite/RangeOptions.py +++ b/ethosu/vela/tflite/RangeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class RangeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsRangeOptions(cls, buf, offset): 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 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 +def RangeOptionsStart(builder): builder.StartObject(0) +def RangeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/RankOptions.py b/ethosu/vela/tflite/RankOptions.py index 64ea9979..4e4a5ecd 100644 --- a/ethosu/vela/tflite/RankOptions.py +++ b/ethosu/vela/tflite/RankOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class RankOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsRankOptions(cls, buf, offset): 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 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 +def RankOptionsStart(builder): builder.StartObject(0) +def RankOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ReadVariableOptions.py b/ethosu/vela/tflite/ReadVariableOptions.py index 468ad27a..6484ef2f 100644 --- a/ethosu/vela/tflite/ReadVariableOptions.py +++ b/ethosu/vela/tflite/ReadVariableOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ReadVariableOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsReadVariableOptions(cls, buf, offset): 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 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 +def ReadVariableOptionsStart(builder): builder.StartObject(0) +def ReadVariableOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ReducerOptions.py b/ethosu/vela/tflite/ReducerOptions.py index 45318056..93bbde17 100644 --- a/ethosu/vela/tflite/ReducerOptions.py +++ b/ethosu/vela/tflite/ReducerOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ReducerOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsReducerOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class ReducerOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +def ReducerOptionsStart(builder): builder.StartObject(1) +def ReducerOptionsAddKeepDims(builder, keepDims): builder.PrependBoolSlot(0, keepDims, 0) +def ReducerOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/ReshapeOptions.py b/ethosu/vela/tflite/ReshapeOptions.py index 204fa69b..157d45d9 100644 --- a/ethosu/vela/tflite/ReshapeOptions.py +++ b/ethosu/vela/tflite/ReshapeOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ReshapeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsReshapeOptions(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class ReshapeOptions(object): return self._tab.VectorLen(o) return 0 - # ReshapeOptions - def NewShapeIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/ResizeBilinearOptions.py b/ethosu/vela/tflite/ResizeBilinearOptions.py index ce7fe451..fb05ca4b 100644 --- a/ethosu/vela/tflite/ResizeBilinearOptions.py +++ b/ethosu/vela/tflite/ResizeBilinearOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ResizeBilinearOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsResizeBilinearOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class ResizeBilinearOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py index 4eeba35a..e2642cef 100644 --- a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py +++ b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ResizeNearestNeighborOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsResizeNearestNeighborOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class ResizeNearestNeighborOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/ReverseSequenceOptions.py b/ethosu/vela/tflite/ReverseSequenceOptions.py index e4b00288..cbaf96db 100644 --- a/ethosu/vela/tflite/ReverseSequenceOptions.py +++ b/ethosu/vela/tflite/ReverseSequenceOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ReverseSequenceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsReverseSequenceOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class ReverseSequenceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/ReverseV2Options.py b/ethosu/vela/tflite/ReverseV2Options.py index 9dae7acf..dbac9362 100644 --- a/ethosu/vela/tflite/ReverseV2Options.py +++ b/ethosu/vela/tflite/ReverseV2Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ReverseV2Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsReverseV2Options(cls, buf, offset): 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 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 +def ReverseV2OptionsStart(builder): builder.StartObject(0) +def ReverseV2OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Rfft2dOptions.py b/ethosu/vela/tflite/Rfft2dOptions.py index ab91a882..f4f2bf3f 100644 --- a/ethosu/vela/tflite/Rfft2dOptions.py +++ b/ethosu/vela/tflite/Rfft2dOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Rfft2dOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsRfft2dOptions(cls, buf, offset): 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 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 +def Rfft2dOptionsStart(builder): builder.StartObject(0) +def Rfft2dOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SVDFOptions.py b/ethosu/vela/tflite/SVDFOptions.py index 3b45b6af..e4b34611 100644 --- a/ethosu/vela/tflite/SVDFOptions.py +++ b/ethosu/vela/tflite/SVDFOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SVDFOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSVDFOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class SVDFOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/ScatterNdOptions.py b/ethosu/vela/tflite/ScatterNdOptions.py index 93affc9f..e6bf3a11 100644 --- a/ethosu/vela/tflite/ScatterNdOptions.py +++ b/ethosu/vela/tflite/ScatterNdOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ScatterNdOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsScatterNdOptions(cls, buf, offset): 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 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 +def ScatterNdOptionsStart(builder): builder.StartObject(0) +def ScatterNdOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SegmentSumOptions.py b/ethosu/vela/tflite/SegmentSumOptions.py index 482a35a0..d1c32133 100644 --- a/ethosu/vela/tflite/SegmentSumOptions.py +++ b/ethosu/vela/tflite/SegmentSumOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SegmentSumOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSegmentSumOptions(cls, buf, offset): 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 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 +def SegmentSumOptionsStart(builder): builder.StartObject(0) +def SegmentSumOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SelectOptions.py b/ethosu/vela/tflite/SelectOptions.py index 039a5189..d67daf36 100644 --- a/ethosu/vela/tflite/SelectOptions.py +++ b/ethosu/vela/tflite/SelectOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SelectOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSelectOptions(cls, buf, offset): 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 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 +def SelectOptionsStart(builder): builder.StartObject(0) +def SelectOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SelectV2Options.py b/ethosu/vela/tflite/SelectV2Options.py index b123872c..5d03fc2d 100644 --- a/ethosu/vela/tflite/SelectV2Options.py +++ b/ethosu/vela/tflite/SelectV2Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SelectV2Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSelectV2Options(cls, buf, offset): 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 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 +def SelectV2OptionsStart(builder): builder.StartObject(0) +def SelectV2OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SequenceRNNOptions.py b/ethosu/vela/tflite/SequenceRNNOptions.py index 668acca6..16eaf090 100644 --- a/ethosu/vela/tflite/SequenceRNNOptions.py +++ b/ethosu/vela/tflite/SequenceRNNOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SequenceRNNOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSequenceRNNOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class SequenceRNNOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/ShapeOptions.py b/ethosu/vela/tflite/ShapeOptions.py index 92079352..2d24c05f 100644 --- a/ethosu/vela/tflite/ShapeOptions.py +++ b/ethosu/vela/tflite/ShapeOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ShapeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsShapeOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class ShapeOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 0 -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 +def ShapeOptionsStart(builder): builder.StartObject(1) +def ShapeOptionsAddOutType(builder, outType): builder.PrependInt8Slot(0, outType, 0) +def ShapeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SignatureDef.py b/ethosu/vela/tflite/SignatureDef.py index f75494b5..b9394a46 100644 --- a/ethosu/vela/tflite/SignatureDef.py +++ b/ethosu/vela/tflite/SignatureDef.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SignatureDef(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSignatureDef(cls, buf, offset): 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) @@ -49,11 +39,6 @@ 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: @@ -74,11 +59,6 @@ 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: @@ -92,35 +72,11 @@ class SignatureDef(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/SkipGramOptions.py b/ethosu/vela/tflite/SkipGramOptions.py index c1173a58..0e8bdc1d 100644 --- a/ethosu/vela/tflite/SkipGramOptions.py +++ b/ethosu/vela/tflite/SkipGramOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SkipGramOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSkipGramOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class SkipGramOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/SliceOptions.py b/ethosu/vela/tflite/SliceOptions.py index 83a57106..4b41568d 100644 --- a/ethosu/vela/tflite/SliceOptions.py +++ b/ethosu/vela/tflite/SliceOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SliceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSliceOptions(cls, buf, offset): 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 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 +def SliceOptionsStart(builder): builder.StartObject(0) +def SliceOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SoftmaxOptions.py b/ethosu/vela/tflite/SoftmaxOptions.py index 43dd7e62..a7168534 100644 --- a/ethosu/vela/tflite/SoftmaxOptions.py +++ b/ethosu/vela/tflite/SoftmaxOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SoftmaxOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSoftmaxOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class SoftmaxOptions(object): return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) return 0.0 -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 +def SoftmaxOptionsStart(builder): builder.StartObject(1) +def SoftmaxOptionsAddBeta(builder, beta): builder.PrependFloat32Slot(0, beta, 0.0) +def SoftmaxOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SpaceToBatchNDOptions.py b/ethosu/vela/tflite/SpaceToBatchNDOptions.py index 02ede8a8..b61ef96f 100644 --- a/ethosu/vela/tflite/SpaceToBatchNDOptions.py +++ b/ethosu/vela/tflite/SpaceToBatchNDOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SpaceToBatchNDOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSpaceToBatchNDOptions(cls, buf, offset): 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 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 +def SpaceToBatchNDOptionsStart(builder): builder.StartObject(0) +def SpaceToBatchNDOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SpaceToDepthOptions.py b/ethosu/vela/tflite/SpaceToDepthOptions.py index 49756cda..d571174a 100644 --- a/ethosu/vela/tflite/SpaceToDepthOptions.py +++ b/ethosu/vela/tflite/SpaceToDepthOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SpaceToDepthOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSpaceToDepthOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class SpaceToDepthOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def SpaceToDepthOptionsStart(builder): builder.StartObject(1) +def SpaceToDepthOptionsAddBlockSize(builder, blockSize): builder.PrependInt32Slot(0, blockSize, 0) +def SpaceToDepthOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SparseToDenseOptions.py b/ethosu/vela/tflite/SparseToDenseOptions.py index 0cf22b45..826eee08 100644 --- a/ethosu/vela/tflite/SparseToDenseOptions.py +++ b/ethosu/vela/tflite/SparseToDenseOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SparseToDenseOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSparseToDenseOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class SparseToDenseOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +def SparseToDenseOptionsStart(builder): builder.StartObject(1) +def SparseToDenseOptionsAddValidateIndices(builder, validateIndices): builder.PrependBoolSlot(0, validateIndices, 0) +def SparseToDenseOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SparsityParameters.py b/ethosu/vela/tflite/SparsityParameters.py index 5da46927..de550a67 100644 --- a/ethosu/vela/tflite/SparsityParameters.py +++ b/ethosu/vela/tflite/SparsityParameters.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SparsityParameters(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSparsityParameters(cls, buf, offset): 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) @@ -51,11 +41,6 @@ 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: @@ -78,11 +63,6 @@ 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: @@ -102,40 +82,11 @@ class SparsityParameters(object): return self._tab.VectorLen(o) return 0 - # SparsityParameters - def DimMetadataIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/SplitOptions.py b/ethosu/vela/tflite/SplitOptions.py index b5ed2a43..3207525b 100644 --- a/ethosu/vela/tflite/SplitOptions.py +++ b/ethosu/vela/tflite/SplitOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SplitOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSplitOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class SplitOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def SplitOptionsStart(builder): builder.StartObject(1) +def SplitOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) +def SplitOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SplitVOptions.py b/ethosu/vela/tflite/SplitVOptions.py index 393b4ab2..418959de 100644 --- a/ethosu/vela/tflite/SplitVOptions.py +++ b/ethosu/vela/tflite/SplitVOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SplitVOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSplitVOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class SplitVOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +def SplitVOptionsStart(builder): builder.StartObject(1) +def SplitVOptionsAddNumSplits(builder, numSplits): builder.PrependInt32Slot(0, numSplits, 0) +def SplitVOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SquareOptions.py b/ethosu/vela/tflite/SquareOptions.py index e1b40f47..56633f6a 100644 --- a/ethosu/vela/tflite/SquareOptions.py +++ b/ethosu/vela/tflite/SquareOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SquareOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSquareOptions(cls, buf, offset): 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 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 +def SquareOptionsStart(builder): builder.StartObject(0) +def SquareOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SquaredDifferenceOptions.py b/ethosu/vela/tflite/SquaredDifferenceOptions.py index 3b5bedf1..906855d1 100644 --- a/ethosu/vela/tflite/SquaredDifferenceOptions.py +++ b/ethosu/vela/tflite/SquaredDifferenceOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SquaredDifferenceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSquaredDifferenceOptions(cls, buf, offset): 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 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 +def SquaredDifferenceOptionsStart(builder): builder.StartObject(0) +def SquaredDifferenceOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/SqueezeOptions.py b/ethosu/vela/tflite/SqueezeOptions.py index c0840d29..25b294dc 100644 --- a/ethosu/vela/tflite/SqueezeOptions.py +++ b/ethosu/vela/tflite/SqueezeOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SqueezeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSqueezeOptions(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class SqueezeOptions(object): return self._tab.VectorLen(o) return 0 - # SqueezeOptions - def SqueezeDimsIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/StridedSliceOptions.py b/ethosu/vela/tflite/StridedSliceOptions.py index 6e34fe57..3bbb36b8 100644 --- a/ethosu/vela/tflite/StridedSliceOptions.py +++ b/ethosu/vela/tflite/StridedSliceOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class StridedSliceOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsStridedSliceOptions(cls, buf, offset): 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) @@ -63,31 +53,10 @@ class StridedSliceOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/SubGraph.py b/ethosu/vela/tflite/SubGraph.py index 7cd97f26..eaa42fac 100644 --- a/ethosu/vela/tflite/SubGraph.py +++ b/ethosu/vela/tflite/SubGraph.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SubGraph(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSubGraph(cls, buf, offset): 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) @@ -49,11 +39,6 @@ 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: @@ -76,11 +61,6 @@ 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: @@ -103,11 +83,6 @@ 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: @@ -128,58 +103,20 @@ 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 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 +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() diff --git a/ethosu/vela/tflite/SubOptions.py b/ethosu/vela/tflite/SubOptions.py index de2df8a1..c3ed40e1 100644 --- a/ethosu/vela/tflite/SubOptions.py +++ b/ethosu/vela/tflite/SubOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class SubOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsSubOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class SubOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return True -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 +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() diff --git a/ethosu/vela/tflite/Tensor.py b/ethosu/vela/tflite/Tensor.py index 2d7f9b6c..4c39b7cb 100644 --- a/ethosu/vela/tflite/Tensor.py +++ b/ethosu/vela/tflite/Tensor.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Tensor(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTensor(cls, buf, offset): 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) @@ -51,11 +41,6 @@ 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: @@ -127,56 +112,15 @@ class Tensor(object): return self._tab.VectorLen(o) return 0 - # 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 +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() diff --git a/ethosu/vela/tflite/TensorMap.py b/ethosu/vela/tflite/TensorMap.py index b3572f8b..e9b036d9 100644 --- a/ethosu/vela/tflite/TensorMap.py +++ b/ethosu/vela/tflite/TensorMap.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class TensorMap(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTensorMap(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class TensorMap(object): return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/TileOptions.py b/ethosu/vela/tflite/TileOptions.py index 926585a9..ec8396dc 100644 --- a/ethosu/vela/tflite/TileOptions.py +++ b/ethosu/vela/tflite/TileOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class TileOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTileOptions(cls, buf, offset): 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 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 +def TileOptionsStart(builder): builder.StartObject(0) +def TileOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/TopKV2Options.py b/ethosu/vela/tflite/TopKV2Options.py index 849ab528..ccd51033 100644 --- a/ethosu/vela/tflite/TopKV2Options.py +++ b/ethosu/vela/tflite/TopKV2Options.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class TopKV2Options(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTopKV2Options(cls, buf, offset): 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 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 +def TopKV2OptionsStart(builder): builder.StartObject(0) +def TopKV2OptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/TransposeConvOptions.py b/ethosu/vela/tflite/TransposeConvOptions.py index 09153b03..423571c8 100644 --- a/ethosu/vela/tflite/TransposeConvOptions.py +++ b/ethosu/vela/tflite/TransposeConvOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class TransposeConvOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTransposeConvOptions(cls, buf, offset): 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) @@ -49,23 +39,8 @@ class TransposeConvOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/TransposeOptions.py b/ethosu/vela/tflite/TransposeOptions.py index 662c5420..42c596d9 100644 --- a/ethosu/vela/tflite/TransposeOptions.py +++ b/ethosu/vela/tflite/TransposeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class TransposeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsTransposeOptions(cls, buf, offset): 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 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 +def TransposeOptionsStart(builder): builder.StartObject(0) +def TransposeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/Uint16Vector.py b/ethosu/vela/tflite/Uint16Vector.py index 55d49f57..750e52a4 100644 --- a/ethosu/vela/tflite/Uint16Vector.py +++ b/ethosu/vela/tflite/Uint16Vector.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Uint16Vector(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsUint16Vector(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class Uint16Vector(object): return self._tab.VectorLen(o) return 0 - # Uint16Vector - def ValuesIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/Uint8Vector.py b/ethosu/vela/tflite/Uint8Vector.py index 9f078378..dc475f9f 100644 --- a/ethosu/vela/tflite/Uint8Vector.py +++ b/ethosu/vela/tflite/Uint8Vector.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class Uint8Vector(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsUint8Vector(cls, buf, offset): 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) @@ -50,24 +40,7 @@ class Uint8Vector(object): return self._tab.VectorLen(o) return 0 - # Uint8Vector - def ValuesIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 - -def 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 +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() diff --git a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py index 374a33ac..b734f3ff 100644 --- a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py +++ b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class UnidirectionalSequenceLSTMOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsUnidirectionalSequenceLSTMOptions(cls, buf, offset): 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) @@ -63,31 +53,10 @@ class UnidirectionalSequenceLSTMOptions(object): return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False -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 +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() diff --git a/ethosu/vela/tflite/UniqueOptions.py b/ethosu/vela/tflite/UniqueOptions.py index 3d0612f9..841c6977 100644 --- a/ethosu/vela/tflite/UniqueOptions.py +++ b/ethosu/vela/tflite/UniqueOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class UniqueOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsUniqueOptions(cls, buf, offset): 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) @@ -35,15 +25,6 @@ class UniqueOptions(object): return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) return 2 -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 +def UniqueOptionsStart(builder): builder.StartObject(1) +def UniqueOptionsAddIdxOutType(builder, idxOutType): builder.PrependInt8Slot(0, idxOutType, 2) +def UniqueOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/UnpackOptions.py b/ethosu/vela/tflite/UnpackOptions.py index b70b0409..eed40193 100644 --- a/ethosu/vela/tflite/UnpackOptions.py +++ b/ethosu/vela/tflite/UnpackOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class UnpackOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsUnpackOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class UnpackOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/UnsortedSegmentProdOptions.py b/ethosu/vela/tflite/UnsortedSegmentProdOptions.py new file mode 100644 index 00000000..46650192 --- /dev/null +++ b/ethosu/vela/tflite/UnsortedSegmentProdOptions.py @@ -0,0 +1,30 @@ +# 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 97164109..ff05e77f 100644 --- a/ethosu/vela/tflite/VarHandleOptions.py +++ b/ethosu/vela/tflite/VarHandleOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class VarHandleOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsVarHandleOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class VarHandleOptions(object): return self._tab.String(o + self._tab.Pos) return None -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 +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() diff --git a/ethosu/vela/tflite/WhereOptions.py b/ethosu/vela/tflite/WhereOptions.py index c0083a5a..ab69f6aa 100644 --- a/ethosu/vela/tflite/WhereOptions.py +++ b/ethosu/vela/tflite/WhereOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class WhereOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsWhereOptions(cls, buf, offset): 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 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 +def WhereOptionsStart(builder): builder.StartObject(0) +def WhereOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite/WhileOptions.py b/ethosu/vela/tflite/WhileOptions.py index eca73e5e..7d5a6dfa 100644 --- a/ethosu/vela/tflite/WhileOptions.py +++ b/ethosu/vela/tflite/WhileOptions.py @@ -3,27 +3,17 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class WhileOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsWhileOptions(cls, buf, offset): 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) @@ -42,19 +32,7 @@ class WhileOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -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 +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() diff --git a/ethosu/vela/tflite/ZerosLikeOptions.py b/ethosu/vela/tflite/ZerosLikeOptions.py index 2b32f87c..e6aa9639 100644 --- a/ethosu/vela/tflite/ZerosLikeOptions.py +++ b/ethosu/vela/tflite/ZerosLikeOptions.py @@ -3,36 +3,20 @@ # namespace: tflite import flatbuffers -from flatbuffers.compat import import_numpy -np = import_numpy() class ZerosLikeOptions(object): __slots__ = ['_tab'] @classmethod - def GetRootAs(cls, buf, offset=0): + def GetRootAsZerosLikeOptions(cls, buf, offset): 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 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 +def ZerosLikeOptionsStart(builder): builder.StartObject(0) +def ZerosLikeOptionsEnd(builder): return builder.EndObject() diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py index bf155b9c..ae9bdf05 100644 --- a/ethosu/vela/tflite_mapping.py +++ b/ethosu/vela/tflite_mapping.py @@ -139,6 +139,7 @@ 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 @@ -321,6 +322,7 @@ builtin_options_map = { BuiltinOptions.BucketizeOptions: BucketizeOptions.BucketizeOptions, BuiltinOptions.DynamicUpdateSliceOptions: DynamicUpdateSliceOptions.DynamicUpdateSliceOptions, BuiltinOptions.GeluOptions: GeluOptions.GeluOptions, + BuiltinOptions.UnsortedSegmentProdOptions: UnsortedSegmentProdOptions.UnsortedSegmentProdOptions, } @@ -588,6 +590,7 @@ 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: ( @@ -965,6 +968,11 @@ 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), } |