Make Word2vec multiple passes more explicit. Fix #1052 #1183
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.
I modify the method 'train()' by adding some parameters --iteration=None, epochs=1, start_alpha=None, end_alpha=None, cur_epoch=None. And the default epochs is one, others are None. If the user trains the model with a loop, the epochs and cur_epoch(the current epoch) must be specified. So if the user don't specify the start_alpha and end_alpha(the usage is the same as alpha and min_alpha), we can recaculate the start_alpha and end_alpha according to the current epoch to support linear learning-rate decay from (initial) alpha to min_alpha.