From 5e09d67a09a4631ce9a3e09eab0d7aa6a005418d Mon Sep 17 00:00:00 2001 From: Shibo Tao <62922815+T8T9@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:40:19 +0800 Subject: [PATCH] fix API: normalize_program. test=develop (#33408) * 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 89da75ae91e..688bff4a678 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 58e8ebc481d..a9cae0c14e3 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