from gensim.models import Word2Vec
model = Word2Vec.load('songWord2Vec.model')
embedding=model.wv.get_keras_embedding()
print(type(embedding))
embedding 的类型:
<class 'keras.layers.embeddings.Embedding'>
from gensim.models import Word2Vec
model = Word2Vec.load('songWord2Vec.model')
embedding=model.wv.get_keras_embedding()
print(type(embedding))
embedding 的类型:
<class 'keras.layers.embeddings.Embedding'>
本文标题:keras 如何使用 gensim 预训练的 word2vec
本文链接:https://www.haomeiwen.com/subject/zfxrbqtx.html
网友评论