blob: 50dcdbfb51cde2e38327fd709eb416dfd64f7caf [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
6
7class DepthwiseConv2DOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsDepthwiseConv2DOptions(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = DepthwiseConv2DOptions()
14 x.Init(buf, n + offset)
15 return x
16
Dwight Lidman8a12da12021-07-19 13:43:05 +020017 @classmethod
18 def DepthwiseConv2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
19 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
20
Tim Hall79d07d22020-04-27 18:20:16 +010021 # DepthwiseConv2DOptions
22 def Init(self, buf, pos):
23 self._tab = flatbuffers.table.Table(buf, pos)
24
25 # DepthwiseConv2DOptions
26 def Padding(self):
27 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
28 if o != 0:
29 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
30 return 0
31
32 # DepthwiseConv2DOptions
33 def StrideW(self):
34 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
35 if o != 0:
36 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
37 return 0
38
39 # DepthwiseConv2DOptions
40 def StrideH(self):
41 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
42 if o != 0:
43 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
44 return 0
45
46 # DepthwiseConv2DOptions
47 def DepthMultiplier(self):
48 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
49 if o != 0:
50 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
51 return 0
52
53 # DepthwiseConv2DOptions
54 def FusedActivationFunction(self):
55 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
56 if o != 0:
57 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
58 return 0
59
60 # DepthwiseConv2DOptions
61 def DilationWFactor(self):
62 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
63 if o != 0:
64 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
65 return 1
66
67 # DepthwiseConv2DOptions
68 def DilationHFactor(self):
69 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
70 if o != 0:
71 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
72 return 1
73
74def DepthwiseConv2DOptionsStart(builder): builder.StartObject(7)
75def DepthwiseConv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
76def DepthwiseConv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
77def DepthwiseConv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
78def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0)
79def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
80def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1)
81def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1)
82def DepthwiseConv2DOptionsEnd(builder): return builder.EndObject()