blob: 6f391db145a28345a06956c713e38e99f4616812 [file] [log] [blame]
Tim Hall79d07d22020-04-27 18:20:16 +01001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tflite
4
5import flatbuffers
6
7class SVDFOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsSVDFOptions(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = SVDFOptions()
14 x.Init(buf, n + offset)
15 return x
16
17 # SVDFOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # SVDFOptions
22 def Rank(self):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
26 return 0
27
28 # SVDFOptions
29 def FusedActivationFunction(self):
30 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
31 if o != 0:
32 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
33 return 0
34
35def SVDFOptionsStart(builder): builder.StartObject(2)
36def SVDFOptionsAddRank(builder, rank): builder.PrependInt32Slot(0, rank, 0)
37def SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
38def SVDFOptionsEnd(builder): return builder.EndObject()