Understanding skip-gram model

Now, let's look at another interesting type of the word2vec model, called skip-gram. Skip-gram is just the reverse of the CBOW model,. That is in a skip-gram model, we try to predict the context words given the target word as an input. As shown in the following figure, we can notice that we have the target word as rises and we need to predict the context words the, sun, in, and the:

Similar to the CBOW model, we use the window size to determine how many context words we need to predict. The architecture of the skip-gram model is shown in the following figure.

As we can see that it takes the single target word as input and tries to predict the multiple context words:

In the skip-gram model, we try to predict the context words based on the target word. So, it takes one target word as an input and returns context words as output, as shown in the above figure. So, after training the skip-gram model to predict the context words, the weights between our input to hidden layer becomes the vector representation of the words, just like we saw in the CBOW model.

Now that we have a basic understanding of the skip-gram model, let us dive into detail and learn how they work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset