-
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
Refine word2vec demo #5268
Refine word2vec demo #5268
Conversation
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.
This PR needs to be changed once #4975 is resolved.
@@ -114,20 +114,20 @@ class NormalInitializer(Initializer): | |||
"""Implements the random Normal(Gaussian) distribution initializer | |||
""" | |||
|
|||
def __init__(self, loc=0.0, scale=1.0, seed=0): |
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.
We should keep these names to loc and scale. They have been taken so that the naming convention is consistent with other frameworks such as numpy and tensorflow.
refer to these:
http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.random.normal.html#numpy.random.normal
@@ -108,8 +129,8 @@ | |||
init_program=init_program) | |||
avg_cost = layers.mean(x=cost, program=program, init_program=init_program) | |||
|
|||
sgd_optimizer = optimizer.SGDOptimizer(learning_rate=0.001) | |||
opts = sgd_optimizer.minimize(avg_cost) | |||
adagrad_optimizer = optimizer.AdagradOptimizer(learning_rate=0.001) |
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.
This will not work till #4975 is fixed. @jacquesqiao is working on this. So please do not merge this PR before the issue is fixed.
感谢您给PaddlePaddle贡献代码。由于Paddle V1/V2版本已不再维护,相关代码也已从develop分支上删除,因此关闭您的PR,欢迎您向Paddle最新版-Fluid贡献代码。 |
Fix #5267