Skip to content Skip to sidebar Skip to footer

Gensim Equivalent Of Training Steps

Does gensim Word2Vec have an option that is the equivalent of 'training steps' in the TensorFlow word2vec example here: Word2Vec Basic? If not, what default value does gensim use?

Solution 1:

Yes, Word2Vec class constructor has iter argument:

iter = number of iterations (epochs) over the corpus. Default is 5.

Also, if you call Word2Vec.train() method directly, you can pass in epochs argument that has the same meaning.

The number of actual training steps is deduced from epochs, but depends on other parameters like text size, window size and batch size. If you're just looking to improve the quality of embedding vectors, increasing iter is the right way.

Post a Comment for "Gensim Equivalent Of Training Steps"