In my CNN architecture for binary classification, I have 2 convolutional layers, 2 maxpooling layers, 2 batchnormalization operations, 1 RELu and 1 fullyconnected layer.
Case1: When the number of channels, $d=1$:
In the first layer an input of size $[28*28*d]$, $d=1$ channel is convolved with $M_1=20 $ number of filters applied over all the input channels of size {$f_h \times f_w \times d$} = $[3\times 3\times 1]$ having the step size (stride) as 1 that creates a feature map of size ${(h-f_h+1) \times (w - f_w +1)\times d \times M_1} = (28-3 +1)\times(28-3+1)\times 10 = [26\times 26\times 20]$.
The second convolutional layer contains twice the number of filters = 40 of same size $[3\times 3 \times 1]$. So, the number of parameters becomes $[23 * 23 * 1 * 40]$ as the output from the second convolutional layer. So total number of parameters = $[26\times 26\times 20]+ [23 * 23 * 40]$
Case 2: When $d=2$ and all other sizes are same. The filter size become $[3 \times 3 \times 2]$. The output of the first convolutional layer will contain: $(28-3 +1)\times(28-3+1)\times 2 \times 20 = [25\times 25\times 40]$. For the second convolutional layer, the output will contain $[23 \times 23 \times 2 \times 40]$ parameters.
Question1) Is my calculation for each case above correct?
Question2) I have read that the purpose of maxpooling is to reduce the dimensionality of the feature map. In my case each maxpooling is of size 3 and stride 2. What does it mean by reducing the dimensionality and then what will be the size of the output from each layer upon considering that there is a maxpooling operation after each convolutional layer?