blob: 9a07d1a8314f83883b7bccbd78eccda2365675a6 [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
Johan Alfvéna9fba262022-07-19 12:26:32 +02006from flatbuffers.compat import import_numpy
7np = import_numpy()
Tim Hall79d07d22020-04-27 18:20:16 +01008
9class DepthwiseConv2DOptions(object):
10 __slots__ = ['_tab']
11
12 @classmethod
Johan Alfvéna9fba262022-07-19 12:26:32 +020013 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 = DepthwiseConv2DOptions()
16 x.Init(buf, n + offset)
17 return x
18
Johan Alfvéna9fba262022-07-19 12:26:32 +020019 @classmethod
20 def GetRootAsDepthwiseConv2DOptions(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
24 def DepthwiseConv2DOptionsBufferHasIdentifier(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 # DepthwiseConv2DOptions
28 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
31 # DepthwiseConv2DOptions
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 # DepthwiseConv2DOptions
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 # DepthwiseConv2DOptions
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 # DepthwiseConv2DOptions
53 def DepthMultiplier(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.Int32Flags, o + self._tab.Pos)
57 return 0
58
59 # DepthwiseConv2DOptions
60 def FusedActivationFunction(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.Int8Flags, o + self._tab.Pos)
64 return 0
65
66 # DepthwiseConv2DOptions
67 def DilationWFactor(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
73 # DepthwiseConv2DOptions
74 def DilationHFactor(self):
75 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
76 if o != 0:
77 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
78 return 1
79
Johan Alfvéna9fba262022-07-19 12:26:32 +020080def Start(builder): builder.StartObject(7)
81def DepthwiseConv2DOptionsStart(builder):
82 """This method is deprecated. Please switch to Start."""
83 return Start(builder)
84def AddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
85def DepthwiseConv2DOptionsAddPadding(builder, padding):
86 """This method is deprecated. Please switch to AddPadding."""
87 return AddPadding(builder, padding)
88def AddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
89def DepthwiseConv2DOptionsAddStrideW(builder, strideW):
90 """This method is deprecated. Please switch to AddStrideW."""
91 return AddStrideW(builder, strideW)
92def AddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
93def DepthwiseConv2DOptionsAddStrideH(builder, strideH):
94 """This method is deprecated. Please switch to AddStrideH."""
95 return AddStrideH(builder, strideH)
96def AddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0)
97def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier):
98 """This method is deprecated. Please switch to AddDepthMultiplier."""
99 return AddDepthMultiplier(builder, depthMultiplier)
100def AddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
101def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction):
102 """This method is deprecated. Please switch to AddFusedActivationFunction."""
103 return AddFusedActivationFunction(builder, fusedActivationFunction)
104def AddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1)
105def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor):
106 """This method is deprecated. Please switch to AddDilationWFactor."""
107 return AddDilationWFactor(builder, dilationWFactor)
108def AddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1)
109def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor):
110 """This method is deprecated. Please switch to AddDilationHFactor."""
111 return AddDilationHFactor(builder, dilationHFactor)
112def End(builder): return builder.EndObject()
113def DepthwiseConv2DOptionsEnd(builder):
114 """This method is deprecated. Please switch to End."""
115 return End(builder)