CNNs try to capture the spatial relationships in data. These are ideally suited for capturing patterns in images since images have spatial relationships in those pixels that are in the same vicinity contribute to making sense of the object. The nature of convolutions, as we will see in the upcoming sections, is more suited for pictures, so we will try and see how they can be used to make sense of the text and capture spatial relationships in text data as well. First, let's try and understand convolutions and the other components that come with them. After doing this, we will extend our learning to text.
Understanding convolutions
Images are described using pixels. These pixels can have varying values, depending on whether the image is black and white, grayscale, or color. The values in the pixels are reflective of the patterns they might be carrying. As part of convolution, we try and slide (perform a dot product) what we call filters across the image so as to capture...