-
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
add book04.word2vec train test #5002
Conversation
@@ -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) |
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.
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
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.
Done
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.
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(); } |
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 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?
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 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.
FIx #5003