-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Restore the param infos in Program.clone() #5873
Conversation
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
python/paddle/v2/fluid/framework.py
Outdated
"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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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