aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/PackOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite/PackOptions.py')
-rw-r--r--ethosu/vela/tflite/PackOptions.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/PackOptions.py b/ethosu/vela/tflite/PackOptions.py
index 2d590c52..1591f15d 100644
--- a/ethosu/vela/tflite/PackOptions.py
+++ b/ethosu/vela/tflite/PackOptions.py
@@ -3,18 +3,24 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class PackOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPackOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PackOptions()
x.Init(buf, n + offset)
return x
@classmethod
+ def GetRootAsPackOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
def PackOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
@@ -37,6 +43,14 @@ class PackOptions(object):
return 0
def PackOptionsStart(builder): builder.StartObject(2)
+def Start(builder):
+ return PackOptionsStart(builder)
def PackOptionsAddValuesCount(builder, valuesCount): builder.PrependInt32Slot(0, valuesCount, 0)
+def AddValuesCount(builder, valuesCount):
+ return PackOptionsAddValuesCount(builder, valuesCount)
def PackOptionsAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, 0)
+def AddAxis(builder, axis):
+ return PackOptionsAddAxis(builder, axis)
def PackOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return PackOptionsEnd(builder) \ No newline at end of file