aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/SkipGramOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite/SkipGramOptions.py')
-rw-r--r--ethosu/vela/tflite/SkipGramOptions.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/SkipGramOptions.py b/ethosu/vela/tflite/SkipGramOptions.py
index cd66e119..19a59b64 100644
--- a/ethosu/vela/tflite/SkipGramOptions.py
+++ b/ethosu/vela/tflite/SkipGramOptions.py
@@ -10,13 +10,17 @@ class SkipGramOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsSkipGramOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
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)
@@ -46,7 +50,17 @@ class SkipGramOptions(object):
return False
def SkipGramOptionsStart(builder): builder.StartObject(3)
+def Start(builder):
+ return SkipGramOptionsStart(builder)
def SkipGramOptionsAddNgramSize(builder, ngramSize): builder.PrependInt32Slot(0, ngramSize, 0)
+def AddNgramSize(builder, ngramSize):
+ return SkipGramOptionsAddNgramSize(builder, ngramSize)
def SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize): builder.PrependInt32Slot(1, maxSkipSize, 0)
+def AddMaxSkipSize(builder, maxSkipSize):
+ return SkipGramOptionsAddMaxSkipSize(builder, maxSkipSize)
def SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams): builder.PrependBoolSlot(2, includeAllNgrams, 0)
+def AddIncludeAllNgrams(builder, includeAllNgrams):
+ return SkipGramOptionsAddIncludeAllNgrams(builder, includeAllNgrams)
def SkipGramOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return SkipGramOptionsEnd(builder) \ No newline at end of file