blob: 9689383be20972054508c335e94a0809240d0d3f [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
17 # DepthwiseConv2DOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # DepthwiseConv2DOptions
22 def Padding(self):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
26 return 0
27
28 # DepthwiseConv2DOptions
29 def StrideW(self):
30 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
31 if o != 0:
32 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
33 return 0
34
35 # DepthwiseConv2DOptions
36 def StrideH(self):
37 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
38 if o != 0:
39 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
40 return 0
41
42 # DepthwiseConv2DOptions
43 def DepthMultiplier(self):
44 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
45 if o != 0:
46 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
47 return 0
48
49 # DepthwiseConv2DOptions
50 def FusedActivationFunction(self):
51 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
52 if o != 0:
53 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
54 return 0
55
56 # DepthwiseConv2DOptions
57 def DilationWFactor(self):
58 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
59 if o != 0:
60 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
61 return 1
62
63 # DepthwiseConv2DOptions
64 def DilationHFactor(self):
65 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
66 if o != 0:
67 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
68 return 1
69
70def DepthwiseConv2DOptionsStart(builder): builder.StartObject(7)
71def DepthwiseConv2DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
72def DepthwiseConv2DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(1, strideW, 0)
73def DepthwiseConv2DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0)
74def DepthwiseConv2DOptionsAddDepthMultiplier(builder, depthMultiplier): builder.PrependInt32Slot(3, depthMultiplier, 0)
75def DepthwiseConv2DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
76def DepthwiseConv2DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(5, dilationWFactor, 1)
77def DepthwiseConv2DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(6, dilationHFactor, 1)
78def DepthwiseConv2DOptionsEnd(builder): return builder.EndObject()