FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/src/TensorFlowNET.Core/Protobuf/Saver.cs at master · feelsyt/TensorFlow.NET · GitHub
feelsyt
/
TensorFlow.NET
Public
forked from
SciSharp/TensorFlow.NET
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Protobuf
/
Saver.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
517 lines (483 loc) · 19 KB
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Protobuf
/
Saver.cs
Copy path
File metadata and controls
517 lines (483 loc) · 19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/saver.proto
// </auto-generated>
#pragma warning disable
1591
,
0612
,
3021
,
8981
#region Designer generated code
using
pb
=
global
::
Google
.
Protobuf
;
using
pbc
=
global
::
Google
.
Protobuf
.
Collections
;
using
pbr
=
global
::
Google
.
Protobuf
.
Reflection
;
using
scg
=
global
::
System
.
Collections
.
Generic
;
namespace
Tensorflow
{
/// <summary>Holder for reflection information generated from tensorflow/core/protobuf/saver.proto</summary>
public
static
partial
class
SaverReflection
{
#region Descriptor
/// <summary>File descriptor for tensorflow/core/protobuf/saver.proto</summary>
public
static
pbr
::
FileDescriptor
Descriptor
{
get
{
return
descriptor
;
}
}
private
static
pbr
::
FileDescriptor
descriptor
;
static
SaverReflection
(
)
{
byte
[
]
descriptorData
=
global
::
System
.
Convert
.
FromBase64String
(
string
.
Concat
(
"CiR0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2F2ZXIucHJvdG8SCnRlbnNv"
,
"cmZsb3cingIKCFNhdmVyRGVmEhwKFGZpbGVuYW1lX3RlbnNvcl9uYW1lGAEg"
,
"ASgJEhgKEHNhdmVfdGVuc29yX25hbWUYAiABKAkSFwoPcmVzdG9yZV9vcF9u"
,
"YW1lGAMgASgJEhMKC21heF90b19rZWVwGAQgASgFEg8KB3NoYXJkZWQYBSAB"
,
"KAgSJQoda2VlcF9jaGVja3BvaW50X2V2ZXJ5X25faG91cnMYBiABKAISPQoH"
,
"dmVyc2lvbhgHIAEoDjIsLnRlbnNvcmZsb3cuU2F2ZXJEZWYuQ2hlY2twb2lu"
,
"dEZvcm1hdFZlcnNpb24iNQoXQ2hlY2twb2ludEZvcm1hdFZlcnNpb24SCgoG"
,
"TEVHQUNZEAASBgoCVjEQARIGCgJWMhACQn4KE29yZy50ZW5zb3JmbG93LnV0"
,
"aWxCC1NhdmVyUHJvdG9zUAFaVWdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5z"
,
"b3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1Zi9mb3JfY29yZV9w"
,
"cm90b3NfZ29fcHJvdG/4AQFiBnByb3RvMw=="
)
)
;
descriptor
=
pbr
::
FileDescriptor
.
FromGeneratedCode
(
descriptorData
,
new
pbr
::
FileDescriptor
[
]
{
}
,
new
pbr
::
GeneratedClrTypeInfo
(
null
,
null
,
new
pbr
::
GeneratedClrTypeInfo
[
]
{
new
pbr
::
GeneratedClrTypeInfo
(
typeof
(
global
::
Tensorflow
.
SaverDef
)
,
global
::
Tensorflow
.
SaverDef
.
Parser
,
new
[
]
{
"FilenameTensorName"
,
"SaveTensorName"
,
"RestoreOpName"
,
"MaxToKeep"
,
"Sharded"
,
"KeepCheckpointEveryNHours"
,
"Version"
}
,
null
,
new
[
]
{
typeof
(
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
)
}
,
null
,
null
)
}
)
)
;
}
#endregion
}
#region Messages
/// <summary>
/// Protocol buffer representing the configuration of a Saver.
/// </summary>
public
sealed
partial
class
SaverDef
:
pb
::
IMessage
<
SaverDef
>
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
,
pb
::
IBufferMessage
#endif
{
private
static
readonly
pb
::
MessageParser
<
SaverDef
>
_parser
=
new
pb
::
MessageParser
<
SaverDef
>
(
(
)
=>
new
SaverDef
(
)
)
;
private
pb
::
UnknownFieldSet
_unknownFields
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
static
pb
::
MessageParser
<
SaverDef
>
Parser
{
get
{
return
_parser
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Tensorflow
.
SaverReflection
.
Descriptor
.
MessageTypes
[
0
]
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
pbr
::
MessageDescriptor
pb
::
IMessage
.
Descriptor
{
get
{
return
Descriptor
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
SaverDef
(
)
{
OnConstruction
(
)
;
}
partial
void
OnConstruction
(
)
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
SaverDef
(
SaverDef
other
)
:
this
(
)
{
filenameTensorName_
=
other
.
filenameTensorName_
;
saveTensorName_
=
other
.
saveTensorName_
;
restoreOpName_
=
other
.
restoreOpName_
;
maxToKeep_
=
other
.
maxToKeep_
;
sharded_
=
other
.
sharded_
;
keepCheckpointEveryNHours_
=
other
.
keepCheckpointEveryNHours_
;
version_
=
other
.
version_
;
_unknownFields
=
pb
::
UnknownFieldSet
.
Clone
(
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
SaverDef
Clone
(
)
{
return
new
SaverDef
(
this
)
;
}
/// <summary>Field number for the "filename_tensor_name" field.</summary>
public
const
int
FilenameTensorNameFieldNumber
=
1
;
private
string
filenameTensorName_
=
""
;
/// <summary>
/// The name of the tensor in which to specify the filename when saving or
/// restoring a model checkpoint.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
string
FilenameTensorName
{
get
{
return
filenameTensorName_
;
}
set
{
filenameTensorName_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "save_tensor_name" field.</summary>
public
const
int
SaveTensorNameFieldNumber
=
2
;
private
string
saveTensorName_
=
""
;
/// <summary>
/// The operation to run when saving a model checkpoint.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
string
SaveTensorName
{
get
{
return
saveTensorName_
;
}
set
{
saveTensorName_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "restore_op_name" field.</summary>
public
const
int
RestoreOpNameFieldNumber
=
3
;
private
string
restoreOpName_
=
""
;
/// <summary>
/// The operation to run when restoring a model checkpoint.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
string
RestoreOpName
{
get
{
return
restoreOpName_
;
}
set
{
restoreOpName_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "max_to_keep" field.</summary>
public
const
int
MaxToKeepFieldNumber
=
4
;
private
int
maxToKeep_
;
/// <summary>
/// Maximum number of checkpoints to keep. If 0, no checkpoints are deleted.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
int
MaxToKeep
{
get
{
return
maxToKeep_
;
}
set
{
maxToKeep_
=
value
;
}
}
/// <summary>Field number for the "sharded" field.</summary>
public
const
int
ShardedFieldNumber
=
5
;
private
bool
sharded_
;
/// <summary>
/// Shard the save files, one per device that has Variable nodes.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
bool
Sharded
{
get
{
return
sharded_
;
}
set
{
sharded_
=
value
;
}
}
/// <summary>Field number for the "keep_checkpoint_every_n_hours" field.</summary>
public
const
int
KeepCheckpointEveryNHoursFieldNumber
=
6
;
private
float
keepCheckpointEveryNHours_
;
/// <summary>
/// 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.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
float
KeepCheckpointEveryNHours
{
get
{
return
keepCheckpointEveryNHours_
;
}
set
{
keepCheckpointEveryNHours_
=
value
;
}
}
/// <summary>Field number for the "version" field.</summary>
public
const
int
VersionFieldNumber
=
7
;
private
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
version_
=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
Version
{
get
{
return
version_
;
}
set
{
version_
=
value
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
override
bool
Equals
(
object
other
)
{
return
Equals
(
other
as
SaverDef
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
bool
Equals
(
SaverDef
other
)
{
if
(
ReferenceEquals
(
other
,
null
)
)
{
return
false
;
}
if
(
ReferenceEquals
(
other
,
this
)
)
{
return
true
;
}
if
(
FilenameTensorName
!=
other
.
FilenameTensorName
)
return
false
;
if
(
SaveTensorName
!=
other
.
SaveTensorName
)
return
false
;
if
(
RestoreOpName
!=
other
.
RestoreOpName
)
return
false
;
if
(
MaxToKeep
!=
other
.
MaxToKeep
)
return
false
;
if
(
Sharded
!=
other
.
Sharded
)
return
false
;
if
(
!
pbc
::
ProtobufEqualityComparers
.
BitwiseSingleEqualityComparer
.
Equals
(
KeepCheckpointEveryNHours
,
other
.
KeepCheckpointEveryNHours
)
)
return
false
;
if
(
Version
!=
other
.
Version
)
return
false
;
return
Equals
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
override
int
GetHashCode
(
)
{
int
hash
=
1
;
if
(
FilenameTensorName
.
Length
!=
0
)
hash
^=
FilenameTensorName
.
GetHashCode
(
)
;
if
(
SaveTensorName
.
Length
!=
0
)
hash
^=
SaveTensorName
.
GetHashCode
(
)
;
if
(
RestoreOpName
.
Length
!=
0
)
hash
^=
RestoreOpName
.
GetHashCode
(
)
;
if
(
MaxToKeep
!=
0
)
hash
^=
MaxToKeep
.
GetHashCode
(
)
;
if
(
Sharded
!=
false
)
hash
^=
Sharded
.
GetHashCode
(
)
;
if
(
KeepCheckpointEveryNHours
!=
0F
)
hash
^=
pbc
::
ProtobufEqualityComparers
.
BitwiseSingleEqualityComparer
.
GetHashCode
(
KeepCheckpointEveryNHours
)
;
if
(
Version
!=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
)
hash
^=
Version
.
GetHashCode
(
)
;
if
(
_unknownFields
!=
null
)
{
hash
^=
_unknownFields
.
GetHashCode
(
)
;
}
return
hash
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
override
string
ToString
(
)
{
return
pb
::
JsonFormatter
.
ToDiagnosticString
(
this
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output
.
WriteRawMessage
(
this
)
;
#else
if
(
FilenameTensorName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
10
)
;
output
.
WriteString
(
FilenameTensorName
)
;
}
if
(
SaveTensorName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
18
)
;
output
.
WriteString
(
SaveTensorName
)
;
}
if
(
RestoreOpName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
26
)
;
output
.
WriteString
(
RestoreOpName
)
;
}
if
(
MaxToKeep
!=
0
)
{
output
.
WriteRawTag
(
32
)
;
output
.
WriteInt32
(
MaxToKeep
)
;
}
if
(
Sharded
!=
false
)
{
output
.
WriteRawTag
(
40
)
;
output
.
WriteBool
(
Sharded
)
;
}
if
(
KeepCheckpointEveryNHours
!=
0F
)
{
output
.
WriteRawTag
(
53
)
;
output
.
WriteFloat
(
KeepCheckpointEveryNHours
)
;
}
if
(
Version
!=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
)
{
output
.
WriteRawTag
(
56
)
;
output
.
WriteEnum
(
(
int
)
Version
)
;
}
if
(
_unknownFields
!=
null
)
{
_unknownFields
.
WriteTo
(
output
)
;
}
#endif
}
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
void
pb
::
IBufferMessage
.
InternalWriteTo
(
ref
pb
::
WriteContext
output
)
{
if
(
FilenameTensorName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
10
)
;
output
.
WriteString
(
FilenameTensorName
)
;
}
if
(
SaveTensorName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
18
)
;
output
.
WriteString
(
SaveTensorName
)
;
}
if
(
RestoreOpName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
26
)
;
output
.
WriteString
(
RestoreOpName
)
;
}
if
(
MaxToKeep
!=
0
)
{
output
.
WriteRawTag
(
32
)
;
output
.
WriteInt32
(
MaxToKeep
)
;
}
if
(
Sharded
!=
false
)
{
output
.
WriteRawTag
(
40
)
;
output
.
WriteBool
(
Sharded
)
;
}
if
(
KeepCheckpointEveryNHours
!=
0F
)
{
output
.
WriteRawTag
(
53
)
;
output
.
WriteFloat
(
KeepCheckpointEveryNHours
)
;
}
if
(
Version
!=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
)
{
output
.
WriteRawTag
(
56
)
;
output
.
WriteEnum
(
(
int
)
Version
)
;
}
if
(
_unknownFields
!=
null
)
{
_unknownFields
.
WriteTo
(
ref
output
)
;
}
}
#endif
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
int
CalculateSize
(
)
{
int
size
=
0
;
if
(
FilenameTensorName
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
FilenameTensorName
)
;
}
if
(
SaveTensorName
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
SaveTensorName
)
;
}
if
(
RestoreOpName
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
RestoreOpName
)
;
}
if
(
MaxToKeep
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeInt32Size
(
MaxToKeep
)
;
}
if
(
Sharded
!=
false
)
{
size
+=
1
+
1
;
}
if
(
KeepCheckpointEveryNHours
!=
0F
)
{
size
+=
1
+
4
;
}
if
(
Version
!=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeEnumSize
(
(
int
)
Version
)
;
}
if
(
_unknownFields
!=
null
)
{
size
+=
_unknownFields
.
CalculateSize
(
)
;
}
return
size
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
void
MergeFrom
(
SaverDef
other
)
{
if
(
other
==
null
)
{
return
;
}
if
(
other
.
FilenameTensorName
.
Length
!=
0
)
{
FilenameTensorName
=
other
.
FilenameTensorName
;
}
if
(
other
.
SaveTensorName
.
Length
!=
0
)
{
SaveTensorName
=
other
.
SaveTensorName
;
}
if
(
other
.
RestoreOpName
.
Length
!=
0
)
{
RestoreOpName
=
other
.
RestoreOpName
;
}
if
(
other
.
MaxToKeep
!=
0
)
{
MaxToKeep
=
other
.
MaxToKeep
;
}
if
(
other
.
Sharded
!=
false
)
{
Sharded
=
other
.
Sharded
;
}
if
(
other
.
KeepCheckpointEveryNHours
!=
0F
)
{
KeepCheckpointEveryNHours
=
other
.
KeepCheckpointEveryNHours
;
}
if
(
other
.
Version
!=
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
.
Legacy
)
{
Version
=
other
.
Version
;
}
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFrom
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
void
MergeFrom
(
pb
::
CodedInputStream
input
)
{
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input
.
ReadRawMessage
(
this
)
;
#else
uint
tag
;
while
(
(
tag
=
input
.
ReadTag
(
)
)
!=
0
)
{
switch
(
tag
)
{
default
:
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFieldFrom
(
_unknownFields
,
input
)
;
break
;
case
10
:
{
FilenameTensorName
=
input
.
ReadString
(
)
;
break
;
}
case
18
:
{
SaveTensorName
=
input
.
ReadString
(
)
;
break
;
}
case
26
:
{
RestoreOpName
=
input
.
ReadString
(
)
;
break
;
}
case
32
:
{
MaxToKeep
=
input
.
ReadInt32
(
)
;
break
;
}
case
40
:
{
Sharded
=
input
.
ReadBool
(
)
;
break
;
}
case
53
:
{
KeepCheckpointEveryNHours
=
input
.
ReadFloat
(
)
;
break
;
}
case
56
:
{
Version
=
(
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
)
input
.
ReadEnum
(
)
;
break
;
}
}
}
#endif
}
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
void
pb
::
IBufferMessage
.
InternalMergeFrom
(
ref
pb
::
ParseContext
input
)
{
uint
tag
;
while
(
(
tag
=
input
.
ReadTag
(
)
)
!=
0
)
{
switch
(
tag
)
{
default
:
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFieldFrom
(
_unknownFields
,
ref
input
)
;
break
;
case
10
:
{
FilenameTensorName
=
input
.
ReadString
(
)
;
break
;
}
case
18
:
{
SaveTensorName
=
input
.
ReadString
(
)
;
break
;
}
case
26
:
{
RestoreOpName
=
input
.
ReadString
(
)
;
break
;
}
case
32
:
{
MaxToKeep
=
input
.
ReadInt32
(
)
;
break
;
}
case
40
:
{
Sharded
=
input
.
ReadBool
(
)
;
break
;
}
case
53
:
{
KeepCheckpointEveryNHours
=
input
.
ReadFloat
(
)
;
break
;
}
case
56
:
{
Version
=
(
global
::
Tensorflow
.
SaverDef
.
Types
.
CheckpointFormatVersion
)
input
.
ReadEnum
(
)
;
break
;
}
}
}
}
#endif
#region Nested types
/// <summary>Container for nested types declared in the SaverDef message type.</summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
static
partial
class
Types
{
/// <summary>
/// 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.
/// </summary>
public
enum
CheckpointFormatVersion
{
/// <summary>
/// Internal legacy format.
/// </summary>
[
pbr
::
OriginalName
(
"LEGACY"
)
]
Legacy
=
0
,
/// <summary>
/// Deprecated format: tf.Saver() which works with tensorflow::table::Table.
/// </summary>
[
pbr
::
OriginalName
(
"V1"
)
]
V1
=
1
,
/// <summary>
/// Current format: more efficient.
/// </summary>
[
pbr
::
OriginalName
(
"V2"
)
]
V2
=
2
,
}
}
#endregion
}
#endregion
}
#endregion Designer generated code
Back
|
FazBrowse Home
|
New Git URL