FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/src/TensorFlowNET.Core/Protobuf/Tensor.cs at master · dmnhwjin/TensorFlow.NET · GitHub
dmnhwjin
/
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
/
Tensor.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
804 lines (745 loc) · 31.6 KB
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Protobuf
/
Tensor.cs
Copy path
File metadata and controls
804 lines (745 loc) · 31.6 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
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/framework/tensor.proto
// </auto-generated>
#pragma warning disable
1591
,
0612
,
3021
#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/framework/tensor.proto</summary>
public
static
partial
class
TensorReflection
{
#region Descriptor
/// <summary>File descriptor for tensorflow/core/framework/tensor.proto</summary>
public
static
pbr
::
FileDescriptor
Descriptor
{
get
{
return
descriptor
;
}
}
private
static
pbr
::
FileDescriptor
descriptor
;
static
TensorReflection
(
)
{
byte
[
]
descriptorData
=
global
::
System
.
Convert
.
FromBase64String
(
string
.
Concat
(
"CiZ0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3RlbnNvci5wcm90bxIKdGVu"
,
"c29yZmxvdxovdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay9yZXNvdXJjZV9o"
,
"YW5kbGUucHJvdG8aLHRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvdGVuc29y"
,
"X3NoYXBlLnByb3RvGiV0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3R5cGVz"
,
"LnByb3RvIowECgtUZW5zb3JQcm90bxIjCgVkdHlwZRgBIAEoDjIULnRlbnNv"
,
"cmZsb3cuRGF0YVR5cGUSMgoMdGVuc29yX3NoYXBlGAIgASgLMhwudGVuc29y"
,
"Zmxvdy5UZW5zb3JTaGFwZVByb3RvEhYKDnZlcnNpb25fbnVtYmVyGAMgASgF"
,
"EhYKDnRlbnNvcl9jb250ZW50GAQgASgMEhQKCGhhbGZfdmFsGA0gAygFQgIQ"
,
"ARIVCglmbG9hdF92YWwYBSADKAJCAhABEhYKCmRvdWJsZV92YWwYBiADKAFC"
,
"AhABEhMKB2ludF92YWwYByADKAVCAhABEhIKCnN0cmluZ192YWwYCCADKAwS"
,
"GAoMc2NvbXBsZXhfdmFsGAkgAygCQgIQARIVCglpbnQ2NF92YWwYCiADKANC"
,
"AhABEhQKCGJvb2xfdmFsGAsgAygIQgIQARIYCgxkY29tcGxleF92YWwYDCAD"
,
"KAFCAhABEjwKE3Jlc291cmNlX2hhbmRsZV92YWwYDiADKAsyHy50ZW5zb3Jm"
,
"bG93LlJlc291cmNlSGFuZGxlUHJvdG8SNwoLdmFyaWFudF92YWwYDyADKAsy"
,
"Ii50ZW5zb3JmbG93LlZhcmlhbnRUZW5zb3JEYXRhUHJvdG8SFgoKdWludDMy"
,
"X3ZhbBgQIAMoDUICEAESFgoKdWludDY0X3ZhbBgRIAMoBEICEAEiZwoWVmFy"
,
"aWFudFRlbnNvckRhdGFQcm90bxIRCgl0eXBlX25hbWUYASABKAkSEAoIbWV0"
,
"YWRhdGEYAiABKAwSKAoHdGVuc29ycxgDIAMoCzIXLnRlbnNvcmZsb3cuVGVu"
,
"c29yUHJvdG9CfAoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3JrQgxUZW5zb3JQ"
,
"cm90b3NQAVpNZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVu"
,
"c29yZmxvdy9nby9jb3JlL2ZyYW1ld29yay90ZW5zb3JfZ29fcHJvdG/4AQFi"
,
"BnByb3RvMw=="
)
)
;
descriptor
=
pbr
::
FileDescriptor
.
FromGeneratedCode
(
descriptorData
,
new
pbr
::
FileDescriptor
[
]
{
global
::
Tensorflow
.
ResourceHandleReflection
.
Descriptor
,
global
::
Tensorflow
.
TensorShapeReflection
.
Descriptor
,
global
::
Tensorflow
.
TypesReflection
.
Descriptor
,
}
,
new
pbr
::
GeneratedClrTypeInfo
(
null
,
null
,
new
pbr
::
GeneratedClrTypeInfo
[
]
{
new
pbr
::
GeneratedClrTypeInfo
(
typeof
(
global
::
Tensorflow
.
TensorProto
)
,
global
::
Tensorflow
.
TensorProto
.
Parser
,
new
[
]
{
"Dtype"
,
"TensorShape"
,
"VersionNumber"
,
"TensorContent"
,
"HalfVal"
,
"FloatVal"
,
"DoubleVal"
,
"IntVal"
,
"StringVal"
,
"ScomplexVal"
,
"Int64Val"
,
"BoolVal"
,
"DcomplexVal"
,
"ResourceHandleVal"
,
"VariantVal"
,
"Uint32Val"
,
"Uint64Val"
}
,
null
,
null
,
null
,
null
)
,
new
pbr
::
GeneratedClrTypeInfo
(
typeof
(
global
::
Tensorflow
.
VariantTensorDataProto
)
,
global
::
Tensorflow
.
VariantTensorDataProto
.
Parser
,
new
[
]
{
"TypeName"
,
"Metadata"
,
"Tensors"
}
,
null
,
null
,
null
,
null
)
}
)
)
;
}
#endregion
}
#region Messages
/// <summary>
/// Protocol buffer representing a tensor.
/// </summary>
public
sealed
partial
class
TensorProto
:
pb
::
IMessage
<
TensorProto
>
{
private
static
readonly
pb
::
MessageParser
<
TensorProto
>
_parser
=
new
pb
::
MessageParser
<
TensorProto
>
(
(
)
=>
new
TensorProto
(
)
)
;
private
pb
::
UnknownFieldSet
_unknownFields
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
static
pb
::
MessageParser
<
TensorProto
>
Parser
{
get
{
return
_parser
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Tensorflow
.
TensorReflection
.
Descriptor
.
MessageTypes
[
0
]
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
pbr
::
MessageDescriptor
pb
::
IMessage
.
Descriptor
{
get
{
return
Descriptor
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
TensorProto
(
)
{
OnConstruction
(
)
;
}
partial
void
OnConstruction
(
)
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
TensorProto
(
TensorProto
other
)
:
this
(
)
{
dtype_
=
other
.
dtype_
;
tensorShape_
=
other
.
tensorShape_
!=
null
?
other
.
tensorShape_
.
Clone
(
)
:
null
;
versionNumber_
=
other
.
versionNumber_
;
tensorContent_
=
other
.
tensorContent_
;
halfVal_
=
other
.
halfVal_
.
Clone
(
)
;
floatVal_
=
other
.
floatVal_
.
Clone
(
)
;
doubleVal_
=
other
.
doubleVal_
.
Clone
(
)
;
intVal_
=
other
.
intVal_
.
Clone
(
)
;
stringVal_
=
other
.
stringVal_
.
Clone
(
)
;
scomplexVal_
=
other
.
scomplexVal_
.
Clone
(
)
;
int64Val_
=
other
.
int64Val_
.
Clone
(
)
;
boolVal_
=
other
.
boolVal_
.
Clone
(
)
;
dcomplexVal_
=
other
.
dcomplexVal_
.
Clone
(
)
;
resourceHandleVal_
=
other
.
resourceHandleVal_
.
Clone
(
)
;
variantVal_
=
other
.
variantVal_
.
Clone
(
)
;
uint32Val_
=
other
.
uint32Val_
.
Clone
(
)
;
uint64Val_
=
other
.
uint64Val_
.
Clone
(
)
;
_unknownFields
=
pb
::
UnknownFieldSet
.
Clone
(
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
TensorProto
Clone
(
)
{
return
new
TensorProto
(
this
)
;
}
/// <summary>Field number for the "dtype" field.</summary>
public
const
int
DtypeFieldNumber
=
1
;
private
global
::
Tensorflow
.
DataType
dtype_
=
global
::
Tensorflow
.
DataType
.
DtInvalid
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
global
::
Tensorflow
.
DataType
Dtype
{
get
{
return
dtype_
;
}
set
{
dtype_
=
value
;
}
}
/// <summary>Field number for the "tensor_shape" field.</summary>
public
const
int
TensorShapeFieldNumber
=
2
;
private
global
::
Tensorflow
.
TensorShapeProto
tensorShape_
;
/// <summary>
/// Shape of the tensor. TODO(touts): sort out the 0-rank issues.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
global
::
Tensorflow
.
TensorShapeProto
TensorShape
{
get
{
return
tensorShape_
;
}
set
{
tensorShape_
=
value
;
}
}
/// <summary>Field number for the "version_number" field.</summary>
public
const
int
VersionNumberFieldNumber
=
3
;
private
int
versionNumber_
;
/// <summary>
/// Version number.
///
/// In version 0, if the "repeated xxx" representations contain only one
/// element, that element is repeated to fill the shape. This makes it easy
/// to represent a constant Tensor with a single value.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
int
VersionNumber
{
get
{
return
versionNumber_
;
}
set
{
versionNumber_
=
value
;
}
}
/// <summary>Field number for the "tensor_content" field.</summary>
public
const
int
TensorContentFieldNumber
=
4
;
private
pb
::
ByteString
tensorContent_
=
pb
::
ByteString
.
Empty
;
/// <summary>
/// Serialized raw tensor content from either Tensor::AsProtoTensorContent or
/// memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
/// can be used for all tensor types. The purpose of this representation is to
/// reduce serialization overhead during RPC call by avoiding serialization of
/// many repeated small items.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pb
::
ByteString
TensorContent
{
get
{
return
tensorContent_
;
}
set
{
tensorContent_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "half_val" field.</summary>
public
const
int
HalfValFieldNumber
=
13
;
private
static
readonly
pb
::
FieldCodec
<
int
>
_repeated_halfVal_codec
=
pb
::
FieldCodec
.
ForInt32
(
106
)
;
private
readonly
pbc
::
RepeatedField
<
int
>
halfVal_
=
new
pbc
::
RepeatedField
<
int
>
(
)
;
/// <summary>
/// DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll
/// have some pointless zero padding for each value here.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
int
>
HalfVal
{
get
{
return
halfVal_
;
}
}
/// <summary>Field number for the "float_val" field.</summary>
public
const
int
FloatValFieldNumber
=
5
;
private
static
readonly
pb
::
FieldCodec
<
float
>
_repeated_floatVal_codec
=
pb
::
FieldCodec
.
ForFloat
(
42
)
;
private
readonly
pbc
::
RepeatedField
<
float
>
floatVal_
=
new
pbc
::
RepeatedField
<
float
>
(
)
;
/// <summary>
/// DT_FLOAT.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
float
>
FloatVal
{
get
{
return
floatVal_
;
}
}
/// <summary>Field number for the "double_val" field.</summary>
public
const
int
DoubleValFieldNumber
=
6
;
private
static
readonly
pb
::
FieldCodec
<
double
>
_repeated_doubleVal_codec
=
pb
::
FieldCodec
.
ForDouble
(
50
)
;
private
readonly
pbc
::
RepeatedField
<
double
>
doubleVal_
=
new
pbc
::
RepeatedField
<
double
>
(
)
;
/// <summary>
/// DT_DOUBLE.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
double
>
DoubleVal
{
get
{
return
doubleVal_
;
}
}
/// <summary>Field number for the "int_val" field.</summary>
public
const
int
IntValFieldNumber
=
7
;
private
static
readonly
pb
::
FieldCodec
<
int
>
_repeated_intVal_codec
=
pb
::
FieldCodec
.
ForInt32
(
58
)
;
private
readonly
pbc
::
RepeatedField
<
int
>
intVal_
=
new
pbc
::
RepeatedField
<
int
>
(
)
;
/// <summary>
/// DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
int
>
IntVal
{
get
{
return
intVal_
;
}
}
/// <summary>Field number for the "string_val" field.</summary>
public
const
int
StringValFieldNumber
=
8
;
private
static
readonly
pb
::
FieldCodec
<
pb
::
ByteString
>
_repeated_stringVal_codec
=
pb
::
FieldCodec
.
ForBytes
(
66
)
;
private
readonly
pbc
::
RepeatedField
<
pb
::
ByteString
>
stringVal_
=
new
pbc
::
RepeatedField
<
pb
::
ByteString
>
(
)
;
/// <summary>
/// DT_STRING
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
pb
::
ByteString
>
StringVal
{
get
{
return
stringVal_
;
}
}
/// <summary>Field number for the "scomplex_val" field.</summary>
public
const
int
ScomplexValFieldNumber
=
9
;
private
static
readonly
pb
::
FieldCodec
<
float
>
_repeated_scomplexVal_codec
=
pb
::
FieldCodec
.
ForFloat
(
74
)
;
private
readonly
pbc
::
RepeatedField
<
float
>
scomplexVal_
=
new
pbc
::
RepeatedField
<
float
>
(
)
;
/// <summary>
/// DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
/// and imaginary parts of i-th single precision complex.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
float
>
ScomplexVal
{
get
{
return
scomplexVal_
;
}
}
/// <summary>Field number for the "int64_val" field.</summary>
public
const
int
Int64ValFieldNumber
=
10
;
private
static
readonly
pb
::
FieldCodec
<
long
>
_repeated_int64Val_codec
=
pb
::
FieldCodec
.
ForInt64
(
82
)
;
private
readonly
pbc
::
RepeatedField
<
long
>
int64Val_
=
new
pbc
::
RepeatedField
<
long
>
(
)
;
/// <summary>
/// DT_INT64
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
long
>
Int64Val
{
get
{
return
int64Val_
;
}
}
/// <summary>Field number for the "bool_val" field.</summary>
public
const
int
BoolValFieldNumber
=
11
;
private
static
readonly
pb
::
FieldCodec
<
bool
>
_repeated_boolVal_codec
=
pb
::
FieldCodec
.
ForBool
(
90
)
;
private
readonly
pbc
::
RepeatedField
<
bool
>
boolVal_
=
new
pbc
::
RepeatedField
<
bool
>
(
)
;
/// <summary>
/// DT_BOOL
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
bool
>
BoolVal
{
get
{
return
boolVal_
;
}
}
/// <summary>Field number for the "dcomplex_val" field.</summary>
public
const
int
DcomplexValFieldNumber
=
12
;
private
static
readonly
pb
::
FieldCodec
<
double
>
_repeated_dcomplexVal_codec
=
pb
::
FieldCodec
.
ForDouble
(
98
)
;
private
readonly
pbc
::
RepeatedField
<
double
>
dcomplexVal_
=
new
pbc
::
RepeatedField
<
double
>
(
)
;
/// <summary>
/// DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
/// and imaginary parts of i-th double precision complex.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
double
>
DcomplexVal
{
get
{
return
dcomplexVal_
;
}
}
/// <summary>Field number for the "resource_handle_val" field.</summary>
public
const
int
ResourceHandleValFieldNumber
=
14
;
private
static
readonly
pb
::
FieldCodec
<
global
::
Tensorflow
.
ResourceHandleProto
>
_repeated_resourceHandleVal_codec
=
pb
::
FieldCodec
.
ForMessage
(
114
,
global
::
Tensorflow
.
ResourceHandleProto
.
Parser
)
;
private
readonly
pbc
::
RepeatedField
<
global
::
Tensorflow
.
ResourceHandleProto
>
resourceHandleVal_
=
new
pbc
::
RepeatedField
<
global
::
Tensorflow
.
ResourceHandleProto
>
(
)
;
/// <summary>
/// DT_RESOURCE
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
global
::
Tensorflow
.
ResourceHandleProto
>
ResourceHandleVal
{
get
{
return
resourceHandleVal_
;
}
}
/// <summary>Field number for the "variant_val" field.</summary>
public
const
int
VariantValFieldNumber
=
15
;
private
static
readonly
pb
::
FieldCodec
<
global
::
Tensorflow
.
VariantTensorDataProto
>
_repeated_variantVal_codec
=
pb
::
FieldCodec
.
ForMessage
(
122
,
global
::
Tensorflow
.
VariantTensorDataProto
.
Parser
)
;
private
readonly
pbc
::
RepeatedField
<
global
::
Tensorflow
.
VariantTensorDataProto
>
variantVal_
=
new
pbc
::
RepeatedField
<
global
::
Tensorflow
.
VariantTensorDataProto
>
(
)
;
/// <summary>
/// DT_VARIANT
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
global
::
Tensorflow
.
VariantTensorDataProto
>
VariantVal
{
get
{
return
variantVal_
;
}
}
/// <summary>Field number for the "uint32_val" field.</summary>
public
const
int
Uint32ValFieldNumber
=
16
;
private
static
readonly
pb
::
FieldCodec
<
uint
>
_repeated_uint32Val_codec
=
pb
::
FieldCodec
.
ForUInt32
(
130
)
;
private
readonly
pbc
::
RepeatedField
<
uint
>
uint32Val_
=
new
pbc
::
RepeatedField
<
uint
>
(
)
;
/// <summary>
/// DT_UINT32
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
uint
>
Uint32Val
{
get
{
return
uint32Val_
;
}
}
/// <summary>Field number for the "uint64_val" field.</summary>
public
const
int
Uint64ValFieldNumber
=
17
;
private
static
readonly
pb
::
FieldCodec
<
ulong
>
_repeated_uint64Val_codec
=
pb
::
FieldCodec
.
ForUInt64
(
138
)
;
private
readonly
pbc
::
RepeatedField
<
ulong
>
uint64Val_
=
new
pbc
::
RepeatedField
<
ulong
>
(
)
;
/// <summary>
/// DT_UINT64
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
ulong
>
Uint64Val
{
get
{
return
uint64Val_
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
bool
Equals
(
object
other
)
{
return
Equals
(
other
as
TensorProto
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
bool
Equals
(
TensorProto
other
)
{
if
(
ReferenceEquals
(
other
,
null
)
)
{
return
false
;
}
if
(
ReferenceEquals
(
other
,
this
)
)
{
return
true
;
}
if
(
Dtype
!=
other
.
Dtype
)
return
false
;
if
(
!
object
.
Equals
(
TensorShape
,
other
.
TensorShape
)
)
return
false
;
if
(
VersionNumber
!=
other
.
VersionNumber
)
return
false
;
if
(
TensorContent
!=
other
.
TensorContent
)
return
false
;
if
(
!
halfVal_
.
Equals
(
other
.
halfVal_
)
)
return
false
;
if
(
!
floatVal_
.
Equals
(
other
.
floatVal_
)
)
return
false
;
if
(
!
doubleVal_
.
Equals
(
other
.
doubleVal_
)
)
return
false
;
if
(
!
intVal_
.
Equals
(
other
.
intVal_
)
)
return
false
;
if
(
!
stringVal_
.
Equals
(
other
.
stringVal_
)
)
return
false
;
if
(
!
scomplexVal_
.
Equals
(
other
.
scomplexVal_
)
)
return
false
;
if
(
!
int64Val_
.
Equals
(
other
.
int64Val_
)
)
return
false
;
if
(
!
boolVal_
.
Equals
(
other
.
boolVal_
)
)
return
false
;
if
(
!
dcomplexVal_
.
Equals
(
other
.
dcomplexVal_
)
)
return
false
;
if
(
!
resourceHandleVal_
.
Equals
(
other
.
resourceHandleVal_
)
)
return
false
;
if
(
!
variantVal_
.
Equals
(
other
.
variantVal_
)
)
return
false
;
if
(
!
uint32Val_
.
Equals
(
other
.
uint32Val_
)
)
return
false
;
if
(
!
uint64Val_
.
Equals
(
other
.
uint64Val_
)
)
return
false
;
return
Equals
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
int
GetHashCode
(
)
{
int
hash
=
1
;
if
(
Dtype
!=
global
::
Tensorflow
.
DataType
.
DtInvalid
)
hash
^=
Dtype
.
GetHashCode
(
)
;
if
(
tensorShape_
!=
null
)
hash
^=
TensorShape
.
GetHashCode
(
)
;
if
(
VersionNumber
!=
0
)
hash
^=
VersionNumber
.
GetHashCode
(
)
;
if
(
TensorContent
.
Length
!=
0
)
hash
^=
TensorContent
.
GetHashCode
(
)
;
hash
^=
halfVal_
.
GetHashCode
(
)
;
hash
^=
floatVal_
.
GetHashCode
(
)
;
hash
^=
doubleVal_
.
GetHashCode
(
)
;
hash
^=
intVal_
.
GetHashCode
(
)
;
hash
^=
stringVal_
.
GetHashCode
(
)
;
hash
^=
scomplexVal_
.
GetHashCode
(
)
;
hash
^=
int64Val_
.
GetHashCode
(
)
;
hash
^=
boolVal_
.
GetHashCode
(
)
;
hash
^=
dcomplexVal_
.
GetHashCode
(
)
;
hash
^=
resourceHandleVal_
.
GetHashCode
(
)
;
hash
^=
variantVal_
.
GetHashCode
(
)
;
hash
^=
uint32Val_
.
GetHashCode
(
)
;
hash
^=
uint64Val_
.
GetHashCode
(
)
;
if
(
_unknownFields
!=
null
)
{
hash
^=
_unknownFields
.
GetHashCode
(
)
;
}
return
hash
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
string
ToString
(
)
{
return
pb
::
JsonFormatter
.
ToDiagnosticString
(
this
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
if
(
Dtype
!=
global
::
Tensorflow
.
DataType
.
DtInvalid
)
{
output
.
WriteRawTag
(
8
)
;
output
.
WriteEnum
(
(
int
)
Dtype
)
;
}
if
(
tensorShape_
!=
null
)
{
output
.
WriteRawTag
(
18
)
;
output
.
WriteMessage
(
TensorShape
)
;
}
if
(
VersionNumber
!=
0
)
{
output
.
WriteRawTag
(
24
)
;
output
.
WriteInt32
(
VersionNumber
)
;
}
if
(
TensorContent
.
Length
!=
0
)
{
output
.
WriteRawTag
(
34
)
;
output
.
WriteBytes
(
TensorContent
)
;
}
floatVal_
.
WriteTo
(
output
,
_repeated_floatVal_codec
)
;
doubleVal_
.
WriteTo
(
output
,
_repeated_doubleVal_codec
)
;
intVal_
.
WriteTo
(
output
,
_repeated_intVal_codec
)
;
stringVal_
.
WriteTo
(
output
,
_repeated_stringVal_codec
)
;
scomplexVal_
.
WriteTo
(
output
,
_repeated_scomplexVal_codec
)
;
int64Val_
.
WriteTo
(
output
,
_repeated_int64Val_codec
)
;
boolVal_
.
WriteTo
(
output
,
_repeated_boolVal_codec
)
;
dcomplexVal_
.
WriteTo
(
output
,
_repeated_dcomplexVal_codec
)
;
halfVal_
.
WriteTo
(
output
,
_repeated_halfVal_codec
)
;
resourceHandleVal_
.
WriteTo
(
output
,
_repeated_resourceHandleVal_codec
)
;
variantVal_
.
WriteTo
(
output
,
_repeated_variantVal_codec
)
;
uint32Val_
.
WriteTo
(
output
,
_repeated_uint32Val_codec
)
;
uint64Val_
.
WriteTo
(
output
,
_repeated_uint64Val_codec
)
;
if
(
_unknownFields
!=
null
)
{
_unknownFields
.
WriteTo
(
output
)
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
int
CalculateSize
(
)
{
int
size
=
0
;
if
(
Dtype
!=
global
::
Tensorflow
.
DataType
.
DtInvalid
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeEnumSize
(
(
int
)
Dtype
)
;
}
if
(
tensorShape_
!=
null
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeMessageSize
(
TensorShape
)
;
}
if
(
VersionNumber
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeInt32Size
(
VersionNumber
)
;
}
if
(
TensorContent
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeBytesSize
(
TensorContent
)
;
}
size
+=
halfVal_
.
CalculateSize
(
_repeated_halfVal_codec
)
;
size
+=
floatVal_
.
CalculateSize
(
_repeated_floatVal_codec
)
;
size
+=
doubleVal_
.
CalculateSize
(
_repeated_doubleVal_codec
)
;
size
+=
intVal_
.
CalculateSize
(
_repeated_intVal_codec
)
;
size
+=
stringVal_
.
CalculateSize
(
_repeated_stringVal_codec
)
;
size
+=
scomplexVal_
.
CalculateSize
(
_repeated_scomplexVal_codec
)
;
size
+=
int64Val_
.
CalculateSize
(
_repeated_int64Val_codec
)
;
size
+=
boolVal_
.
CalculateSize
(
_repeated_boolVal_codec
)
;
size
+=
dcomplexVal_
.
CalculateSize
(
_repeated_dcomplexVal_codec
)
;
size
+=
resourceHandleVal_
.
CalculateSize
(
_repeated_resourceHandleVal_codec
)
;
size
+=
variantVal_
.
CalculateSize
(
_repeated_variantVal_codec
)
;
size
+=
uint32Val_
.
CalculateSize
(
_repeated_uint32Val_codec
)
;
size
+=
uint64Val_
.
CalculateSize
(
_repeated_uint64Val_codec
)
;
if
(
_unknownFields
!=
null
)
{
size
+=
_unknownFields
.
CalculateSize
(
)
;
}
return
size
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
MergeFrom
(
TensorProto
other
)
{
if
(
other
==
null
)
{
return
;
}
if
(
other
.
Dtype
!=
global
::
Tensorflow
.
DataType
.
DtInvalid
)
{
Dtype
=
other
.
Dtype
;
}
if
(
other
.
tensorShape_
!=
null
)
{
if
(
tensorShape_
==
null
)
{
TensorShape
=
new
global
::
Tensorflow
.
TensorShapeProto
(
)
;
}
TensorShape
.
MergeFrom
(
other
.
TensorShape
)
;
}
if
(
other
.
VersionNumber
!=
0
)
{
VersionNumber
=
other
.
VersionNumber
;
}
if
(
other
.
TensorContent
.
Length
!=
0
)
{
TensorContent
=
other
.
TensorContent
;
}
halfVal_
.
Add
(
other
.
halfVal_
)
;
floatVal_
.
Add
(
other
.
floatVal_
)
;
doubleVal_
.
Add
(
other
.
doubleVal_
)
;
intVal_
.
Add
(
other
.
intVal_
)
;
stringVal_
.
Add
(
other
.
stringVal_
)
;
scomplexVal_
.
Add
(
other
.
scomplexVal_
)
;
int64Val_
.
Add
(
other
.
int64Val_
)
;
boolVal_
.
Add
(
other
.
boolVal_
)
;
dcomplexVal_
.
Add
(
other
.
dcomplexVal_
)
;
resourceHandleVal_
.
Add
(
other
.
resourceHandleVal_
)
;
variantVal_
.
Add
(
other
.
variantVal_
)
;
uint32Val_
.
Add
(
other
.
uint32Val_
)
;
uint64Val_
.
Add
(
other
.
uint64Val_
)
;
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFrom
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
MergeFrom
(
pb
::
CodedInputStream
input
)
{
uint
tag
;
while
(
(
tag
=
input
.
ReadTag
(
)
)
!=
0
)
{
switch
(
tag
)
{
default
:
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFieldFrom
(
_unknownFields
,
input
)
;
break
;
case
8
:
{
Dtype
=
(
global
::
Tensorflow
.
DataType
)
input
.
ReadEnum
(
)
;
break
;
}
case
18
:
{
if
(
tensorShape_
==
null
)
{
TensorShape
=
new
global
::
Tensorflow
.
TensorShapeProto
(
)
;
}
input
.
ReadMessage
(
TensorShape
)
;
break
;
}
case
24
:
{
VersionNumber
=
input
.
ReadInt32
(
)
;
break
;
}
case
34
:
{
TensorContent
=
input
.
ReadBytes
(
)
;
break
;
}
case
42
:
case
45
:
{
floatVal_
.
AddEntriesFrom
(
input
,
_repeated_floatVal_codec
)
;
break
;
}
case
50
:
case
49
:
{
doubleVal_
.
AddEntriesFrom
(
input
,
_repeated_doubleVal_codec
)
;
break
;
}
case
58
:
case
56
:
{
intVal_
.
AddEntriesFrom
(
input
,
_repeated_intVal_codec
)
;
break
;
}
case
66
:
{
stringVal_
.
AddEntriesFrom
(
input
,
_repeated_stringVal_codec
)
;
break
;
}
case
74
:
case
77
:
{
scomplexVal_
.
AddEntriesFrom
(
input
,
_repeated_scomplexVal_codec
)
;
break
;
}
case
82
:
case
80
:
{
int64Val_
.
AddEntriesFrom
(
input
,
_repeated_int64Val_codec
)
;
break
;
}
case
90
:
case
88
:
{
boolVal_
.
AddEntriesFrom
(
input
,
_repeated_boolVal_codec
)
;
break
;
}
case
98
:
case
97
:
{
dcomplexVal_
.
AddEntriesFrom
(
input
,
_repeated_dcomplexVal_codec
)
;
break
;
}
case
106
:
case
104
:
{
halfVal_
.
AddEntriesFrom
(
input
,
_repeated_halfVal_codec
)
;
break
;
}
case
114
:
{
resourceHandleVal_
.
AddEntriesFrom
(
input
,
_repeated_resourceHandleVal_codec
)
;
break
;
}
case
122
:
{
variantVal_
.
AddEntriesFrom
(
input
,
_repeated_variantVal_codec
)
;
break
;
}
case
130
:
case
128
:
{
uint32Val_
.
AddEntriesFrom
(
input
,
_repeated_uint32Val_codec
)
;
break
;
}
case
138
:
case
136
:
{
uint64Val_
.
AddEntriesFrom
(
input
,
_repeated_uint64Val_codec
)
;
break
;
}
}
}
}
}
/// <summary>
/// Protocol buffer representing the serialization format of DT_VARIANT tensors.
/// </summary>
public
sealed
partial
class
VariantTensorDataProto
:
pb
::
IMessage
<
VariantTensorDataProto
>
{
private
static
readonly
pb
::
MessageParser
<
VariantTensorDataProto
>
_parser
=
new
pb
::
MessageParser
<
VariantTensorDataProto
>
(
(
)
=>
new
VariantTensorDataProto
(
)
)
;
private
pb
::
UnknownFieldSet
_unknownFields
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
static
pb
::
MessageParser
<
VariantTensorDataProto
>
Parser
{
get
{
return
_parser
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
static
pbr
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Tensorflow
.
TensorReflection
.
Descriptor
.
MessageTypes
[
1
]
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
pbr
::
MessageDescriptor
pb
::
IMessage
.
Descriptor
{
get
{
return
Descriptor
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
VariantTensorDataProto
(
)
{
OnConstruction
(
)
;
}
partial
void
OnConstruction
(
)
;
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
VariantTensorDataProto
(
VariantTensorDataProto
other
)
:
this
(
)
{
typeName_
=
other
.
typeName_
;
metadata_
=
other
.
metadata_
;
tensors_
=
other
.
tensors_
.
Clone
(
)
;
_unknownFields
=
pb
::
UnknownFieldSet
.
Clone
(
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
VariantTensorDataProto
Clone
(
)
{
return
new
VariantTensorDataProto
(
this
)
;
}
/// <summary>Field number for the "type_name" field.</summary>
public
const
int
TypeNameFieldNumber
=
1
;
private
string
typeName_
=
""
;
/// <summary>
/// Name of the type of objects being serialized.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
string
TypeName
{
get
{
return
typeName_
;
}
set
{
typeName_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "metadata" field.</summary>
public
const
int
MetadataFieldNumber
=
2
;
private
pb
::
ByteString
metadata_
=
pb
::
ByteString
.
Empty
;
/// <summary>
/// Portions of the object that are not Tensors.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pb
::
ByteString
Metadata
{
get
{
return
metadata_
;
}
set
{
metadata_
=
pb
::
ProtoPreconditions
.
CheckNotNull
(
value
,
"value"
)
;
}
}
/// <summary>Field number for the "tensors" field.</summary>
public
const
int
TensorsFieldNumber
=
3
;
private
static
readonly
pb
::
FieldCodec
<
global
::
Tensorflow
.
TensorProto
>
_repeated_tensors_codec
=
pb
::
FieldCodec
.
ForMessage
(
26
,
global
::
Tensorflow
.
TensorProto
.
Parser
)
;
private
readonly
pbc
::
RepeatedField
<
global
::
Tensorflow
.
TensorProto
>
tensors_
=
new
pbc
::
RepeatedField
<
global
::
Tensorflow
.
TensorProto
>
(
)
;
/// <summary>
/// Tensors contained within objects being serialized.
/// </summary>
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
pbc
::
RepeatedField
<
global
::
Tensorflow
.
TensorProto
>
Tensors
{
get
{
return
tensors_
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
bool
Equals
(
object
other
)
{
return
Equals
(
other
as
VariantTensorDataProto
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
bool
Equals
(
VariantTensorDataProto
other
)
{
if
(
ReferenceEquals
(
other
,
null
)
)
{
return
false
;
}
if
(
ReferenceEquals
(
other
,
this
)
)
{
return
true
;
}
if
(
TypeName
!=
other
.
TypeName
)
return
false
;
if
(
Metadata
!=
other
.
Metadata
)
return
false
;
if
(
!
tensors_
.
Equals
(
other
.
tensors_
)
)
return
false
;
return
Equals
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
int
GetHashCode
(
)
{
int
hash
=
1
;
if
(
TypeName
.
Length
!=
0
)
hash
^=
TypeName
.
GetHashCode
(
)
;
if
(
Metadata
.
Length
!=
0
)
hash
^=
Metadata
.
GetHashCode
(
)
;
hash
^=
tensors_
.
GetHashCode
(
)
;
if
(
_unknownFields
!=
null
)
{
hash
^=
_unknownFields
.
GetHashCode
(
)
;
}
return
hash
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
override
string
ToString
(
)
{
return
pb
::
JsonFormatter
.
ToDiagnosticString
(
this
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
if
(
TypeName
.
Length
!=
0
)
{
output
.
WriteRawTag
(
10
)
;
output
.
WriteString
(
TypeName
)
;
}
if
(
Metadata
.
Length
!=
0
)
{
output
.
WriteRawTag
(
18
)
;
output
.
WriteBytes
(
Metadata
)
;
}
tensors_
.
WriteTo
(
output
,
_repeated_tensors_codec
)
;
if
(
_unknownFields
!=
null
)
{
_unknownFields
.
WriteTo
(
output
)
;
}
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
int
CalculateSize
(
)
{
int
size
=
0
;
if
(
TypeName
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeStringSize
(
TypeName
)
;
}
if
(
Metadata
.
Length
!=
0
)
{
size
+=
1
+
pb
::
CodedOutputStream
.
ComputeBytesSize
(
Metadata
)
;
}
size
+=
tensors_
.
CalculateSize
(
_repeated_tensors_codec
)
;
if
(
_unknownFields
!=
null
)
{
size
+=
_unknownFields
.
CalculateSize
(
)
;
}
return
size
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
MergeFrom
(
VariantTensorDataProto
other
)
{
if
(
other
==
null
)
{
return
;
}
if
(
other
.
TypeName
.
Length
!=
0
)
{
TypeName
=
other
.
TypeName
;
}
if
(
other
.
Metadata
.
Length
!=
0
)
{
Metadata
=
other
.
Metadata
;
}
tensors_
.
Add
(
other
.
tensors_
)
;
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFrom
(
_unknownFields
,
other
.
_unknownFields
)
;
}
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
]
public
void
MergeFrom
(
pb
::
CodedInputStream
input
)
{
uint
tag
;
while
(
(
tag
=
input
.
ReadTag
(
)
)
!=
0
)
{
switch
(
tag
)
{
default
:
_unknownFields
=
pb
::
UnknownFieldSet
.
MergeFieldFrom
(
_unknownFields
,
input
)
;
break
;
case
10
:
{
TypeName
=
input
.
ReadString
(
)
;
break
;
}
case
18
:
{
Metadata
=
input
.
ReadBytes
(
)
;
break
;
}
case
26
:
{
tensors_
.
AddEntriesFrom
(
input
,
_repeated_tensors_codec
)
;
break
;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
Back
|
FazBrowse Home
|
New Git URL