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

add book04.word2vec train test #5002

Merged
merged 10 commits into from
Oct 23, 2017
Merged

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Oct 22, 2017

FIx #5003

@@ -20,7 +20,7 @@ def test_fit_a_line(self):
avg_cost = layers.mean(x=cost, program=program)
self.assertIsNotNone(avg_cost)
program.append_backward(avg_cost)
print str(program)
# print str(program)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not change the previous unit tests.

You can select the test method in runtime, by

python -m unittest test_layers.TestBook.test_fit_a_line

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

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

Basically LGTM, except one tiny comment

@@ -18,6 +18,10 @@ limitations under the License. */
namespace paddle {
namespace framework {

VarDesc::VarType VarDescBind::GetType() const { return desc_.type(); }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that we added methods GetType and SetType, but I don't see them being used anyway in this PR. Just a kindly reminder -- do we really need them?

Copy link
Member Author

@QiJune QiJune Oct 23, 2017

Choose a reason for hiding this comment

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

I just modify the syntax of these two methods. These two methods are used here.
Before, the methods implementation are also in header file. I move the implementation to source file to take consistency with other methods in class VarDescBind.

@reyoung reyoung merged commit fcd74e0 into PaddlePaddle:develop Oct 23, 2017
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