blob: b734f3fff1bfe70a5ca9f62de31d1a1bd7af0276 [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 UnidirectionalSequenceLSTMOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020011 def GetRootAsUnidirectionalSequenceLSTMOptions(cls, buf, offset):
Tim Hall79d07d22020-04-27 18:20:16 +010012 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = UnidirectionalSequenceLSTMOptions()
14 x.Init(buf, n + offset)
15 return x
16
17 # UnidirectionalSequenceLSTMOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # UnidirectionalSequenceLSTMOptions
22 def FusedActivationFunction(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.Int8Flags, o + self._tab.Pos)
26 return 0
27
28 # UnidirectionalSequenceLSTMOptions
29 def CellClip(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.Float32Flags, o + self._tab.Pos)
33 return 0.0
34
35 # UnidirectionalSequenceLSTMOptions
36 def ProjClip(self):
37 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
38 if o != 0:
39 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
40 return 0.0
41
42 # UnidirectionalSequenceLSTMOptions
43 def TimeMajor(self):
44 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
45 if o != 0:
46 return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
47 return False
48
Jacob Bohlin8daf6b72020-09-15 16:28:35 +020049 # UnidirectionalSequenceLSTMOptions
50 def AsymmetricQuantizeInputs(self):
51 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
52 if o != 0:
53 return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
54 return False
55
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020056def UnidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(5)
57def UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
58def UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
59def UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
60def UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(3, timeMajor, 0)
61def UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0)
62def UnidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject()