diff --git a/src/common/types.cpp b/src/common/types.cpp index b6387503856f438acd74b8d147da13a2b009f2a1..41bbfa5256a1d55ac9c8ebe3ba695c4a6f1be720 100644 --- a/src/common/types.cpp +++ b/src/common/types.cpp @@ -50,6 +50,7 @@ const char *G_OP_TYPE_FUSION_ELEMENTWISE_ADD_RELU = "fusion_elementwise_add_relu"; const char *G_OP_TYPE_FUSION_FC_RELU = "fusion_fc_relu"; const char *G_OP_TYPE_REGION = "region"; +const char *G_OP_TYPE_FUSION_CONV_BN = "fusion_conv_bn"; std::unordered_map< std::string, std::pair, std::vector>> @@ -85,6 +86,7 @@ std::unordered_map< {G_OP_TYPE_FUSION_POOL_BN, {{"X"}, {"Y"}}}, {G_OP_TYPE_FUSION_ELEMENTWISE_ADD_RELU, {{"X", "Y"}, {"Out"}}}, {G_OP_TYPE_FUSION_FC_RELU, {{"X", "Y", "Z"}, {"Out"}}}, - {G_OP_TYPE_REGION, {{"X"}, {"Out"}}}}; + {G_OP_TYPE_REGION, {{"X"}, {"Out"}}}, + {G_OP_TYPE_FUSION_CONV_BN, {{"Input"}, {"Y"}}}}; } // namespace paddle_mobile diff --git a/src/common/types.h b/src/common/types.h index 6066879305d5ea7d1b6dcb0bb618c234338cc171..78c96f327a5f483ebee9d56bf338a4415542fbde 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -113,6 +113,7 @@ extern const char *G_OP_TYPE_FUSION_POOL_BN; extern const char *G_OP_TYPE_FUSION_ELEMENTWISE_ADD_RELU; extern const char *G_OP_TYPE_FUSION_FC_RELU; extern const char *G_OP_TYPE_REGION; +extern const char *G_OP_TYPE_FUSION_CONV_BN; extern std::unordered_map< std::string, std::pair, std::vector>> diff --git a/src/operators/fusion_elementwise_add_relu_op.h b/src/operators/fusion_elementwise_add_relu_op.h index b7e1f244732f9b4c463b6dd0f1ba81e7baf04bfd..b9d662cae559781789130e0483bccef06e1ac9b0 100644 --- a/src/operators/fusion_elementwise_add_relu_op.h +++ b/src/operators/fusion_elementwise_add_relu_op.h @@ -28,7 +28,7 @@ using std::vector; class FusioneElementwiseAddReluMatcher : public framework::FusionOpMatcher { public: FusioneElementwiseAddReluMatcher() { - node_ = framework::Node(G_OP_TYPE_FUSION_ELEMENTWISE_ADD_RELU); + node_ = framework::Node(G_OP_TYPE_ELEMENTWISE_ADD); node_ > std::make_shared(G_OP_TYPE_RELU); }