From 7815cdffbaacd49f8ba875f5d53a8972b9c3b060 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Wed, 11 Apr 2018 15:22:17 +0800 Subject: [PATCH] use clone method to flush in forth --- python/paddle/fluid/inference_transpiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/inference_transpiler.py b/python/paddle/fluid/inference_transpiler.py index 194f7adf4..a215b98c6 100644 --- a/python/paddle/fluid/inference_transpiler.py +++ b/python/paddle/fluid/inference_transpiler.py @@ -93,7 +93,10 @@ class InferenceTranspiler: self._adjust_input() self._remove_unused_var() - return program + # TODO(luotao): use clone() method to flush the program.desc in force, + # since some large program.desc will not be flushed immediately. + # And a better solution will be considered later. + return program.clone() # ====================== private transpiler functions ===================== def _insert_bias_op(self, index, current_op, bn_op): -- GitLab