MemoryError:无法分配380。MiB用于形状(331792,300)和数据类型float32的数组

时间:2020-06-23 12:36:29

标签: gensim word2vec

在使用gensim中的word2vec时,我遇到了此错误

MemoryError: Unable to allocate 380. MiB for an array with shape (331792, 300) and data type float32

这是我的代码

from gensim.models import Word2Vec

@app.route('/admin/index')
def show_admin():

model_baru = Word2Vec.load('model/idwiki_word2vec_300.model')
tester = model_baru.most_similar(positive=['wanita'],topn=3)
hasil = print(tester)

return render_template('admin/index.html',hasil=hasil)

此错误会发生什么? 请帮助我

感谢您的关注

0 个答案:

没有答案