vrasneur/pyfasttext

predict result is not the same as origin source code facebook's fasttext

liyi193328 opened this issue · 2 comments

Hi,
I train a model use the latest fasttext source c++ code, and use pyfasttext to load the model(*.bin), and predict a list of sentences;
And I use fasttext source code to predict the same text file.
But the predict result is not the same. and pyfasttext result 's probability distribution is not close to 1, but all class label near to zero.
So what 's the reason then ? Is the version pyfasttext using is not the same as the latest code in source code of facebook(github).

Hi liyi193328,

Facebook engineers have released their own Python binding for fastText.
It's available here: https://github.com/facebookresearch/fastText/tree/master/python

I suggest that you use the official binding now: as it is integrated into the fastText repository, the source code will always be up to date.
(And if you have old models that are not supported by the official binding, you can use my own binding).

@vrasneur great thanks