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 predict example #12

Merged
merged 3 commits into from
Mar 1, 2017
Merged

Conversation

Shellbye
Copy link
Contributor

@Shellbye Shellbye commented Mar 1, 2017

Since there is no prediction example, I added one at the end of the training.

@alexander-rakhlin
Copy link
Owner

Thanks.

  1. Could you please move ACTION = "predict" into top, settings section?
  2. Prediction must verify presence of weight file and load it.
    2a) You can save it in 'word2vec_models' dir and rename it into 'models'. Please update path in w2v.py too
  3. Just curious, is there convention for adding extra spaces in conditional expressions? Do you use an automated tool for formatting?
    if len(filter_sizes)>1

@Shellbye
Copy link
Contributor Author

Shellbye commented Mar 1, 2017

  1. I just added the predict example, and the ACTION = "predict" is for my future work, so I did not pull request it. If you want it, of course I can do that.

  2. Prediction can perform both when training is over and load weights file.
    2a) Same as 1. , I just did not pull request it.

  3. I don't understand. Are you asking about code format? If yes, I use Pycharm. Then what is the meaning of if len(filter_sizes)>1?

@Shellbye
Copy link
Contributor Author

Shellbye commented Mar 1, 2017

My faults, I don't realize that continue commit is still in the pull request. I will fix it. ^_^

@alexander-rakhlin
Copy link
Owner

alexander-rakhlin commented Mar 1, 2017

If ACTION is anything but "train", model remains uninitialized, it does not load weights file.
Okay, I finally understand your point, you can progress as it better for you. I will merge eventually

@Shellbye
Copy link
Contributor Author

Shellbye commented Mar 1, 2017

OK, I fixed it as you mentioned.

@alexander-rakhlin alexander-rakhlin merged commit b046deb into alexander-rakhlin:master Mar 1, 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.

None yet

2 participants