Skip to content

Conversation

jetfuel
Copy link
Contributor

@jetfuel jetfuel commented Jun 8, 2018

As @qingqing01 and @panyx0718 suggested, use for_test=True when cloning the test program.

self.test_program = self.train_program.clone()
self.test_program = self.train_program.clone(for_test=True)

# The fisrt element of program_func_outs is loss.
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: can you also fix the comment? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure thing.

@jetfuel jetfuel requested a review from kexinzhao June 8, 2018 20:47
Copy link
Contributor

@kexinzhao kexinzhao left a comment

Choose a reason for hiding this comment

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

LGTM

@jetfuel
Copy link
Contributor Author

jetfuel commented Jun 8, 2018

This should fix #11299

@jetfuel jetfuel merged commit 637827a into PaddlePaddle:develop Jun 8, 2018
@jetfuel jetfuel deleted the trainerProgramCloneForTest branch June 8, 2018 22:05
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.

3 participants