blob: 33a8569dc3f5111b7863162fa4fbeef83376bf45 [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 Conv2DOptions(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 = Conv2DOptions()
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 GetRootAsConv2DOptions(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 Conv2DOptionsBufferHasIdentifier(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 # Conv2DOptions
28 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
31 # Conv2DOptions
32 def Padding(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.Int8Flags, o + self._tab.Pos)
36 return 0
37
38 # Conv2DOptions
39 def StrideW(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
45 # Conv2DOptions
46 def StrideH(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.Int32Flags, o + self._tab.Pos)
50 return 0
51
52 # Conv2DOptions
53 def FusedActivationFunction(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.Int8Flags, o + self._tab.Pos)
57 return 0
58
59 # Conv2DOptions
60 def DilationWFactor(self):
61 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
62 if o != 0:
63 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
64 return 1
65
66 # Conv2DOptions
67 def DilationHFactor(self):
68 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
69 if o != 0:
70 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
71 return 1
72
Rickard Bolind66f8012022-04-21 07:36:55 +000073def Start(builder): builder.StartObject(6)
74def Conv2DOptionsStart(builder):
75 """This method is deprecated. Please switch to Start."""
76 return Start(builder)
77def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
78def Conv2DOptionsAddPadding(builder, padding):
79 """This method is deprecated. Please switch to AddPadding."""
80 return AddPadding(builder, padding)
81def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
82def Conv2DOptionsAddStrideW(builder, strideW):
83 """This method is deprecated. Please switch to AddStrideW."""
84 return AddStrideW(builder, strideW)
85def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
86def Conv2DOptionsAddStrideH(builder, strideH):
87 """This method is deprecated. Please switch to AddStrideH."""
88 return AddStrideH(builder, strideH)
89def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(3, fusedActivationFunction, 0)
90def Conv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction):
91 """This method is deprecated. Please switch to AddFusedActivationFunction."""
92 return AddFusedActivationFunction(builder, fusedActivationFunction)
93def AddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(4, dilationWFactor, 1)
94def Conv2DOptionsAddDilationWFactor(builder, dilationWFactor):
95 """This method is deprecated. Please switch to AddDilationWFactor."""
96 return AddDilationWFactor(builder, dilationWFactor)
97def AddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(5, dilationHFactor, 1)
98def Conv2DOptionsAddDilationHFactor(builder, dilationHFactor):
99 """This method is deprecated. Please switch to AddDilationHFactor."""
100 return AddDilationHFactor(builder, dilationHFactor)
101def End(builder): return builder.EndObject()
102def Conv2DOptionsEnd(builder):
103 """This method is deprecated. Please switch to End."""
104 return End(builder)