blob: 3831c8738d33cc066b62df984c1b6139233c67a5 [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
Rickard Bolin2de898a2021-12-20 08:35:23 +00006from flatbuffers.compat import import_numpy
7np = import_numpy()
Tim Hall79d07d22020-04-27 18:20:16 +01008
9class LocalResponseNormalizationOptions(object):
10 __slots__ = ['_tab']
11
12 @classmethod
Rickard Bolin2de898a2021-12-20 08:35:23 +000013 def GetRootAs(cls, buf, offset=0):
Tim Hall79d07d22020-04-27 18:20:16 +010014 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15 x = LocalResponseNormalizationOptions()
16 x.Init(buf, n + offset)
17 return x
18
Dwight Lidman8a12da12021-07-19 13:43:05 +020019 @classmethod
Rickard Bolin2de898a2021-12-20 08:35:23 +000020 def GetRootAsLocalResponseNormalizationOptions(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
Dwight Lidman8a12da12021-07-19 13:43:05 +020024 def LocalResponseNormalizationOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
26
Tim Hall79d07d22020-04-27 18:20:16 +010027 # LocalResponseNormalizationOptions
28 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
31 # LocalResponseNormalizationOptions
32 def Radius(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
38 # LocalResponseNormalizationOptions
39 def Bias(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.Float32Flags, o + self._tab.Pos)
43 return 0.0
44
45 # LocalResponseNormalizationOptions
46 def Alpha(self):
47 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
48 if o != 0:
49 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
50 return 0.0
51
52 # LocalResponseNormalizationOptions
53 def Beta(self):
54 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
55 if o != 0:
56 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
57 return 0.0
58
Rickard Bolind66f8012022-04-21 07:36:55 +000059def Start(builder): builder.StartObject(4)
60def LocalResponseNormalizationOptionsStart(builder):
61 """This method is deprecated. Please switch to Start."""
62 return Start(builder)
63def AddRadius(builder, radius): builder.PrependInt32Slot(0, radius, 0)
64def LocalResponseNormalizationOptionsAddRadius(builder, radius):
65 """This method is deprecated. Please switch to AddRadius."""
66 return AddRadius(builder, radius)
67def AddBias(builder, bias): builder.PrependFloat32Slot(1, bias, 0.0)
68def LocalResponseNormalizationOptionsAddBias(builder, bias):
69 """This method is deprecated. Please switch to AddBias."""
70 return AddBias(builder, bias)
71def AddAlpha(builder, alpha): builder.PrependFloat32Slot(2, alpha, 0.0)
72def LocalResponseNormalizationOptionsAddAlpha(builder, alpha):
73 """This method is deprecated. Please switch to AddAlpha."""
74 return AddAlpha(builder, alpha)
75def AddBeta(builder, beta): builder.PrependFloat32Slot(3, beta, 0.0)
76def LocalResponseNormalizationOptionsAddBeta(builder, beta):
77 """This method is deprecated. Please switch to AddBeta."""
78 return AddBeta(builder, beta)
79def End(builder): return builder.EndObject()
80def LocalResponseNormalizationOptionsEnd(builder):
81 """This method is deprecated. Please switch to End."""
82 return End(builder)