Now that we have our embedding structure, it's time to predict off of that structure with a CNN. When you typically think of a CNN, and the work that we have completed on them, you're probably thinking of computer vision tasks such as recognizing an object in an image. Although this is what they were designed for, CNNs can also be great at detecting features in text.
When we use CNNs in NLP, we replace the standard input of pixels with word embeddings. While in typical computer vision tasks you utilize the CNNs filters over small patches of the image, for NLP tasks, we use the same sliding window over the rows of a matrix of embeddings. The width of the sliding window, therefore, becomes ...