在Windows中加载FastText监督模型

时间:2018-07-26 22:33:04

标签: python text-classification supervised-learning fasttext

我正在尝试在Windows上加载经过预先​​训练的FastText分类模型。该模型在RedHat Linux上进行了外部培训。该代码在Linux上运行良好。

import fasttext
fasttext.load_model('model.bin')
  

FastText版本0.8.3

     

Windows 10

     

Python 3.7

它给我以下错误

Traceback (most recent call last):
  File "fasttext/fasttext.pyx", line 152, in fasttext.fasttext.load_model
RuntimeError: vector<T> too long

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "driver.py", line 3, in <module>
    fasttext.load_model('model.bin')
  File "fasttext/fasttext.pyx", line 154, in fasttext.fasttext.load_model
Exception: fastText: Cannot load model.bin due to C++ extension failed to allocate the memory

0 个答案:

没有答案