Classification with Convolutional Neural Networks
CIFAR10 classification with a convolutional model with pytorch.
In this task, you should train a CNN model with pytorch to classify CIFAR10 dataset.
Load the CIFAR10 dataset bellow. You can use either torchvision.datasets.CIFAR10
or sklearn.datasets.fetch_openml()
or any other way to load the dataset.
Write your CNN model below using torch.nn
modules. Feel free to add extra cells.
Write the training process below. Instantiate your model, Create an optimizer function such as Adam or SGD, and write your train/validation loop. Then train your model until it converges. Feel free to add extra cells.
Draw two diagrams for train and validat ion, one showing loss of each epoch, and another showing accuracy of each epoch.
Evaluate the best epoch's model (according to the validation accuracy) on the test set, and report the accuracy. Is your model overfitted?
Draw 20 misclassified images from test set with expected and predicted labels.
Plot the confusion matrix for the test set.