$24
1. Instructions
In this assignment, you will construct an image classifier using a Convolutional Neural Network (CNN).
Download the Fashion-MNIST dataset (https://github.com/zalandoresearch/fashion-mnist). Normalize the data such that pixel values are floats in [0, 1], and use the normalized data for all of the following questions.
1.1. CNN
Train a convolutional neural network on the training data with the following layer specifications:
• 2D convolutional layer, 28 filters, 3x3 window size, ReLU activation
• 2x2 max pooling
• 2D convolutional layer, 56 filters, 3x3 window size, ReLU activation
• fully-connected layer, 56 nodes, ReLU activation
• fully-connected layer, 10 nodes, softmax activation
Use the Adam optimizer, 32 observations per batch, and sparse categorical cross-entropy loss. Use the train and test splits provided by fashion-mnist. Use the last 12000 samples of the training data as a validation set. Train for 10 epochs.
• Print the number of trainable parameters in the model
• Evaluate training and validation accuracy at the end of each epoch, and plot them as line plots on the same set of axes.
• Evaluate accuracy on the test set.
• Show an example from the test set for each class where the model misclassifies.
• Comment on any other observations about the model performance