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

Errors during loading Dictionary for word embedding incremental training #3

Closed
Shiki-H opened this issue Jul 27, 2018 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Shiki-H
Copy link

Shiki-H commented Jul 27, 2018

First of all, thank you very much for the great work. Would really appreciate this feature. However, as I played around with it, I could not get started on re-training a word embedding model. Here are the steps to reproduce the error:

# run the sample script first to generate a model
$ bash word-vector-example.sh

# after the model is generated from the sample script
# we run
./fasttext skipgram -input data/fil9 -inputModel result/fil9.bin -output retrained -incr

The output displayed was:

Update args
Load dict from trained model
Load dict from training data
Read 124M words
Number of words:  218316
Number of labels: 0
Merge dict
Read 124M words
Number of words:  0
Number of labels: 0
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Empty vocabulary. Try a smaller -minCount value.
Aborted

I have tried to adjust -minCount option, but it did not work.

After looking at the code, I feel that the error has something to do with

dict_->addDict(dictInData, false);

from line 744 of fasttext.cc, but I am not sure about the exact cause of this problem. In fact, I am a bit confused by why we can load dictionary from the raw text we are supposed to train on.

@ericxsun
Copy link
Owner

ericxsun commented Aug 4, 2018

A bug, fixed by the last commit. As solved, I'll close this issue. Feel free to re-open it.

@ericxsun ericxsun self-assigned this Aug 5, 2018
@ericxsun ericxsun added the bug Something isn't working label Aug 5, 2018
@ericxsun ericxsun closed this as completed Aug 5, 2018
@Shiki-H
Copy link
Author

Shiki-H commented Aug 19, 2018

@ericxsun thanks for the help. Everything works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants