-
Notifications
You must be signed in to change notification settings - Fork 110
/
DepthwiseConv2DOptions.go
146 lines (124 loc) · 4.18 KB
/
DepthwiseConv2DOptions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package tflite
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type DepthwiseConv2DOptions struct {
_tab flatbuffers.Table
}
func GetRootAsDepthwiseConv2DOptions(buf []byte, offset flatbuffers.UOffsetT) *DepthwiseConv2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &DepthwiseConv2DOptions{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsDepthwiseConv2DOptions(buf []byte, offset flatbuffers.UOffsetT) *DepthwiseConv2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &DepthwiseConv2DOptions{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *DepthwiseConv2DOptions) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *DepthwiseConv2DOptions) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *DepthwiseConv2DOptions) Padding() Padding {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return Padding(rcv._tab.GetInt8(o + rcv._tab.Pos))
}
return 0
}
func (rcv *DepthwiseConv2DOptions) MutatePadding(n Padding) bool {
return rcv._tab.MutateInt8Slot(4, int8(n))
}
func (rcv *DepthwiseConv2DOptions) StrideW() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *DepthwiseConv2DOptions) MutateStrideW(n int32) bool {
return rcv._tab.MutateInt32Slot(6, n)
}
func (rcv *DepthwiseConv2DOptions) StrideH() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *DepthwiseConv2DOptions) MutateStrideH(n int32) bool {
return rcv._tab.MutateInt32Slot(8, n)
}
func (rcv *DepthwiseConv2DOptions) DepthMultiplier() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *DepthwiseConv2DOptions) MutateDepthMultiplier(n int32) bool {
return rcv._tab.MutateInt32Slot(10, n)
}
func (rcv *DepthwiseConv2DOptions) FusedActivationFunction() ActivationFunctionType {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return ActivationFunctionType(rcv._tab.GetInt8(o + rcv._tab.Pos))
}
return 0
}
func (rcv *DepthwiseConv2DOptions) MutateFusedActivationFunction(n ActivationFunctionType) bool {
return rcv._tab.MutateInt8Slot(12, int8(n))
}
func (rcv *DepthwiseConv2DOptions) DilationWFactor() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 1
}
func (rcv *DepthwiseConv2DOptions) MutateDilationWFactor(n int32) bool {
return rcv._tab.MutateInt32Slot(14, n)
}
func (rcv *DepthwiseConv2DOptions) DilationHFactor() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 1
}
func (rcv *DepthwiseConv2DOptions) MutateDilationHFactor(n int32) bool {
return rcv._tab.MutateInt32Slot(16, n)
}
func DepthwiseConv2DOptionsStart(builder *flatbuffers.Builder) {
builder.StartObject(7)
}
func DepthwiseConv2DOptionsAddPadding(builder *flatbuffers.Builder, padding Padding) {
builder.PrependInt8Slot(0, int8(padding), 0)
}
func DepthwiseConv2DOptionsAddStrideW(builder *flatbuffers.Builder, strideW int32) {
builder.PrependInt32Slot(1, strideW, 0)
}
func DepthwiseConv2DOptionsAddStrideH(builder *flatbuffers.Builder, strideH int32) {
builder.PrependInt32Slot(2, strideH, 0)
}
func DepthwiseConv2DOptionsAddDepthMultiplier(builder *flatbuffers.Builder, depthMultiplier int32) {
builder.PrependInt32Slot(3, depthMultiplier, 0)
}
func DepthwiseConv2DOptionsAddFusedActivationFunction(builder *flatbuffers.Builder, fusedActivationFunction ActivationFunctionType) {
builder.PrependInt8Slot(4, int8(fusedActivationFunction), 0)
}
func DepthwiseConv2DOptionsAddDilationWFactor(builder *flatbuffers.Builder, dilationWFactor int32) {
builder.PrependInt32Slot(5, dilationWFactor, 1)
}
func DepthwiseConv2DOptionsAddDilationHFactor(builder *flatbuffers.Builder, dilationHFactor int32) {
builder.PrependInt32Slot(6, dilationHFactor, 1)
}
func DepthwiseConv2DOptionsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}