Skip to content

Instantly share code, notes, and snippets.

@ikatsov
Created March 15, 2020 15:55
Show Gist options
  • Save ikatsov/15ac782f6d060685cbcf237d308d6616 to your computer and use it in GitHub Desktop.
Save ikatsov/15ac782f6d060685cbcf237d308d6616 to your computer and use it in GitHub Desktop.
from gensim.models import Word2Vec
import multiprocessing as mp
WORD_DIM = 200 # dimensionality of the embedding space
model = Word2Vec(product_corpus,
window=5,
size=WORD_DIM,
workers=mp.cpu_count() - 2,
min_count=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment