From a7704b69f410b972a2dafd832efb018a029bc10c Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Tue, 5 Sep 2017 09:46:57 -0700 Subject: [PATCH] move DataType outof LoDTensorDesc --- doc/design/var_desc.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/design/var_desc.md b/doc/design/var_desc.md index 668f0679840..86a95c10d57 100644 --- a/doc/design/var_desc.md +++ b/doc/design/var_desc.md @@ -21,27 +21,27 @@ A VarDesc should have a name and value, in PaddlePaddle, the value will always b ```proto message VarDesc { required string name = 1; - optional LoDTesnorDesc lod_tensor = 2; // + optional LoDTensorDesc lod_tensor = 2; } ``` ## Definition of LodTensorDesc ```proto +enum DataType { + BOOL = 0; + INT16 = 1; + INT32 = 2; + INT64 = 3; + FP16 = 4; + FP32 = 5; + FP64 = 6; +} + message LoDTensorDesc { - enum Type { - BOOL = 0; - INT16 = 1; - INT32 = 2; - INT64 = 3; - FP16 = 4; - FP32 = 5; - FP64 = 6; - } - - Type data_type = 1; - repeated int dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] - optional int lod_level [default=0] = 3; + required DataType data_type = 1; + repeated int32 dims = 2; // [UNK, 640, 480] is saved as [-1, 640, 480] + optional int32 lod_level = 3 [default=0]; } ``` -- GitLab