未验证 提交 baa1ab86 编写于 作者: Z zhangyang0701 提交者: GitHub

Merge pull request #757 from qnqinan/develop

fix a bug in fusion elementwise add relu op closed #756
......@@ -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<std::string>, std::vector<std::string>>>
......@@ -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
......@@ -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<std::string>, std::vector<std::string>>>
......
......@@ -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<framework::Node>(G_OP_TYPE_RELU);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册