在使用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)
此错误会发生什么? 请帮助我
感谢您的关注