2016-09-17 14 views

答えて

3

ちょうど今、あなたはいつものようにモデルを訓練することができ

import gensim 

# Load pre-trained Word2Vec model. 
model = gensim.models.Word2Vec.load("modelName.model") 

をロードします。また、あなたは複数回それを保存し、それを再教育することができるようにしたい場合は、ここであなたが

model.train(//insert proper parameters here//) 
""" 
If you don't plan to train the model any further, calling 
init_sims will make the model much more memory-efficient 
If `replace` is set, forget the original vectors and only keep the normalized 
ones = saves lots of memory! 
replace=True if you want to reuse the model 
""" 
model.init_sims(replace=True) 

# save the model for later use 
# for loading, call Word2Vec.load() 

model.save("modelName.model") 
+0

を何をすべきかだ私はこのエラーを取得:\ ... \ Pythonの\ Python35 \ libに\部位特異的:」Cファイルパッケージ\ gensim \ utils.py "、ライン911、アンピクル 戻り値_pickle.loads(f.read()) _pickle.UnpicklingError:無効なロードキー、 '6'。 – Vahid

+0

'_pickle.UnpicklingError:無効なロードキー '3'。 '場合によっては' .load_word2vec_format() 'のように見えます。 – mrgloom

関連する問題