From 93f492bae9c4dd16a1f64b851b237263695ee03e Mon Sep 17 00:00:00 2001 From: "erik.andersson@arm.com" Date: Wed, 29 Jun 2022 09:46:30 +0200 Subject: 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 Change-Id: I6bf506ffb85da2d4a57a32198b471513deeaca73 --- ethosu/vela/tflite/UniqueOptions.py | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'ethosu/vela/tflite/UniqueOptions.py') 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() -- cgit v1.2.1