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

Restore the param infos in Program.clone() #5873

Merged
merged 7 commits into from
Nov 27, 2017

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Nov 23, 2017

The Program.clone only clone the variables and ops
in the program into a new program. However, the
information of Parameter is not clone.

So we need restore the information of Parameters.

Fix #5871

The Program.clone only clone the variables and ops
in the program into a new program. However, the
information of Parameter is not clone.

So we need restore the information of Parameters.

Fix PaddlePaddle#5871
@reyoung reyoung added this to the Release 0.11.0 milestone Nov 23, 2017
"program, with represent the same topology")

for dst_block, src_block in six.zip(self.blocks, other.blocks):
dst_block.copy_param_info_from(src_block)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Parameter can only be in the root block?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.

Copy link
Collaborator

@JiayiFeng JiayiFeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reyoung reyoung merged commit d89ff5b into PaddlePaddle:develop Nov 27, 2017
@reyoung reyoung deleted the feature/program_clone_refine branch December 26, 2017 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants