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 information of Parameters in Program.clone() #5871

Closed
reyoung opened this issue Nov 23, 2017 · 0 comments
Closed

Restore the information of Parameters in Program.clone() #5871

reyoung opened this issue Nov 23, 2017 · 0 comments
Assignees

Comments

@reyoung
Copy link
Collaborator

reyoung commented Nov 23, 2017

def clone(self):
p = Program()
p.desc = core.ProgramDesc(self.desc)
p.blocks = [Block(p, i) for i in xrange(self.desc.num_blocks())]
p.sync_with_cpp()
return p

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.

@reyoung reyoung self-assigned this Nov 23, 2017
reyoung added a commit to reyoung/Paddle that referenced this issue 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 PaddlePaddle#5871
@reyoung reyoung added this to the Release 0.11.0 milestone Nov 23, 2017
@reyoung reyoung mentioned this issue Nov 23, 2017
20 tasks
reyoung added a commit that referenced this issue Nov 27, 2017
* Restore the param infos in Program.clone()

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

* Follow comments

* Fix CI

* Fix CI

* Fix CI
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

No branches or pull requests

1 participant