Jacob Bohlin | 8daf6b7 | 2020-09-15 16:28:35 +0200 | [diff] [blame] | 1 | # automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | # namespace: tflite |
| 4 | |
| 5 | import flatbuffers |
| 6 | |
| 7 | class BatchMatMulOptions(object): |
| 8 | __slots__ = ['_tab'] |
| 9 | |
| 10 | @classmethod |
| 11 | def GetRootAsBatchMatMulOptions(cls, buf, offset): |
| 12 | n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) |
| 13 | x = BatchMatMulOptions() |
| 14 | x.Init(buf, n + offset) |
| 15 | return x |
| 16 | |
Dwight Lidman | 8a12da1 | 2021-07-19 13:43:05 +0200 | [diff] [blame] | 17 | @classmethod |
| 18 | def BatchMatMulOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): |
| 19 | return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed) |
| 20 | |
Jacob Bohlin | 8daf6b7 | 2020-09-15 16:28:35 +0200 | [diff] [blame] | 21 | # BatchMatMulOptions |
| 22 | def Init(self, buf, pos): |
| 23 | self._tab = flatbuffers.table.Table(buf, pos) |
| 24 | |
| 25 | # BatchMatMulOptions |
| 26 | def AdjX(self): |
| 27 | o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) |
| 28 | if o != 0: |
| 29 | return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) |
| 30 | return False |
| 31 | |
| 32 | # BatchMatMulOptions |
| 33 | def AdjY(self): |
| 34 | o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) |
| 35 | if o != 0: |
| 36 | return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) |
| 37 | return False |
| 38 | |
Dwight Lidman | 8a12da1 | 2021-07-19 13:43:05 +0200 | [diff] [blame] | 39 | # BatchMatMulOptions |
| 40 | def AsymmetricQuantizeInputs(self): |
| 41 | o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) |
| 42 | if o != 0: |
| 43 | return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) |
| 44 | return False |
| 45 | |
| 46 | def BatchMatMulOptionsStart(builder): builder.StartObject(3) |
Jacob Bohlin | 8daf6b7 | 2020-09-15 16:28:35 +0200 | [diff] [blame] | 47 | def BatchMatMulOptionsAddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0) |
| 48 | def BatchMatMulOptionsAddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0) |
Dwight Lidman | 8a12da1 | 2021-07-19 13:43:05 +0200 | [diff] [blame] | 49 | def BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0) |
Jacob Bohlin | 8daf6b7 | 2020-09-15 16:28:35 +0200 | [diff] [blame] | 50 | def BatchMatMulOptionsEnd(builder): return builder.EndObject() |