ericxsun / fastText

Library for fast text representation and classification.
Other
15 stars 9 forks source link

Dimension mismatch when using pretrained vectors #12

Open ajallooeian opened 5 years ago

ajallooeian commented 5 years ago

Hi,

I am trying to use the word vectors from here: https://fasttext.cc/docs/en/crawl-vectors.html

and use pretrainedVectors option to make a classifier. ./fasttext supervised -input some_data.txt -output some_data.txt.model -pretrainedVectors model.bin -dim 300

However I get:

terminate called after throwing an instance of 'std::invalid_argument' what(): Dimension of pretrained vectors (-1) does not match dimension (300)! Aborted (core dumped)

or

terminate called after throwing an instance of 'std::invalid_argument' what(): Dimension of pretrained vectors (-283686952306184) does not match dimension (300)! Aborted (core dumped)

Content of sample_data.txt is: labela hello labelb good labelc bad

I appreciate any advice.