在使用 gensim 库进行训练时,Skip-gram word2vec 和 CBOW w2v 有什么区别?

What's the difference between Skip-gram word2vec and CBOW w2v during training with gensim library?

对于Skip-gram word2vec训练样本获取如下:

Sentence: The fox was running across the maple forest

单词fox给出下一对训练:

fox-run, fox-across, fox-maple, fox-forest

等等,每一个字。 CBOW w2v 使用反向方法:

run-fox, across-fox, maple-fox, forest-fox

forest 单词:

fox-forest, run-forest, across-forest, maple-forest

所以我们得到了所有的对。如果我们在 CBOW 模式下训练时不指定目标词,那么在使用 gensim 库训练期间,Skip-gram word2vec 和 CBOW w2v 有什么区别?在这两种情况下,是否都使用了所有的单词对?

只有 skip-gram 使用 (context_word)->(target_word).

形式的训练对

在CBOW中,训练样例为(average_of_multiple_context_words)->(target_word)。因此,当反向传播来自单个训练示例的错误时,多个上下文词会得到相同的纠正微调。