Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
INSTRUCTIONS:
1. This paper consists of 5 pages with 2 Questions only.
2. You may use deep learning library/toolbox to solve the problem. However, you must describe
the related information such as name, version etc in the introduction part.
3. Submit a report containing the following items:
Example:
Introduction: A brief introduction of the problem.
Problems and Solution
Discussion
Conclusion
Remark: Introduction and conclusion only write once in the report.
4. Use English in the report.
5. Attach your code as an appendix. You may show the code snippet (not whole code) to aid your
explanation.
Question 1: AlexNet with CIFAR-10
In this question, we will adopt AlexNet discussed in the lecture. We will use CIFAR-10 dataset.
You can find the tutorial for how do you train a
CNN with CIFAR-10 according to the specific deep learning library [1]-[4]. Most of the major
deep learning libraries (Tensorflow, Pytorch, MATLAB) come with a tutorial with CIFAR10
example.
You should have good knowledge on AlexNet architecture so that you can modify the
hyperparameters in the network according to the CIFAR 10 characteristics.
Train a standard AlexNet with CIFAR 10 via CE loss. Note the following:
? Modify output layer (Softmax layer) to 10 nodes, correspond to 10 classes in CIFAR-10.
? Use original CIFAR 10 images (32 x 32 x 3) to input AlexNet. With this input size, you will
find feature map vanishes at the last conv layer, so modify the stride number, padding etc.
? If you face insufficent memory problem, modify the filter size, channel numbers, number of
neurons in the FC layers.
? What you cannot change is the architecture (5 conv layers, 3 max pooling layers and 2 FC
layers).
(a) Describe training setup eg. data pre-processing/augmentation, initialization, hyperparameters
such as learning rate schedule, momentum, dropout rate, batch number, BN etc. Present them
systematically in the table form.
(b) Fill in the table below to show the weights and neurons of each layer in your modified
AlexNet network.
(c) Plot the following:
? Training and test loss (not classification accuracy) vs epoch.
? Classification accuracy on the training and test set vs epoch.
(d) Fill the table with the final accuracy that you obtained.
Training Accuracy (%) Testing Accuracy (%)
Remark:
1. The testing accuracy should be at least 75% and above. With proper tuning the network
hyperparameters, data augmentation, BN etc you can achieve more than 85%.
2. The different of training accuracy and testing accuracy should not more than 10% only.
3. The generalization techniques discussed in the lecture would be helpful. The score for this part
is proportional to the accuracy that you can obtain. Note the accuracy values should be consistent
to the graph shown in (c). If no graph is shown, answer in (d) is discounted.
(e) Discuss the issues that you experienced and the effort that you’ve taken to overcome them.
This could be non-convergence training or/and poor testing accuracy etc.
Remark: If your machine is slow in solving this question due to CPU or poor GPU, consider
Google Colab if you are using Python.
Question 2: Transfer Learning
Now we want to see whether the features of AlexNet developed in Question 1 can transfer to other
domain. Here we use imdb_wiki face dataset (subset) that consists of 100 subjects with 30
samples per subject as target dataset. Note this is the case where source and target data are
dissimilar and small in size, relative to CIFAR 10.
(a) First, based on the model that has been trained with CIFAR 10, re-train the last (softmax)
layer in the prebuilt network in question 1 with face training samples (20 samples per subject).
This is equivalent to you freeze the rest of the layers in the network and replace with a new
(linear) classifier for face. Note number of output nodes should change to 100 instead of 10.
This serves as a baseline model. Evaluate the baseline model with face test set, which
composed of 10 samples per subject.
(b) Then, try to fine tune/remove/retrain chosen convolution and/or FC layers. Create three models
with different trials. Fill in the table below. Evaluate the model with face test set.