提交 a7704b69 编写于 作者: Q qiaolongfei

move DataType outof LoDTensorDesc

上级 9b36536a
...@@ -21,15 +21,14 @@ A VarDesc should have a name and value, in PaddlePaddle, the value will always b ...@@ -21,15 +21,14 @@ A VarDesc should have a name and value, in PaddlePaddle, the value will always b
```proto ```proto
message VarDesc { message VarDesc {
required string name = 1; required string name = 1;
optional LoDTesnorDesc lod_tensor = 2; // optional LoDTensorDesc lod_tensor = 2;
} }
``` ```
## Definition of LodTensorDesc ## Definition of LodTensorDesc
```proto ```proto
message LoDTensorDesc { enum DataType {
enum Type {
BOOL = 0; BOOL = 0;
INT16 = 1; INT16 = 1;
INT32 = 2; INT32 = 2;
...@@ -37,11 +36,12 @@ message LoDTensorDesc { ...@@ -37,11 +36,12 @@ message LoDTensorDesc {
FP16 = 4; FP16 = 4;
FP32 = 5; FP32 = 5;
FP64 = 6; FP64 = 6;
} }
Type data_type = 1; message LoDTensorDesc {
repeated int dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] required DataType data_type = 1;
optional int lod_level [default=0] = 3; repeated int32 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480]
optional int32 lod_level = 3 [default=0];
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册