Google是word2vec训练有素的模型CBOW还是skipgram

时间:2019-07-18 08:38:12

标签: python-3.x word2vec word-embedding

是Google预先训练的word2vec模型CBO还是skipgram。

我们通过以下方式加载预训练模型:

from gensim.models.keyedvectors as word2vec

model= word2vec.KeyedVectors.load_word2vec_format('GoogleNews-vectors-negative300.bin.gz')

我们如何专门加载预训练的CBOW或skipgram模型?

1 个答案:

答案 0 :(得分:1)

GoogleNews词向量是由Google使用专有语料库训练的,但是从未明确描述所使用的所有训练参数。 (它没有编码在文件中。)

在致力于word2vec-toolkit代码的Google网上论坛中,有人多次询问它,但没有给出明确的答案。例如,有一个response from word2vec author Mikolov that he doesn't remember the training parameters。在其他地方,another poster thinks one of the word2vec papers implies skip-gram was used –但由于这段经文与发布的GoogleNews向量的其他方面(例如词汇量)不完全匹配,因此我对此并不完全有信心。

由于Google尚不清楚,而且无论如何都没有根据不同的培训模式发布替代版本,因此,如果要运行测试或对不同的模式做出任何结论,则必须使用其他向量集,或以各种方式训练自己的向量。

相关问题