We have seen how we can design a CNN model. As we have discussed earlier, CNN architecture contains more than one set of convolutional and max-pooling layers along with activation functions.
Here, we will deal with the same MNIST digit classification problem to understand the working of a CNN. This problem is known as the Hello World! program of the deep learning domain. This model is adapted from Yann Lecunn's LeNet model, so we will also name our CNN architecture as LeNet.
We will create a convolutional architecture with two sets of convolutional-relu-max pooling and one dense layer for classification of extracted feature maps.
Let's create a definition for constructing our CNN:
#Here is our Network definition ...