L1 and L2 regularization are popular methods that can be used in deep learning in order to reduce overfitting. As a result, they help the model generalize better on data it hasn't seen before. In this video, I tried to train a CNN using both L1 and L2 regularization and reduce overfitting in the process. I have used FashionMNIST data for this tutorial. I haven't typed up the code from scratch as usual because I've previously made a video on CNN.
GitHub address: https://github.com/randomaccess2023/M...
If you're interested, you can check out my previous video on CNN where I have typed up the code from scratch: • Build a Convolutional Neural Network (CNN)...
The only difference is that in my previous CNN video, I used the USPS dataset which has a spatial dimension of 16 x 16 pixels but in case of FashionMNIST, the spatial dimension is 28 x 28 pixels. For this reason, some hyperparameters during CNN construction were changed, which is basically the major difference.
#python #datascience #cnn #l1regularzation #l2regularization #fashionmnist #pytorch #deeplearning #imageclassification #jupyternotebook #greyscaleimages #neuralnetwork