ISE529 HW6
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
ISE529 HW6
2024-04-17
1 Guidelines
Submission details: A reminder that you must “knit” the Rscript (and output) using an R notebook (.Rmd file) to create a single PDF file you will hand in on Blackboard. Use the “Knit to PDF” dropdown command in RStudio, and make sure to include any plot output you generated as part of your homework. Also hand in the .Rmd file that created your pdf. As always, please include and comment your code to completely explain what you are thinking.
10 points will be awarded if your .Rmd file does knits to the same PDF you turned in in Blackboard. Note: The computer clusters in Waite Philips Hall (WPH) and Leavey Library (LVL) and free for students to use, and they have RStudio installed and will knit Rmd files to PDF (we just tested this). Make sure you do not hand in a PDF that was converted from a word doc.
There is a total of 60 possible points for this homework.
2 Installation and Environment Setup
Set up the necessary libraries and packages if necessary.
3 Load Libraries
4 CIFAR-10 Dataset
CIFAR-10 is a dataset of 60,000 32x32 color images in 10 classes, with 6,000 images per class. A full description of the dataset can be found here: https://www.cs.toronto.edu/~kriz/.
4.1 Reshape and One-hot Encoding
Prepare the data for neural network input.
5 Question 1: Basic Neural Network (30 points)
5.1 Defining the Neural Network Architecture
5.2 Compiling, Training, and Evaluating the Model (10 points)
5.3 Improving the Model (20 points)
Do you think the model performance can be improved? Explore different techniques such as regularization, dropout and number of neurons in each layer to enhance the model’s performance. Refer to the notebook from lecture on how to implement these techniques. More information can be found here: https://tensorflow. rstudio.com/tutorials/keras/overfit_and_underfit.
5.3.1 Build an new model with a few (2-3) improvements such as regularization, dropout, etc. (10 points)
Things to try:
• Dropout layer: layer_dropout(rate = 0.4)
• Regularization: kernel_regularizer = regularizer_l2(0.001) as a parameter in the layer_dense function
• Adjusting the number of neurons in each layer
• Adding more layers
• Experiment with different activation functions
5.3.2 Check the performance of the improved model (10 points)
How does the improved model perform compared to the basic model? Discuss the results and any insights corresponding to the techniques you used to improve the model.
6 Question 2: Convolutional Neural Network (CNN) (20 points)
In this part, build a CNN to work with the CIFAR-10 dataset and compare its effectiveness against the basic neural network. Refer to the “Revisiting the MNIST Dataset with a Simple Convolutional Neural Network” section from the lecture notebook (April 18) for guidance.
6.1 Building the CNN (10 points)
6.1.1 Fill in the parameters "FILL_THIS_IN" to complete the CNN architecture (5 points)
6.1.2 Explain the CNN Architecture (5 points)
Explain the architecture of the CNN model above. What are the layers used, and what do they do? Explain your reasoning behind the parameters you filled in ("FILL_THIS_IN") in the previous question.
6.2 Training and Evaluating the CNN (10 points)
7 Conclusion (10 points)
Did the CNN model perform significantly better? Discuss the results and explain how the convolutional neural network leverages the spatial information in the images to improve performance. Also, compare the performance of the CNN with the improved basic neural network model.
2024-04-26