Word2vec with Pytorch - Xiaofei's Blog

@machinelearnbot 

In this post, we implement the famous word embedding model: word2vec. Here are the paper and the original code by C. Word2vec is so classical ans widely used. However, it's implemented with pure C code and the gradient are computed manually. Nowadays, we get deep-learning libraries like Tensorflow and PyTorch, so here we show how to implement it with PyTorch. Actually, original word2vec implemented two models, skip-gram and CBOW.