Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repacle fluid.io.load_inference_model, fluid.io.save_inference_model in fluid with 2.0 version #55345

Merged
merged 28 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ def _ps_inference_save_inference_model(
self,
executor,
dirname,
feeded_var_names,
feeded_vars,
target_vars,
main_program=None,
export_for_deployment=True,
Expand All @@ -735,28 +735,21 @@ def _ps_inference_save_inference_model(
raise TypeError(
"in fleet.save_inference_model() function, main_program must be as Program type, CompiledProgram is not allowed"
)
paddle.fluid.io.save_inference_model(
paddle.static.io.save_inference_model(
dirname,
feeded_var_names,
feeded_vars,
target_vars,
executor,
main_program,
None,
None,
export_for_deployment,
program=main_program,
legacy_format=legacy_format,
)
else:
paddle.fluid.io.save_inference_model(
paddle.static.save_inference_model(
dirname,
feeded_var_names,
feeded_vars,
target_vars,
executor,
self.origin_main_program,
None,
None,
export_for_deployment,
True,
program=self.origin_main_program,
legacy_format=legacy_format,
)

Expand Down
Loading