提交 aa6dc82f 编写于 作者: T tangwei12

revert changes in protobuf.cc and type_defs

上级 b58957d9
...@@ -25,17 +25,17 @@ message Version { optional int64 version = 1 [ default = 0 ]; } ...@@ -25,17 +25,17 @@ message Version { optional int64 version = 1 [ default = 0 ]; }
enum AttrType { enum AttrType {
INT = 0; INT = 0;
LONG = 1; FLOAT = 1;
FLOAT = 2; STRING = 2;
STRING = 3; INTS = 3;
INTS = 4; FLOATS = 4;
LONGS = 5; STRINGS = 5;
FLOATS = 6; BOOLEAN = 6;
STRINGS = 7; BOOLEANS = 7;
BOOLEAN = 8; BLOCK = 8;
BOOLEANS = 9; LONG = 9;
BLOCK = 10; BLOCKS = 10;
BLOCKS = 11; LONGS = 11;
} }
// OpDesc describes an instance of a C++ framework::OperatorBase // OpDesc describes an instance of a C++ framework::OperatorBase
...@@ -46,17 +46,17 @@ message OpDesc { ...@@ -46,17 +46,17 @@ message OpDesc {
required string name = 1; required string name = 1;
required AttrType type = 2; required AttrType type = 2;
optional int32 i = 3; optional int32 i = 3;
optional int64 l = 4; optional float f = 4;
optional float f = 5; optional string s = 5;
optional string s = 6; repeated int32 ints = 6;
repeated int32 ints = 7; repeated float floats = 7;
repeated int64 longs = 8; repeated string strings = 8;
repeated float floats = 9; optional bool b = 10;
repeated string strings = 10; repeated bool bools = 11;
optional bool b = 11; optional int32 block_idx = 12;
repeated bool bools = 12; optional int64 l = 13;
optional int32 block_idx = 13;
repeated int32 blocks_idx = 14; repeated int32 blocks_idx = 14;
optional int64 longs = 15;
}; };
message Var { message Var {
......
...@@ -33,10 +33,10 @@ using VariableNameMap = std::map<std::string, std::vector<std::string>>; ...@@ -33,10 +33,10 @@ using VariableNameMap = std::map<std::string, std::vector<std::string>>;
// The order should be as same as framework.proto // The order should be as same as framework.proto
using Attribute = using Attribute =
boost::variant<boost::blank, int, int64_t, float, std::string, boost::variant<boost::blank, int, float, std::string, std::vector<int>,
std::vector<int>, std::vector<int64_t>, std::vector<float>, std::vector<float>, std::vector<std::string>, bool,
std::vector<std::string>, bool, std::vector<bool>, std::vector<bool>, BlockDesc*, int64_t,
BlockDesc*, std::vector<BlockDesc*>>; std::vector<BlockDesc*>, std::vector<int64_t>>;
using AttributeMap = std::unordered_map<std::string, Attribute>; using AttributeMap = std::unordered_map<std::string, Attribute>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册