This repository was archived by the owner on Jan 24, 2024. It is now read-only.
Chap 4 Word2Vec Chinese Version #545
Merged
daming-lu merged 10 commits intoPaddlePaddle:high-level-api-branchfrom Jun 12, 2018
Merged
Chap 4 Word2Vec Chinese Version #545daming-lu merged 10 commits intoPaddlePaddle:high-level-api-branchfrom
daming-lu merged 10 commits intoPaddlePaddle:high-level-api-branchfrom
Conversation
added 9 commits
June 7, 2018 16:58
…-level-api-branch
…gh-level-api-branch
…gh-level-api-branch
jetfuel
approved these changes
Jun 12, 2018
| size=dict_size, | ||
| bias_attr=paddle.attr.Param(learning_rate=2), | ||
| act=paddle.activation.Softmax()) | ||
| def inference_program(is_sparse): |
Contributor
There was a problem hiding this comment.
The is_sparse is used every where, but not explained. It will be nice if we can briefly explain it.
04.word2vec/README.cn.md
Outdated
| ``` | ||
|
|
||
| 然后,指定训练相关的参数: | ||
| - 现在我可以开始训练啦。如今的版本较之以前就简单了许多。我们有现成的训练和测试集:`paddle.dataset.imikolov.train()`和`paddle.dataset.imikolov.test()`。两者都会返回一个读取器。在PaddlePaddle中,读取器是一个Python的函数,每次调用,会读取下一条数据。它是一个Python的generator。 |
04.word2vec/README.cn.md
Outdated
|
|
||
| def event_handler(event): | ||
| if isinstance(event, fluid.EndStepEvent): | ||
| outs = trainer.test( |
Contributor
There was a problem hiding this comment.
We can put all the code under the if event.step % 10 == 0: block.
04.word2vec/README.cn.md
Outdated
| # Note here we need to choose more sophisticated optimizer | ||
| # such as AdaGrad with a decay rate. The normal SGD converges | ||
| # very slowly. | ||
| # optimizer=fluid.optimizer.SGD(learning_rate=0.001), |
Contributor
There was a problem hiding this comment.
We need to update this comment.
or move the whole thing to optimizer_func
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.