blob: 3705084dd22052ffbbe74363c64ea8b9b3fbd7dc [file] [log] [blame]
Rickard Bolind66f8012022-04-21 07:36:55 +00001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tflite
4
5import flatbuffers
Rickard Bolind66f8012022-04-21 07:36:55 +00006
7class GeluOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020011 def GetRootAsGeluOptions(cls, buf, offset):
Rickard Bolind66f8012022-04-21 07:36:55 +000012 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = GeluOptions()
14 x.Init(buf, n + offset)
15 return x
16
Rickard Bolind66f8012022-04-21 07:36:55 +000017 # GeluOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # GeluOptions
22 def Approximate(self):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
26 return False
27
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020028def GeluOptionsStart(builder): builder.StartObject(1)
29def GeluOptionsAddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0)
30def GeluOptionsEnd(builder): return builder.EndObject()