-
Notifications
You must be signed in to change notification settings - Fork 110
/
Pool2DOptions.go
131 lines (111 loc) · 3.45 KB
/
Pool2DOptions.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 Pool2DOptions struct {
_tab flatbuffers.Table
}
func GetRootAsPool2DOptions(buf []byte, offset flatbuffers.UOffsetT) *Pool2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &Pool2DOptions{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsPool2DOptions(buf []byte, offset flatbuffers.UOffsetT) *Pool2DOptions {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &Pool2DOptions{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *Pool2DOptions) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *Pool2DOptions) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *Pool2DOptions) 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 *Pool2DOptions) MutatePadding(n Padding) bool {
return rcv._tab.MutateInt8Slot(4, int8(n))
}
func (rcv *Pool2DOptions) StrideW() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Pool2DOptions) MutateStrideW(n int32) bool {
return rcv._tab.MutateInt32Slot(6, n)
}
func (rcv *Pool2DOptions) StrideH() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Pool2DOptions) MutateStrideH(n int32) bool {
return rcv._tab.MutateInt32Slot(8, n)
}
func (rcv *Pool2DOptions) FilterWidth() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Pool2DOptions) MutateFilterWidth(n int32) bool {
return rcv._tab.MutateInt32Slot(10, n)
}
func (rcv *Pool2DOptions) FilterHeight() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.GetInt32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *Pool2DOptions) MutateFilterHeight(n int32) bool {
return rcv._tab.MutateInt32Slot(12, n)
}
func (rcv *Pool2DOptions) FusedActivationFunction() ActivationFunctionType {
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
if o != 0 {
return ActivationFunctionType(rcv._tab.GetInt8(o + rcv._tab.Pos))
}
return 0
}
func (rcv *Pool2DOptions) MutateFusedActivationFunction(n ActivationFunctionType) bool {
return rcv._tab.MutateInt8Slot(14, int8(n))
}
func Pool2DOptionsStart(builder *flatbuffers.Builder) {
builder.StartObject(6)
}
func Pool2DOptionsAddPadding(builder *flatbuffers.Builder, padding Padding) {
builder.PrependInt8Slot(0, int8(padding), 0)
}
func Pool2DOptionsAddStrideW(builder *flatbuffers.Builder, strideW int32) {
builder.PrependInt32Slot(1, strideW, 0)
}
func Pool2DOptionsAddStrideH(builder *flatbuffers.Builder, strideH int32) {
builder.PrependInt32Slot(2, strideH, 0)
}
func Pool2DOptionsAddFilterWidth(builder *flatbuffers.Builder, filterWidth int32) {
builder.PrependInt32Slot(3, filterWidth, 0)
}
func Pool2DOptionsAddFilterHeight(builder *flatbuffers.Builder, filterHeight int32) {
builder.PrependInt32Slot(4, filterHeight, 0)
}
func Pool2DOptionsAddFusedActivationFunction(builder *flatbuffers.Builder, fusedActivationFunction ActivationFunctionType) {
builder.PrependInt8Slot(5, int8(fusedActivationFunction), 0)
}
func Pool2DOptionsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}