FastText无法加载模型.bin由于C++扩展无法分配内存

2024-10-01 17:22:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用FastText PythonAPI https://pypi.python.org/pypi/fasttext,但是根据我所读到的,这个API不能像https://github.com/salestock/fastText.py/issues/115中建议的那样在https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md加载更新的.bin模型文件

我已经尝试了在那个问题上建议的所有方法,而且https://github.com/Kyubyong/wordvectors没有英语的.bin,否则问题就解决了。有人知道有什么办法吗?在


Tags: pyhttpsorggithubpypicomapipythonapi
3条回答

此错误通常是由于版本不匹配造成的。确保在培训和模型加载期间使用相同版本的fasttext。在

请尝试以下步骤来解决此问题。在加载语言标识模型时,它与我一起为python3.5工作。在

git clone https://github.com/facebookresearch/fastText.git
cd fastText
pip install .

不能使用pip安装的包fasttext。您可以使用来自fasttextrepo的installfastText(大写T)。在

相关问题 更多 >

    热门问题