FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/src/TensorFlowNET.Core/Protobuf/SavedModel.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
/
SavedModel.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
276 lines (249 loc) · 10.5 KB
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Protobuf
/
SavedModel.cs
Copy path
File metadata and controls
276 lines (249 loc) · 10.5 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
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/saved_model.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/saved_model.proto</summary>
public
static
partial
class
SavedModelReflection
{
#region Descriptor
/// <summary>File descriptor for tensorflow/core/protobuf/saved_model.proto</summary>
public
static
pbr
::
FileDescriptor
Descriptor
{
get
{
return
descriptor
;
}
}
private
static
pbr
::
FileDescriptor
descriptor
;
static
SavedModelReflection
(
)
{
byte
[
]
descriptorData
=
global
::
System
.
Convert
.
FromBase64String
(
string
.
Concat
(
"Cip0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2F2ZWRfbW9kZWwucHJvdG8S"
,
"CnRlbnNvcmZsb3caKXRlbnNvcmZsb3cvY29yZS9wcm90b2J1Zi9tZXRhX2dy"
,
"YXBoLnByb3RvIl8KClNhdmVkTW9kZWwSIgoac2F2ZWRfbW9kZWxfc2NoZW1h"
,
"X3ZlcnNpb24YASABKAMSLQoLbWV0YV9ncmFwaHMYAiADKAsyGC50ZW5zb3Jm"
,
"bG93Lk1ldGFHcmFwaERlZkKIAQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3Jr"
,
"QhBTYXZlZE1vZGVsUHJvdG9zUAFaVWdpdGh1Yi5jb20vdGVuc29yZmxvdy90"
,
"ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1Zi9mb3JfY29y"
,
"ZV9wcm90b3NfZ29fcHJvdG/4AQFiBnByb3RvMw=="
)
)
;
descriptor
=
pbr
::
FileDescriptor
.
FromGeneratedCode
(
descriptorData
,
new
pbr
::
FileDescriptor
[
]
{
global
::
Tensorflow
.
MetaGraphReflection
.
Descriptor
,
}
,
new
pbr
::
GeneratedClrTypeInfo
(
null
,
null
,
new
pbr
::
GeneratedClrTypeInfo
[
]
{
new
pbr
::
GeneratedClrTypeInfo
(
typeof
(
global
::
Tensorflow
.
SavedModel
)
,
global
::
Tensorflow
.
SavedModel
.
Parser
,
new
[
]
{
"SavedModelSchemaVersion"
,
"MetaGraphs"
}
,
null
,
null
,
null
,
null
)
}
)
)
;
}
#endregion
}
#region Messages
/// <summary>
/// SavedModel is the high level serialization format for TensorFlow Models.
/// See [todo: doc links, similar to session_bundle] for more information.
/// </summary>
public
sealed
partial
class
SavedModel
:
pb
::
IMessage
<
SavedModel
>
#if
!
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
,
pb
::
IBufferMessage
#endif
{
private
static
readonly
pb
::
MessageParser
<
SavedModel
>
_parser
=
new
pb
::
MessageParser
<
SavedModel
>
(
(
)
=>
new
SavedModel
(
)
)
;
private
pb
::
UnknownFieldSet
_unknownFields
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
static
pb
::
MessageParser
<
SavedModel
>
Parser
{
get
{
return
_parser
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Tensorflow
.
SavedModelReflection
.
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
SavedModel
(
)
{
OnConstruction
(
)
;
}
partial
void
OnConstruction
(
)
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
SavedModel
(
SavedModel
other
)
:
this
(
)
{
savedModelSchemaVersion_
=
other
.
savedModelSchemaVersion_
;
metaGraphs_
=
other
.
metaGraphs_
.
Clone
(
)
;
_unknownFields
=
pb
::
UnknownFieldSet
.
Clone
(
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
SavedModel
Clone
(
)
{
return
new
SavedModel
(
this
)
;
}
/// <summary>Field number for the "saved_model_schema_version" field.</summary>
public
const
int
SavedModelSchemaVersionFieldNumber
=
1
;
private
long
savedModelSchemaVersion_
;
/// <summary>
/// The schema version of the SavedModel instance. Used for versioning when
/// making future changes to the specification/implementation. Initial value
/// at release will be 1.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
long
SavedModelSchemaVersion
{
get
{
return
savedModelSchemaVersion_
;
}
set
{
savedModelSchemaVersion_
=
value
;
}
}
/// <summary>Field number for the "meta_graphs" field.</summary>
public
const
int
MetaGraphsFieldNumber
=
2
;
private
static
readonly
pb
::
FieldCodec
<
global
::
Tensorflow
.
MetaGraphDef
>
_repeated_metaGraphs_codec
=
pb
::
FieldCodec
.
ForMessage
(
18
,
global
::
Tensorflow
.
MetaGraphDef
.
Parser
)
;
private
readonly
pbc
::
RepeatedField
<
global
::
Tensorflow
.
MetaGraphDef
>
metaGraphs_
=
new
pbc
::
RepeatedField
<
global
::
Tensorflow
.
MetaGraphDef
>
(
)
;
/// <summary>
/// One or more MetaGraphs.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
pbc
::
RepeatedField
<
global
::
Tensorflow
.
MetaGraphDef
>
MetaGraphs
{
get
{
return
metaGraphs_
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
override
bool
Equals
(
object
other
)
{
return
Equals
(
other
as
SavedModel
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
bool
Equals
(
SavedModel
other
)
{
if
(
ReferenceEquals
(
other
,
null
)
)
{
return
false
;
}
if
(
ReferenceEquals
(
other
,
this
)
)
{
return
true
;
}
if
(
SavedModelSchemaVersion
!=
other
.
SavedModelSchemaVersion
)
return
false
;
if
(
!
metaGraphs_
.
Equals
(
other
.
metaGraphs_
)
)
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
(
SavedModelSchemaVersion
!=
0L
)
hash
^=
SavedModelSchemaVersion
.
GetHashCode
(
)
;
hash
^=
metaGraphs_
.
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
(
SavedModelSchemaVersion
!=
0L
)
{
output
.
WriteRawTag
(
8
)
;
output
.
WriteInt64
(
SavedModelSchemaVersion
)
;
}
metaGraphs_
.
WriteTo
(
output
,
_repeated_metaGraphs_codec
)
;
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
(
SavedModelSchemaVersion
!=
0L
)
{
output
.
WriteRawTag
(
8
)
;
output
.
WriteInt64
(
SavedModelSchemaVersion
)
;
}
metaGraphs_
.
WriteTo
(
ref
output
,
_repeated_metaGraphs_codec
)
;
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
(
SavedModelSchemaVersion
!=
0L
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeInt64Size
(
SavedModelSchemaVersion
)
;
}
size
+=
metaGraphs_
.
CalculateSize
(
_repeated_metaGraphs_codec
)
;
if
(
_unknownFields
!=
null
)
{
size
+=
_unknownFields
.
CalculateSize
(
)
;
}
return
size
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCode
(
"protoc"
,
null
)
]
public
void
MergeFrom
(
SavedModel
other
)
{
if
(
other
==
null
)
{
return
;
}
if
(
other
.
SavedModelSchemaVersion
!=
0L
)
{
SavedModelSchemaVersion
=
other
.
SavedModelSchemaVersion
;
}
metaGraphs_
.
Add
(
other
.
metaGraphs_
)
;
_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
8
:
{
SavedModelSchemaVersion
=
input
.
ReadInt64
(
)
;
break
;
}
case
18
:
{
metaGraphs_
.
AddEntriesFrom
(
input
,
_repeated_metaGraphs_codec
)
;
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
8
:
{
SavedModelSchemaVersion
=
input
.
ReadInt64
(
)
;
break
;
}
case
18
:
{
metaGraphs_
.
AddEntriesFrom
(
ref
input
,
_repeated_metaGraphs_codec
)
;
break
;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code
Back
|
FazBrowse Home
|
New Git URL