-
Notifications
You must be signed in to change notification settings - Fork 110
/
UnidirectionalSequenceLSTMOptions.go
116 lines (98 loc) · 3.65 KB
/
UnidirectionalSequenceLSTMOptions.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
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package tflite
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type UnidirectionalSequenceLSTMOptions struct {
_tab flatbuffers.Table
}
func GetRootAsUnidirectionalSequenceLSTMOptions(buf []byte, offset flatbuffers.UOffsetT) *UnidirectionalSequenceLSTMOptions {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &UnidirectionalSequenceLSTMOptions{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsUnidirectionalSequenceLSTMOptions(buf []byte, offset flatbuffers.UOffsetT) *UnidirectionalSequenceLSTMOptions {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &UnidirectionalSequenceLSTMOptions{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *UnidirectionalSequenceLSTMOptions) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *UnidirectionalSequenceLSTMOptions) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *UnidirectionalSequenceLSTMOptions) FusedActivationFunction() ActivationFunctionType {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return ActivationFunctionType(rcv._tab.GetInt8(o + rcv._tab.Pos))
}
return 0
}
func (rcv *UnidirectionalSequenceLSTMOptions) MutateFusedActivationFunction(n ActivationFunctionType) bool {
return rcv._tab.MutateInt8Slot(4, int8(n))
}
func (rcv *UnidirectionalSequenceLSTMOptions) CellClip() float32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
}
return 0.0
}
func (rcv *UnidirectionalSequenceLSTMOptions) MutateCellClip(n float32) bool {
return rcv._tab.MutateFloat32Slot(6, n)
}
func (rcv *UnidirectionalSequenceLSTMOptions) ProjClip() float32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetFloat32(o + rcv._tab.Pos)
}
return 0.0
}
func (rcv *UnidirectionalSequenceLSTMOptions) MutateProjClip(n float32) bool {
return rcv._tab.MutateFloat32Slot(8, n)
}
func (rcv *UnidirectionalSequenceLSTMOptions) TimeMajor() bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.GetBool(o + rcv._tab.Pos)
}
return false
}
func (rcv *UnidirectionalSequenceLSTMOptions) MutateTimeMajor(n bool) bool {
return rcv._tab.MutateBoolSlot(10, n)
}
func (rcv *UnidirectionalSequenceLSTMOptions) AsymmetricQuantizeInputs() bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.GetBool(o + rcv._tab.Pos)
}
return false
}
func (rcv *UnidirectionalSequenceLSTMOptions) MutateAsymmetricQuantizeInputs(n bool) bool {
return rcv._tab.MutateBoolSlot(12, n)
}
func UnidirectionalSequenceLSTMOptionsStart(builder *flatbuffers.Builder) {
builder.StartObject(5)
}
func UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder *flatbuffers.Builder, fusedActivationFunction ActivationFunctionType) {
builder.PrependInt8Slot(0, int8(fusedActivationFunction), 0)
}
func UnidirectionalSequenceLSTMOptionsAddCellClip(builder *flatbuffers.Builder, cellClip float32) {
builder.PrependFloat32Slot(1, cellClip, 0.0)
}
func UnidirectionalSequenceLSTMOptionsAddProjClip(builder *flatbuffers.Builder, projClip float32) {
builder.PrependFloat32Slot(2, projClip, 0.0)
}
func UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder *flatbuffers.Builder, timeMajor bool) {
builder.PrependBoolSlot(3, timeMajor, false)
}
func UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder *flatbuffers.Builder, asymmetricQuantizeInputs bool) {
builder.PrependBoolSlot(4, asymmetricQuantizeInputs, false)
}
func UnidirectionalSequenceLSTMOptionsEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}