Rickard Bolin | d66f801 | 2022-04-21 07:36:55 +0000 | [diff] [blame] | 1 | # automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | # namespace: tflite |
| 4 | |
| 5 | import flatbuffers |
Rickard Bolin | d66f801 | 2022-04-21 07:36:55 +0000 | [diff] [blame] | 6 | |
| 7 | class GeluOptions(object): |
| 8 | __slots__ = ['_tab'] |
| 9 | |
| 10 | @classmethod |
erik.andersson@arm.com | dd49a72 | 2022-08-10 15:26:48 +0200 | [diff] [blame^] | 11 | def GetRootAsGeluOptions(cls, buf, offset): |
Rickard Bolin | d66f801 | 2022-04-21 07:36:55 +0000 | [diff] [blame] | 12 | n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) |
| 13 | x = GeluOptions() |
| 14 | x.Init(buf, n + offset) |
| 15 | return x |
| 16 | |
Rickard Bolin | d66f801 | 2022-04-21 07:36:55 +0000 | [diff] [blame] | 17 | # 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.com | dd49a72 | 2022-08-10 15:26:48 +0200 | [diff] [blame^] | 28 | def GeluOptionsStart(builder): builder.StartObject(1) |
| 29 | def GeluOptionsAddApproximate(builder, approximate): builder.PrependBoolSlot(0, approximate, 0) |
| 30 | def GeluOptionsEnd(builder): return builder.EndObject() |