aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/Int32Vector.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite/Int32Vector.py')
-rw-r--r--ethosu/vela/tflite/Int32Vector.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/Int32Vector.py b/ethosu/vela/tflite/Int32Vector.py
index 0575b2e8..6c2a614c 100644
--- a/ethosu/vela/tflite/Int32Vector.py
+++ b/ethosu/vela/tflite/Int32Vector.py
@@ -3,18 +3,24 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Int32Vector(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsInt32Vector(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Int32Vector()
x.Init(buf, n + offset)
return x
@classmethod
+ def GetRootAsInt32Vector(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
def Int32VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
@@ -50,6 +56,14 @@ class Int32Vector(object):
return o == 0
def Int32VectorStart(builder): builder.StartObject(1)
+def Start(builder):
+ return Int32VectorStart(builder)
def Int32VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
+def AddValues(builder, values):
+ return Int32VectorAddValues(builder, values)
def Int32VectorStartValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartValuesVector(builder, numElems):
+ return Int32VectorStartValuesVector(builder, numElems)
def Int32VectorEnd(builder): return builder.EndObject()
+def End(builder):
+ return Int32VectorEnd(builder) \ No newline at end of file