Assignment Task
Introduction
In this assessment, you will experiment with convolutional neural network (CNN) classifiers using an MNIST-like dataset based on American Sign Language. This is a dataset that contains images of hands in poses corresponding to letters in American Sign Language. You will build several different networks, fit them to data, optimise some of the hyper-parameters and evaluate the results obtained by these classifiers. These are the same processes that you would go through in practice whenever you use deep learning.
Questions about this assessment can be posted to the Assessment 3 Discussion Board and you should consult the assessment rubric when preparing your submission.
Purpose
This assessment will provide you with the opportunity to:
- apply convolutional neural networks to an image classification problem
- develop practical skills in Keras/Python for building and training a variety of deep learning architectures
- demonstrate informed analysis of performance and
Your tasks
This assessment is divided into five parts:
- Load and inspect the data
- Build and train a CNN
- Hyper-parameter optimisation
- ResNet
- Final evaluation
Directions
1. Load and inspect the data
You will use a dataset that contains images of hands in poses corresponding to letters in American Sign Language. Each image is small (similar to MNIST size) and you will build a CNN classifier (using Keras) to determine the corresponding letter for an image.
Description
- Load the dataset. Look at examples of the images and the summary statistics and information for the class labels.
- Scale the image values appropriately.
- Deal with missing labels by either making sure that the label values are continuous or converting to a representation where the numerical label values do not matter.
- Split the _test_ labels and images into separate validation and testing datasets according to a 50/50 split. We will use all of the training dataset for training.
- Question: Why are we splitting the test set up rather than the training set in this case? Hint: look at the description of how the dataset is constructed.
2. Build and train a CNN
- Build a CNN using Keras that has the following settings:
- Layers: Conv32 - MaxPooling - Conv64 - MaxPooling - Conv128 - MaxPooling - Flatten - Output Note that Conv32 means a convolutional layer with 32 filters, etc.
- 3x3 kernel size,
- ReLU activation functions for hidden layers,
- No dropout layers,
- BatchNorm layers in appropriate places.
- Explain the reasoning behind your choice of placement for the BatchNorm layers.
- Train this network using appropriate data and metrics. The following settings should be used in training:
- Nadam optimiser,
- Learning Rate Schedule exponential (see Module 4 Exercise),
- Early stopping.
- Display the learning curves, confusion matrix and final performance values.
3. Hyper-parameter optimisation
Take the base network from the previous part and perform separate hyper-parameter optimisation over the following two choices. In both cases, leave all other configurations constant.
Description
- Optimise the L2 regularisation on the kernels in all. Test the following weight values: 1e-5, 1e-4, 1e-3, 1e-2, 1e-1.
- Try a different number of layers and layer sizes. In particular, do the following: (a) smaller layer sizes (Conv16, Conv32, Conv64); (b) two layers only (Conv32, Conv64); (c) two layers and smaller sizes (Conv16, Conv32).
- Display your results as two plots of the performance versus the hyper- parameter value(s). Practise unambiguous and organised visualisation by labelling the axis, using a legend, title, axis limits and suitable marker and line styles. Be sure to choose the axis limits, such that the important parts of the data are clearly visible.
- Question: What are the best hyper-parameter values to use? Where is this shown in the diagrams and outputs generated above?
4. ResNet
In this part, you will implement a ResNet version that is similar to the network in Part 2. Use the same settings as were used in Part 2 in general, but each Conv layer will be replaced by a residual module that, internally, contains two Conv layers. Note that you will need to use the functional form of Keras models for this. An introduction to ResNets is in Module 6.
Description
- Write a function that builds residual modules with two convolutional layers and a skip connection that adds the input to the output of the second layer, prior to the use of the activation function.
- Build a new network, similar to the one from Part 2, but replace the convolutional layer pairs in the network with ResNet modules.
- Train this new network to the Sign Language dataset.
- Display your learning curves and final performance results.
- Question: What do you conclude about the fitting and the results that you have obtained (i.e. is the ResNet similar, better or worse than previous networks) and what reason would give for this?
5. Final evaluation
Description
- Choose the best network (from all the options you have explored above in Part 2, 3 and 4) and explain your reasons, and then evaluate the final performance results.
- Calculate the confusion matrix and show the matrix graphically.
- Which class is most often incorrectly classified? Explain your reasoning.
This IT Computer Science has been solved by our PhD Experts at My Uni Paper.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction