From dee6d1606f35a6cda8b788bb163763ca8a1d3257 Mon Sep 17 00:00:00 2001 From: Haihao Shen Date: Fri, 31 Aug 2018 15:35:36 +0800 Subject: [PATCH] Enable conv and batch norm by default --- python/paddle/fluid/transpiler/inference_transpiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/transpiler/inference_transpiler.py b/python/paddle/fluid/transpiler/inference_transpiler.py index f79fcb24bb..02fefe32df 100644 --- a/python/paddle/fluid/transpiler/inference_transpiler.py +++ b/python/paddle/fluid/transpiler/inference_transpiler.py @@ -60,11 +60,10 @@ class InferenceTranspiler(object): if not isinstance(scope, core.Scope): raise TypeError("scope should be as Scope type or None") use_mkldnn = bool(os.getenv("FLAGS_use_mkldnn", False)) + self._fuse_batch_norm(program, place, scope) if use_mkldnn: self._fuse_relu_mkldnn(program) self._fuse_conv_bias_mkldnn(program) - else: - self._fuse_batch_norm(program, place, scope) def _fuse_relu_mkldnn(self, program): ''' -- GitLab