CMSC 373 Artificial Intelligence
Fall 2023


Assignment 4: Hands-on with ConvNets
(Due by start of class on Monday, November 21, 2023)

In this assignment, you will build a ConvNet model to train it to classify handwritten digits. The dataset we will use is the MNIST Digits Dataset. That is available in Keras.
Make sure you have a Google account and are able to navigate to the Google Colab page: https://colab.research.google.com

Part 1: Building and Training the Model

Go to the link: https://colab.research.google.com/drive/1vrpQMN7t59bbDHzlnTATeIPg-VFyEVfI?usp=sharing

First, create a copy in your own Drive by going to the File menu and selecting: Save a copy in drive.
Work through the entire workbook. Try some things of your own (this is why you saved a copy above).
Once done, try the following at the end:

  1. Run the model as defined:

Answer the following questions (provide and use the data obtained by you to answer these):

1. How well does the model fit (accuracy).
2. How does the accuracy you obtained copare with the accuracy you obtained with the backpropagartion network in Assignment 3? Was it more/less/same accurate?
3. How well does the network generalize?

Part 2: Try another model - The CHIFAR 10 Dataset

Go to link: https://colab.research.google.com/drive/1eBZn_xLHuNKG3IjNm7imYja6jBdxUmf0?usp=sharing

The CIFAR-10 and CIFAR-100 are labeled subsets of the 80 million tiny images dataset. They were collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images.

The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another. Between them, the training batches contain exactly 5000 images from each class.

Here are the classes in the dataset, as well as 10 random images from each (you can see some images at the above link):

airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truck

The classes are completely mutually exclusive. There is no overlap between automobiles and trucks. "Automobile" includes sedans, SUVs, things of that sort. "Truck" includes only big trucks. Neither includes pickup trucks.

1. Run the model as defined.

Answer the following questions (provide and use the data obtained by you to answer these):

1. How well does the model fit (accuracy).
2. How well does the network generalize? Use test and validation accuracy plots to answer this.
3. Would it help if we trained the model for 20 epochs? Again, use test and validation accuracy plots to answer this.
4. What happens if we you decrease the number of units in Dense layer from 64 to 8 units? Or, increase to 128 units?

Finally, if you have time and inclination, can you do better by using a different network architecture?


What to Hand In
Hand in a report containing the following:



Back to CMSC 373 Page.