From 83bd58d4e55cdc368b396d02f549578e7ec3c2c3 Mon Sep 17 00:00:00 2001 From: nhzlx Date: Sat, 15 Jun 2019 13:10:11 +0000 Subject: [PATCH] 1. fix server conv_bn_fuse_pass bug --- paddle/fluid/lite/core/mir/fusion/conv_bn_fuse_pass_test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paddle/fluid/lite/core/mir/fusion/conv_bn_fuse_pass_test.cc b/paddle/fluid/lite/core/mir/fusion/conv_bn_fuse_pass_test.cc index 7ce20c4d6e2..79436a9fa3d 100644 --- a/paddle/fluid/lite/core/mir/fusion/conv_bn_fuse_pass_test.cc +++ b/paddle/fluid/lite/core/mir/fusion/conv_bn_fuse_pass_test.cc @@ -88,6 +88,7 @@ std::unique_ptr BuildGraph(framework::ProgramDesc* program_desc, conv_op->SetAttr("paddings", paddings); conv_op->SetAttr("dilations", dilations); conv_op->SetAttr("groups", groups); + conv_op->SetAttr("fuse_relu", false); bn_op->SetType("batch_norm"); bn_op->SetInput("X", {"conv_out"}); @@ -103,6 +104,10 @@ std::unique_ptr BuildGraph(framework::ProgramDesc* program_desc, bn_op->SetOutput("SavedVariance", {"bn_saved_var"}); float eps = 1e-5; bn_op->SetAttr("epsilon", eps); + bn_op->SetAttr("is_test", static_cast(1)); + bn_op->SetAttr("use_global_stats", false); + bn_op->SetAttr("momentum", 0.9f); + bn_op->SetAttr("data_layout", std::string("NCHW")); program_desc->Flush(); -- GitLab