From 366d3463ef387bc93c962d090f0eb8f898c839e7 Mon Sep 17 00:00:00 2001 From: Shibo Tao <62922815+T8T9@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:41:20 +0800 Subject: [PATCH] fix API: normalize_program (#33384) * fix: paddle.static.default_main_program. test=develop * add normalize_program to __all__. test=develop --- python/paddle/static/__init__.py | 1 + python/paddle/static/io.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/static/__init__.py b/python/paddle/static/__init__.py index 89da75ae91..688bff4a67 100644 --- a/python/paddle/static/__init__.py +++ b/python/paddle/static/__init__.py @@ -85,6 +85,7 @@ __all__ = [ #noqa 'load', 'save_inference_model', 'load_inference_model', + 'normalize_program', 'load_program_state', 'set_program_state', 'cpu_places', diff --git a/python/paddle/static/io.py b/python/paddle/static/io.py index 58e8ebc481..a9cae0c14e 100644 --- a/python/paddle/static/io.py +++ b/python/paddle/static/io.py @@ -157,7 +157,7 @@ def normalize_program(program, feed_vars, fetch_vars): exe.run(paddle.static.default_startup_program()) # normalize main program. - program = default_main_program() + program = paddle.static.default_main_program() normalized_program = paddle.static.normalize_program(program, [image], [predict]) """ -- GitLab