diff --git a/paddle/framework/attribute.cc b/paddle/framework/attribute.cc index e705da0131aa48442ddd73a467c31b53d2938fd6..510dc28c57f642786e7c64d86961c76ac80014a8 100644 --- a/paddle/framework/attribute.cc +++ b/paddle/framework/attribute.cc @@ -70,14 +70,6 @@ Attribute GetAttrValue(const OpDesc::Attr& attr_desc) { } return val; } - case framework::AttrType::INT_PAIRS: { - std::vector> val(attr_desc.int_pairs_size()); - for (int i = 0; i < attr_desc.int_pairs_size(); ++i) { - val[i].first = attr_desc.int_pairs(i).first(); - val[i].second = attr_desc.int_pairs(i).second(); - } - return val; - } case framework::AttrType::BLOCK: { return GetProgramDesc().mutable_blocks(attr_desc.block_idx()); } diff --git a/paddle/framework/attribute.h b/paddle/framework/attribute.h index 13f2877226fe876b8448bf4ce7e1dc77149b79c6..488fa38faf12ee51087643f79295f36bfd33ee22 100644 --- a/paddle/framework/attribute.h +++ b/paddle/framework/attribute.h @@ -29,8 +29,7 @@ namespace framework { // The order should be as same as framework.proto typedef boost::variant, - std::vector, std::vector, - std::vector>, bool, + std::vector, std::vector, bool, std::vector, BlockDesc*> Attribute; diff --git a/paddle/framework/framework.proto b/paddle/framework/framework.proto index 6fcfe6de25737b66a2ea6c1a438636f072a513bb..951c7afbc14e2d9119169c1351d38ff0b67bdc5b 100644 --- a/paddle/framework/framework.proto +++ b/paddle/framework/framework.proto @@ -22,17 +22,11 @@ enum AttrType { INTS = 3; FLOATS = 4; STRINGS = 5; - INT_PAIRS = 6; - BOOLEAN = 7; - BOOLEANS = 8; - BLOCK = 9; + BOOLEAN = 6; + BOOLEANS = 7; + BLOCK = 8; } -message IntPair { - required int32 first = 1; - required int32 second = 2; -}; - // OpDesc describes an instance of a C++ framework::OperatorBase // derived class type. message OpDesc { @@ -46,7 +40,6 @@ message OpDesc { repeated int32 ints = 6; repeated float floats = 7; repeated string strings = 8; - repeated IntPair int_pairs = 9; optional bool b = 10; repeated bool bools = 11; optional int32 block_idx = 12;