Search code examples
pythonmachine-learningnlpword2vec

what is workers parameter in word2vec in NLP


in below code . i didn't understand the meaning of workers parameter . model = Word2Vec(sentences, size=300000, window=2, min_count=5, workers=4)


Solution

  • workers = use this many worker threads to train the model (=faster training with multicore machines).

    If your system is having 2 cores, and if you specify workers=2, then data will be trained in two parallel ways.

    By default , worker = 1 i.e, no parallelization