blob: 892b0da2f3313830d641e2eff3ba2308736b87aa [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 Kunze4381b3d2022-08-22 18:15:41 +000013 def GetRootAs(cls, buf, offset=0):
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 Kunze4381b3d2022-08-22 18:15:41 +000020 def GetRootAsFullyConnectedAttribute(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000024 def FullyConnectedAttributeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
Eric Kunze2364dcd2021-04-26 11:06:57 -070025 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
26
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000027 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070028 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000031 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070032 def InputZp(self):
33 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34 if o != 0:
35 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
36 return 0
37
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000038 # FullyConnectedAttribute
Eric Kunze2364dcd2021-04-26 11:06:57 -070039 def WeightZp(self):
40 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41 if o != 0:
42 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
43 return 0
44
James Wardea00fd02023-01-20 16:03:50 +000045def FullyConnectedAttributeStart(builder): builder.StartObject(2)
Eric Kunze4381b3d2022-08-22 18:15:41 +000046def Start(builder):
47 return FullyConnectedAttributeStart(builder)
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000048def FullyConnectedAttributeAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0)
Eric Kunze4381b3d2022-08-22 18:15:41 +000049def AddInputZp(builder, inputZp):
50 return FullyConnectedAttributeAddInputZp(builder, inputZp)
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000051def FullyConnectedAttributeAddWeightZp(builder, weightZp): builder.PrependInt32Slot(1, weightZp, 0)
Eric Kunze4381b3d2022-08-22 18:15:41 +000052def AddWeightZp(builder, weightZp):
53 return FullyConnectedAttributeAddWeightZp(builder, weightZp)
Eric Kunzebdcc3fe2022-06-07 05:17:37 +000054def FullyConnectedAttributeEnd(builder): return builder.EndObject()
Eric Kunze4381b3d2022-08-22 18:15:41 +000055def End(builder):
56 return FullyConnectedAttributeEnd(builder)