未验证 提交 47846730 编写于 作者: 张春乔 提交者: GitHub

【Hackathon No.89】 Remove circle import Part1 (#50677)

* modify the 'import' position

* rollback

* move 'from paddle.fluid.io import save_inference_model' to head of api.py
上级 af3a0675
......@@ -73,6 +73,7 @@ from paddle.fluid.framework import (
)
from paddle.fluid.framework import dygraph_only, _non_static_mode
from paddle.fluid.wrapped_decorator import wrap_decorator
from paddle.fluid.io import save_inference_model
def create_program_from_desc(program_desc):
......@@ -1159,8 +1160,6 @@ def save(layer, path, input_spec=None, **configs):
)
# 5. save inference model
from paddle.fluid.io import save_inference_model
# construct new save_inference_model arguments
model_path = dirname
# NOTE(chenweihang): because prefix contains model and params filename,
......@@ -1817,8 +1816,6 @@ class TracedLayer:
if dirname and not os.path.exists(dirname):
os.makedirs(dirname)
from paddle.fluid.io import save_inference_model
def get_feed_fetch(all_vars, partial_vars):
if partial_vars is None:
return all_vars
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册