blob: 93bbde17a2240f356c9a99019d95f17fc39d71e8 [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 ReducerOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsReducerOptions(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = ReducerOptions()
14 x.Init(buf, n + offset)
15 return x
16
17 # ReducerOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # ReducerOptions
22 def KeepDims(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
28def ReducerOptionsStart(builder): builder.StartObject(1)
29def ReducerOptionsAddKeepDims(builder, keepDims): builder.PrependBoolSlot(0, keepDims, 0)
30def ReducerOptionsEnd(builder): return builder.EndObject()