两种方式加载预训练模型(保存方式不一样,加载方式也不一样)
以腾讯训练的100为word2vec small版本为例
word2vec预训练模型下载
腾讯:https://ai.tencent.com/ailab/nlp/en/embedding.html (100维)
github中文词向量: https://github.com/Embedding/Chinese-Word-Vectors (64维度的)
- save_word2vec_format保存的方式:
model = word2vec.KeyedVectors.load_word2vec_format(
fname=r'new_model.model', binary=True)
- wv_word2model.save和wv_word2model.wv.save保存的方式ÿ