For the given CNN network, the size of the output image and the number of parameters at
each step can be calculated as follows:
Convolution Layer 1:
   •   Input Size: 224x224x3
   •   Kernel Size (F): 3x3
   •   Number of Kernels (K): 20
   •   Stride (S): 1
   •   Padding (P): 0
Output Size Calculation:
Output Size = ((Input Size - Kernel Size + 2 * Padding) / Stride) + 1
   •   Height: ((224 - 3 + 2 * 0) / 1) + 1 = 222
   •   Width: ((224 - 3 + 2 * 0) / 1) + 1 = 222
   •   Depth: 20 (number of filters)
   •   Output Size: 222x222x20
Parameter Calculation:
Number of parameters = (Kernel Size * Number of input channels + 1) * Number of Kernels
   •   (3 * 3 * 3 + 1) * 20 = (27 + 1) * 20 = 560
   •   Number of parameters: 560
Pooling Layer 1:
   •   Input Size: 222x222x20
   •   Pool Size: 2x2
   •   Stride (S): 2
Output Size Calculation:
   •   Height: 222 / 2 = 111
   •   Width: 222 / 2 = 111
   •   Depth: 20
   •   Output Size: 111x111x20
Parameter Calculation: Pooling layers do not have learnable parameters, so the number of
parameters is 0.
Convolution Layer 2:
   •   Input Size: 111x111x20
   •   Kernel Size (F): 3x3
   •   Number of Kernels (K): 90
   •   Stride (S): 1
   •   Padding (P): 0
Output Size Calculation:
   •   Height: ((111 - 3 + 2 * 0) / 1) + 1 = 109
   •   Width: ((111 - 3 + 2 * 0) / 1) + 1 = 109
   •   Depth: 90
   •   Output Size: 109x109x90
Parameter Calculation:
   •   (3 * 3 * 20 + 1) * 90 = (180 + 1) * 90 = 16290
   •   Number of parameters: 16290
Pooling Layer 2:
   •   Input Size: 109x109x90
   •   Pool Size: 2x2
   •   Stride (S): 2
Output Size Calculation:
   •   Height: 109 / 2 = 54.5 which is 54 after floor function
   •   Width: 109 / 2 = 54.5 which is 54 after floor function
   •   Depth: 90
   •   Output Size: 54x54x90
Parameter Calculation: Pooling layers do not have learnable parameters, so the number of
parameters is 0.
Flatten Layer:
   •   Input Size: 54x54x90
   •   Output Size: 54 * 54 * 90 = 26244
   •   Output Size: 26244
Fully Connected Layer 1 (FC1):
   •   Input Size: 26244
   •   Output Size: 7
Parameter Calculation:
Number of parameters = (Input Size + 1) * Output Size
   •   (26244 + 1) * 7 = 183715
   •   Number of parameters: 183715
Fully Connected Layer 2 (FC2):
   •   Input Size: 7
   •   Output Size: 3
Parameter Calculation:
•   (7 + 1) * 3 = 24
•   Number of parameters: 24