-
Notifications
You must be signed in to change notification settings - Fork 110
/
Conv2DOptions.go
131 lines (111 loc) · 3.48 KB
/
Conv2DOptions.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
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package tflite
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type Conv2DOptions struct {
_tab flatbuffers.Table
}
func GetRootAsConv2DOptions(buf []byte, offset flatbuffers.UOffsetT) *Conv2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &Conv2DOptions{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsConv2DOptions(buf []byte, offset flatbuffers.UOffsetT) *Conv2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &Conv2DOptions{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *Conv2DOptions) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *Conv2DOptions) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *Conv2DOptions) 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 *Conv2DOptions) MutatePadding(n Padding) bool {
return rcv._tab.MutateInt8Slot(4, int8(n))
}
func (rcv *Conv2DOptions) StrideW() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Conv2DOptions) MutateStrideW(n int32) bool {
return rcv._tab.MutateInt32Slot(6, n)
}
func (rcv *Conv2DOptions) StrideH() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Conv2DOptions) MutateStrideH(n int32) bool {
return rcv._tab.MutateInt32Slot(8, n)
}
func (rcv *Conv2DOptions) FusedActivationFunction() ActivationFunctionType {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return ActivationFunctionType(rcv._tab.GetInt8(o + rcv._tab.Pos))
}
return 0
}
func (rcv *Conv2DOptions) MutateFusedActivationFunction(n ActivationFunctionType) bool {
return rcv._tab.MutateInt8Slot(10, int8(n))
}
func (rcv *Conv2DOptions) DilationWFactor() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 1
}
func (rcv *Conv2DOptions) MutateDilationWFactor(n int32) bool {
return rcv._tab.MutateInt32Slot(12, n)
}
func (rcv *Conv2DOptions) DilationHFactor() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 1
}
func (rcv *Conv2DOptions) MutateDilationHFactor(n int32) bool {
return rcv._tab.MutateInt32Slot(14, n)
}
func Conv2DOptionsStart(builder *flatbuffers.Builder) {
builder.StartObject(6)
}
func Conv2DOptionsAddPadding(builder *flatbuffers.Builder, padding Padding) {
builder.PrependInt8Slot(0, int8(padding), 0)
}
func Conv2DOptionsAddStrideW(builder *flatbuffers.Builder, strideW int32) {
builder.PrependInt32Slot(1, strideW, 0)
}
func Conv2DOptionsAddStrideH(builder *flatbuffers.Builder, strideH int32) {
builder.PrependInt32Slot(2, strideH, 0)
}
func Conv2DOptionsAddFusedActivationFunction(builder *flatbuffers.Builder, fusedActivationFunction ActivationFunctionType) {
builder.PrependInt8Slot(3, int8(fusedActivationFunction), 0)
}
func Conv2DOptionsAddDilationWFactor(builder *flatbuffers.Builder, dilationWFactor int32) {
builder.PrependInt32Slot(4, dilationWFactor, 1)
}
func Conv2DOptionsAddDilationHFactor(builder *flatbuffers.Builder, dilationHFactor int32) {
builder.PrependInt32Slot(5, dilationHFactor, 1)
}
func Conv2DOptionsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}