The generic architecture of CNN is comprised of convolutional layers followed by fully connected layers. Like other neural networks, a CNN also contains input, hidden and output layers, but it works by restructuring the data into tensors that consist of the image, and the width and height of the image. In CNN, each volume in one layer is connected only to a spatially relevant region in the next layer to ensure that when the number of layers increases, each neuron has a local influence on its specific location. A CNN may also contain pooling layers along with few fully connected layers.
The following is an example of a simple CNN with convolution and pooling layers. In this recipe, we will work with convolution layers. We will introduce the concept of pooling layers in the Getting familiar with pooling layers recipe of...