aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/ShapeOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite/ShapeOptions.py')
-rw-r--r--ethosu/vela/tflite/ShapeOptions.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/ShapeOptions.py b/ethosu/vela/tflite/ShapeOptions.py
index e3f64d6c..6a9d6f90 100644
--- a/ethosu/vela/tflite/ShapeOptions.py
+++ b/ethosu/vela/tflite/ShapeOptions.py
@@ -10,13 +10,17 @@ class ShapeOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsShapeOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ShapeOptions()
x.Init(buf, n + offset)
return x
@classmethod
+ def GetRootAsShapeOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
def ShapeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
@@ -32,5 +36,11 @@ class ShapeOptions(object):
return 0
def ShapeOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return ShapeOptionsStart(builder)
def ShapeOptionsAddOutType(builder, outType): builder.PrependInt8Slot(0, outType, 0)
+def AddOutType(builder, outType):
+ return ShapeOptionsAddOutType(builder, outType)
def ShapeOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return ShapeOptionsEnd(builder) \ No newline at end of file