/
saver.pb.go
executable file
·169 lines (147 loc) · 6.92 KB
/
saver.pb.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/protobuf/saver.proto
/*
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/protobuf/saver.proto
It has these top-level messages:
SaverDef
*/
package tfpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A version number that identifies a different on-disk checkpoint format.
// Usually, each subclass of BaseSaverBuilder works with a particular
// version/format. However, it is possible that the same builder may be
// upgraded to support a newer checkpoint format in the future.
type SaverDef_CheckpointFormatVersion int32
const (
// Internal legacy format.
SaverDef_LEGACY SaverDef_CheckpointFormatVersion = 0
// Deprecated format: tf.Saver() which works with tensorflow::table::Table.
SaverDef_V1 SaverDef_CheckpointFormatVersion = 1
// Current format: more efficient.
SaverDef_V2 SaverDef_CheckpointFormatVersion = 2
)
var SaverDef_CheckpointFormatVersion_name = map[int32]string{
0: "LEGACY",
1: "V1",
2: "V2",
}
var SaverDef_CheckpointFormatVersion_value = map[string]int32{
"LEGACY": 0,
"V1": 1,
"V2": 2,
}
func (x SaverDef_CheckpointFormatVersion) String() string {
return proto.EnumName(SaverDef_CheckpointFormatVersion_name, int32(x))
}
func (SaverDef_CheckpointFormatVersion) EnumDescriptor() ([]byte, []int) {
return fileDescriptor1, []int{0, 0}
}
// Protocol buffer representing the configuration of a Saver.
type SaverDef struct {
// The name of the tensor in which to specify the filename when saving or
// restoring a model checkpoint.
FilenameTensorName string `protobuf:"bytes,1,opt,name=filename_tensor_name,json=filenameTensorName" json:"filename_tensor_name,omitempty"`
// The operation to run when saving a model checkpoint.
SaveTensorName string `protobuf:"bytes,2,opt,name=save_tensor_name,json=saveTensorName" json:"save_tensor_name,omitempty"`
// The operation to run when restoring a model checkpoint.
RestoreOpName string `protobuf:"bytes,3,opt,name=restore_op_name,json=restoreOpName" json:"restore_op_name,omitempty"`
// Maximum number of checkpoints to keep. If 0, no checkpoints are deleted.
MaxToKeep int32 `protobuf:"varint,4,opt,name=max_to_keep,json=maxToKeep" json:"max_to_keep,omitempty"`
// Shard the save files, one per device that has Variable nodes.
Sharded bool `protobuf:"varint,5,opt,name=sharded" json:"sharded,omitempty"`
// How often to keep an additional checkpoint. If not specified, only the last
// "max_to_keep" checkpoints are kept; if specified, in addition to keeping
// the last "max_to_keep" checkpoints, an additional checkpoint will be kept
// for every n hours of training.
KeepCheckpointEveryNHours float32 `protobuf:"fixed32,6,opt,name=keep_checkpoint_every_n_hours,json=keepCheckpointEveryNHours" json:"keep_checkpoint_every_n_hours,omitempty"`
Version SaverDef_CheckpointFormatVersion `protobuf:"varint,7,opt,name=version,enum=tensorflow.SaverDef_CheckpointFormatVersion" json:"version,omitempty"`
}
func (m *SaverDef) Reset() { *m = SaverDef{} }
func (m *SaverDef) String() string { return proto.CompactTextString(m) }
func (*SaverDef) ProtoMessage() {}
func (*SaverDef) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *SaverDef) GetFilenameTensorName() string {
if m != nil {
return m.FilenameTensorName
}
return ""
}
func (m *SaverDef) GetSaveTensorName() string {
if m != nil {
return m.SaveTensorName
}
return ""
}
func (m *SaverDef) GetRestoreOpName() string {
if m != nil {
return m.RestoreOpName
}
return ""
}
func (m *SaverDef) GetMaxToKeep() int32 {
if m != nil {
return m.MaxToKeep
}
return 0
}
func (m *SaverDef) GetSharded() bool {
if m != nil {
return m.Sharded
}
return false
}
func (m *SaverDef) GetKeepCheckpointEveryNHours() float32 {
if m != nil {
return m.KeepCheckpointEveryNHours
}
return 0
}
func (m *SaverDef) GetVersion() SaverDef_CheckpointFormatVersion {
if m != nil {
return m.Version
}
return SaverDef_LEGACY
}
func init() {
proto.RegisterType((*SaverDef)(nil), "tensorflow.SaverDef")
proto.RegisterEnum("tensorflow.SaverDef_CheckpointFormatVersion", SaverDef_CheckpointFormatVersion_name, SaverDef_CheckpointFormatVersion_value)
}
func init() { proto.RegisterFile("tensorflow/core/protobuf/saver.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 339 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd1, 0x41, 0x4f, 0xea, 0x40,
0x10, 0x07, 0xf0, 0xb7, 0xe5, 0x51, 0x60, 0xc8, 0xe3, 0x35, 0xab, 0x89, 0xf5, 0xa0, 0x69, 0x88,
0xd1, 0x1e, 0x4c, 0x51, 0x8c, 0x77, 0x05, 0x41, 0x13, 0x0d, 0x92, 0x4a, 0x48, 0x3c, 0x6d, 0x0a,
0x4c, 0xa5, 0x81, 0x76, 0x9b, 0xed, 0x82, 0xf8, 0x11, 0xfc, 0xc6, 0x1e, 0xcd, 0x2e, 0x56, 0xf0,
0xe0, 0xa9, 0xdd, 0x9d, 0xdf, 0x7f, 0x27, 0x99, 0x81, 0x23, 0x89, 0x49, 0xc6, 0x45, 0x38, 0xe7,
0xaf, 0x8d, 0x31, 0x17, 0xd8, 0x48, 0x05, 0x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