facebookresearch / fastText

Library for fast text representation and classification.
https://fasttext.cc/
MIT License
25.84k stars 4.71k forks source link

Python Supervised learning --how to get .vec files #1029

Open wangchenwc opened 4 years ago

wangchenwc commented 4 years ago

Python Supervised learning --how to get .vec files?

rajeevranjan123 commented 4 years ago

Does anybody know what's up with the fasttext python module as regards using pretrainedVectors for supervised training?

The following operation works just fine:

However, when I run the equivalent operation in a python3.6 environment:

model = fasttext.train_supervised(input="new_data.txt", pretrainedVectors="pretrained.vec", dim=150)

I get the following error instead:

Dimension of pretrained vectors (150) does not match dimension (100)!

Let me know if you do, and thanks for your help!

wangchenwc commented 4 years ago

Does anybody know what's up with the fasttext python module as regards using pretrainedVectors for supervised training?

The following operation works just fine:

However, when I run the equivalent operation in a python3.6 environment:

model = fasttext.train_supervised(input="new_data.txt", pretrainedVectors="pretrained.vec", dim=150)

I get the following error instead:

Dimension of pretrained vectors (150) does not match dimension (100)!

Let me know if you do, and thanks for your help!

wangchenwc commented 4 years ago

Does anybody know what's up with the fasttext python module as regards using pretrainedVectors for supervised training?

The following operation works just fine:

However, when I run the equivalent operation in a python3.6 environment:

model = fasttext.train_supervised(input="new_data.txt", pretrainedVectors="pretrained.vec", dim=150)

I get the following error instead:

Dimension of pretrained vectors (150) does not match dimension (100)!

Let me know if you do, and thanks for your help!

what i say is how to get the .vec file after Python model training , so your question can make a new issue!!!!!