我正在尝试在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