From 4151d90c16196735aa2a44d54f4d8a56a84288b2 Mon Sep 17 00:00:00 2001 From: liuwei1031 <46661762+liuwei1031@users.noreply.github.com> Date: Sun, 23 Jun 2019 18:22:14 +0800 Subject: [PATCH] improve the hint message of memory optimize, test=develop (#18260) --- python/paddle/fluid/compiler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/compiler.py b/python/paddle/fluid/compiler.py index 87a6ce0881..f8674f79a7 100644 --- a/python/paddle/fluid/compiler.py +++ b/python/paddle/fluid/compiler.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging import multiprocessing import os import six @@ -215,7 +214,8 @@ class CompiledProgram(object): self._build_strategy.enable_inplace = False elif not self._build_strategy.memory_optimize or not self._build_strategy.enable_inplace: # remind the user to try our memmory optimize strategy - logging.warn(""" + six.print_( + """ You can try our memory optimize feature to save your memory usage: # create a build_strategy variable to set memory optimize option build_strategy = compiler.BuildStrategy() @@ -236,7 +236,8 @@ class CompiledProgram(object): # if you need to fetch conv1, then: conv1.persistable = True - """) + """, + file=sys.stderr) return self -- GitLab