forked from microsoft/CNTK
/
CNTK.proto
109 lines (90 loc) · 1.92 KB
/
CNTK.proto
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
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
syntax = "proto3";
package CNTK.proto;
option cc_enable_arenas = true;
message NDShape {
repeated uint64 shape_dim = 1 [packed = true];
}
message Axis {
int32 static_axis_idx = 1;
string name = 2;
bool is_ordered_dynamic_axis = 3;
}
message NDArrayView {
enum DataType {
Unknown = 0;
Float = 1;
Double = 2;
Float16 = 4;
Int8 = 5;
Int16 = 6;
}
enum StorageFormat {
Dense = 0;
SparseCSC = 1;
SparseBlockCol = 2;
}
DataType data_type = 1;
StorageFormat storage_format = 2;
NDShape shape = 3;
message FloatValues {
repeated float value = 1 [packed = true];
}
message DoubleValues {
repeated double value = 1 [packed = true];
}
message BytesValue {
bytes value = 1;
}
message IntValues {
repeated sint32 value = 1 [packed = true];
}
oneof values {
FloatValues float_values = 4;
DoubleValues double_values = 5;
BytesValue bytes_value = 6;
IntValues sint32_values = 7;
}
// TODO: bool read_only = 8;
}
message Vector {
repeated DictionaryValue value = 1;
}
message Dictionary {
uint64 version = 1;
map<string, DictionaryValue> data = 2;
}
message DictionaryValue {
uint64 version = 1;
enum Type {
None = 0;
Bool = 1;
Int = 2;
SizeT = 3;
Float = 4;
Double = 5;
String = 6;
NDShape = 7;
Axis = 8;
Vector = 9;
Dictionary = 10;
NDArrayView = 11;
}
Type value_type = 2;
oneof value {
bool bool_value = 3;
int32 int_value = 4;
uint64 size_t_value = 5;
float float_value = 6;
double double_value = 7;
string string_value = 8;
NDShape nd_shape_value = 9;
Axis axis_value = 10;
Vector vector_value = 11;
Dictionary dictionary_value = 12;
NDArrayView nd_array_view_value = 13;
}
}