未验证 提交 9b63e7f2 编写于 作者: 王明冬 提交者: GitHub

[pass_enhance]fix the error in conv_bias_mkldnn_fuse_pass, test=develop (#34292)

上级 d8e238d1
...@@ -70,7 +70,7 @@ ConvBiasFusePass::ConvBiasFusePass() { ...@@ -70,7 +70,7 @@ ConvBiasFusePass::ConvBiasFusePass() {
.IsTensor() .IsTensor()
.End() .End()
.AddAttr("axis") .AddAttr("axis")
.IsIntIn({-1, 0}) .IsIntIn({1, 3})
.End(); .End();
} }
......
...@@ -52,7 +52,7 @@ void SetOp(ProgramDesc* prog, const std::string& type, const std::string& name, ...@@ -52,7 +52,7 @@ void SetOp(ProgramDesc* prog, const std::string& type, const std::string& name,
op->SetInput("Bias", {}); op->SetInput("Bias", {});
} else if (type == "elementwise_add") { } else if (type == "elementwise_add") {
op->SetAttr("use_mkldnn", true); op->SetAttr("use_mkldnn", true);
op->SetAttr("axis", -1); op->SetAttr("axis", 1);
op->SetInput("X", {inputs[0]}); op->SetInput("X", {inputs[0]});
op->SetInput("Y", {inputs[1]}); op->SetInput("Y", {inputs[1]});
op->SetOutput("Out", outputs); op->SetOutput("Out", outputs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册