Passing text as input to a CNN

I understand that individual words are embedded in the first hidden layer of a CNN. The size of this embedding layer would be (Vocab size,Embedding Size). What I don’t understand is how does pytorch process a sequence of words. For example let’s say I’m trying to predict the sentiment of a sentence. I would pass in a vector of indices, of fixed size that represent the words in the sentence. How does pytorch work with this vector. I can’t visualize it. If I pass a single world I would assume that the neural node corresponding to that word gets fired and we get the resulting embedding. What happens if we pass a sequence of words?

The size of the embedding weight tensor is (Vocab size,Embedding Size), but according to the docs the embedding layer takes input of shape (batch_size, words) where each element is the index of a word, and produces output of shape (batch_size, words, embedding_size) where each word index has been replaced by the corresponding embedding vector.

Basically, the embedding is applied individually to each word of the input.

Thanks that clears things up.