This folder contains an implementation of a Convolutional Neural Network (CNN) using some of the advanced convolutions and data augmentation techniques on CIFAR10 dataset.
└── README.md
└── src/
└── data_setup.py
└── utils.py
└── engine.py
└── model_builder.py
└── models/
└── S9Model1.pth
└── incorrect_images.png
└── loss_accuracy_plot.png
└── train.py
└── S9.ipynb
Clone the repo and run Change your current directory to S9
python train.py
r_in | n_in | j_in | s | r_out | n_out | j_out | kernal_size | padding | ||
---|---|---|---|---|---|---|---|---|---|---|
Conv | 1 | 32 | 1 | 1 | 3 | 32 | 1 | 3 | 1 | |
Conv | 3 | 32 | 1 | 1 | 5 | 32 | 1 | 3 | 1 | |
Conv (Dilated) | 5 | 32 | 1 | 1 | 9 | 30 | 1 | 5 | 1 | |
Conv | 9 | 30 | 1 | 1 | 11 | 30 | 1 | 3 | 1 | |
Conv | 11 | 30 | 1 | 1 | 13 | 30 | 1 | 3 | 1 | |
Conv (Stride2) | 13 | 30 | 1 | 2 | 15 | 15 | 2 | 3 | 1 | |
Conv | 15 | 15 | 2 | 1 | 19 | 15 | 2 | 3 | 1 | |
Conv | 19 | 15 | 2 | 1 | 23 | 15 | 2 | 3 | 1 | |
Conv (Stride2) | 23 | 15 | 2 | 2 | 27 | 8 | 4 | 3 | 1 | |
Conv (DWS) | 27 | 8 | 4 | 1 | 35 | 8 | 4 | 3 | 1 | |
Conv | 35 | 8 | 4 | 1 | 43 | 8 | 4 | 3 | 1 | |
Conv | 43 | 8 | 4 | 1 | 51 | 8 | 4 | 3 | 1 | |
GAP | 51 | 8 | 4 | 1 | 79 | 1 | 4 | 8 | 0 |
- Horizontal Flip
- ShiftScaleRotate
- CoarseDropout
- Total Parameters: 150,866
- Best Train Accuracy: 82.18
- Best Test Accuracy: 86.78
- Has the architecture to C1C2C3C40
- Used Dilated kernels here instead of MP or strided convolution in first block
- Total RF is more than 44 (79)
- One of the layers must use Depthwise Separable Convolution
- One of the layers must use Dilated Convolution
- Used GAP and added FC after GAP to target #of classes
- Used albumentation library and applied - horizontal flip - shiftScaleRotate - coarseDropout
- Achieved more than 85% accuracy (86.78), in 50 epochs.
- Total Params to be less than 200k. (150,866)
- Created a modular code