blob: 62b480d57ec79f691f5d293d7890b3532ae50f0a [file] [log] [blame]
Eric Kunze2364dcd2021-04-26 11:06:57 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
Eric Kunze2364dcd2021-04-26 11:06:57 -07003# namespace: tosa
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
Eric Kunzebdcc3fe2022-06-07 05:17:37 +00009class FullyConnectedAttribute(object):
Eric Kunze2364dcd2021-04-26 11:06:57 -070010 __slots__ = ['_tab']
11
12 @classmethod
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000013 def GetRootAsFullyConnectedAttribute(cls, buf, offset):
Eric Kunze2364dcd2021-04-26 11:06:57 -070014 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000015 x = FullyConnectedAttribute()
Eric Kunze2364dcd2021-04-26 11:06:57 -070016 x.Init(buf, n + offset)
17 return x
18
19 @classmethod
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000020 def FullyConnectedAttributeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
Eric Kunze2364dcd2021-04-26 11:06:57 -070021 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
22
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000023 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070024 def Init(self, buf, pos):
25 self._tab = flatbuffers.table.Table(buf, pos)
26
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000027 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070028 def InputZp(self):
29 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
30 if o != 0:
31 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
32 return 0
33
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000034 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070035 def WeightZp(self):
36 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
37 if o != 0:
38 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
39 return 0
40
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000041def FullyConnectedAttributeStart(builder): builder.StartObject(2)
42def FullyConnectedAttributeAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0)
43def FullyConnectedAttributeAddWeightZp(builder, weightZp): builder.PrependInt32Slot(1, weightZp, 0)
44def FullyConnectedAttributeEnd(builder): return builder.EndObject()