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

Load dict from trained model #2

Closed
yohanguez opened this issue Jun 5, 2018 · 4 comments
Closed

Load dict from trained model #2

yohanguez opened this issue Jun 5, 2018 · 4 comments
Assignees

Comments

@yohanguez
Copy link

Hi,

Being able to finetune a pre-trained model is a anazing tool. However, I don't know why but when I am starting to run my command './fasttext supervised -input -inputModel -output -thread 25 -incr', it says 'Load dict from trained model' and never go to the next step (I waited more than 1 hour).

Is the syntax correct ? What am I missing ?

Thanks
Yohan

@AritzBi
Copy link

AritzBi commented Jun 20, 2018

I don't know why but It takes very long to load model's '.bin' as dictionary. I've trying to load the english pre-trained word vectors and after a day, it hasn't finished the "Load dict from trained model" step.

@benman1
Copy link

benman1 commented Jun 29, 2018

I am also trying with ./fasttext [...] -inputModel myModel.bin -inc. I am getting this here:

Update args
Load dict from trained model
Load dict from training data
Read 132M words
Number of words:  3919267
Number of labels: 0
Merge dict
fasttext: src/dictionary.cc:139: std::__cxx11::string fasttext::Dictionary::getWord(int32_t) const: Assertion `id < size_' failed.

@ericxsun
Copy link
Owner

ericxsun commented Jul 5, 2018

@yohanguez @AritzBi @benman1 actually, with the following, no error occurred.

  1. train first model:
    ./fasttext supervised -input training_data -output supervised-model

supervised-model.bin and supervised-model.vec were generated.

  1. incremental training with new data: new_training_data
    ./fasttext supervised -input new_training_data -inputModel supervised-model.bin -output re-supervised-model -incr

training started and then, re-supervised-model.bin and re-supervised-model.vec were generated.

same as for unsupervised, like 'cbow'.

could you debug it step by step, appreciation for your any efforts. Also, I'll exam the code.

@ericxsun
Copy link
Owner

ericxsun commented Aug 4, 2018

do training/incr-training with word-vector-example.sh, no errors. Please retry with the latest code. THKS

@ericxsun ericxsun self-assigned this Aug 5, 2018
@ericxsun ericxsun closed this as completed Aug 5, 2018
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

No branches or pull requests

4 participants