In order to classify the CIFAR-10 dataset I made two convolutional neural network models, which are named Model-A and Model-B.
The architecture of Model-A is as follows:
- Convolutional Layer 1 - 3× 3 ×12 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Convolutional Layer 2 - 3× 3 ×24 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Convolutional Layer 3 - 3× 3 ×48 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Convolutional Layer 4 - 3× 3 ×96 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Flatten layer
- Fully connected layer - 512 neurons
- Activated by Relu
- Dropout - 40%
- Fully connected layer - 512 neurons
- Activated by Relu
- Droptout - 40%
- Output layer - 10 neurons
- Activated by Softmax
The architecture of Model-B is as follows:
- Convolutional Layer 1 - 3× 3 ×24 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Convolutional Layer 2 - 3× 3 ×24 - strides - 1× 1
- Activated by Relu
- Max pooling Layer - 2× 2
- Flatten layer
- Fully connected layer - 512 neurons
- Activated by Relu
- Dropout - 25%
- Fully connected layer - 256 neurons
- Activated by Relu
- Droptout - 25%
- Output layer - 10 neurons
- Activated by Softmax
After training both the networks the clear observation was that size of the network is important when it comes to accuracy. Model-A with more convo- lutional layer had a better accuracy than the Model-B with half the convo-lutional layers of Model-A.
The computational graphs, cost vs epochs chart and accuracy vs epochs chart for both Model-A and Model-B is provided below. The x-axis of both the graphs is epochs and the y-axis is the accuracy orcost.
Computational Graph Model-A
Model-A Accuracy vs Epochs
Model-A Cost vs Epochs
Computational Graph Model-B
Model-B Accuracy vs Epochs
Model-B Cost vs Epochs