Assignments
Project: (due Monday May 9, 2025)
Make a stylized picture. Using a Neural Network.
The goal of the Project is to run the style transfer code from Chapter 12 Section 3 on a picture of interest to you using a style of painting you like.
Next get the code from Chapter 12 Section 3, Neural Style Transfer, to run.
- Step 1: Find the picture to apply the style transfer to.
- Step 2: Replace the sf.jpg image with your own image. Test the code using a smaller number of iterations, change iterations = 4000 to iterations = 200 to start experimenting with the code.
- Extra Credit: Research the algorithm used. Who created it? How is the neural network implemented in Keras?
- Extra Credit: Explain what the following text-to-image Generative AI products do.
- Test out. Dall-e2 or Microsoft Image Creator
- Read the Stable Diffusion Art blog.
- Example Style Transfer:
Midterm: (due Monday May 2, 2025)
Instructions: This is a take-home midterm. Your work is to be completed individually. You may use your book, Google, and questions can be asked of the instructor. You are not to share your code with others in the class.
Using an Quarto Notebook, Python Notebook or Shared Colab Notebook to produce your solutions to questions. Turn in your modified Quarto Notebook for the IMDB code and an updated ver02 of the code provided for question 4, submit your .qmd or .ipynb and a .html, or Shared links. So you should submit three .qmd or .ipynb files and the corresponding .html files.
- When using the Gradient Decent Algorithm and Backpropogation, in which direction do updates move?
- Explain what a Convolutional Neural Network is in words. How does a convnet compare to the traditional feedforward neural network?
- In Section 4.1 of the Deep Learning with R book, the IMDB example is presented. Explain what the data being fitted is and what the input layer does in the neural network used in that section. Run the code from that example, try adding dropout layer(s) to see if the fit can be improved. Explain each chunk of code in your Notebook and explain results of your code.
- Run the code from the book, A Computational Approach to Statistical Learning, from Chapter 8 casl Chapter 8. This example is related to the EMNIST dataset. Read the sample chapter Chapter 8. Use Meld to merge the changes from ver01 into ver02 of the R Notebook. Your assignment is to run the code in ver02 and write clear explanations above each R code chunk. Be sure to explain what a Feed-forward Neural Network is and what the Convolutional layers are. Explain each chunk of code in your Notebook and explain results of your code.
- For the Fashion-MNIST data build the four models from these images. Explain each chunk of code in your Notebook and explain results of your code, which model has the highest test accuracy.
Question 4:
- R Project: Midterm.zip Updated, please download again.
- Spotlight Arxiv Paper: EMNIST: an extension of MNIST to handwritten letters
- Spotlight Software:
- Meld Compare text files.
Homework04: (complete by Monday April 20, 2025)
Using two Quarto Notebook produce your output from running the code from the book in Chapter 8. Render the .qmd files to either Lastname_Firstname_Stat652_hw4.docx or .pdf. Use your own last name and first name in the filename. At the top of your first page you should include Name, Class, Section, and homework assignment.
The header of your Quarto Notebooks should include
---
title: "Stat. 654 Homework 4"
author: "Your name"
date: "April 20, 2025"
format:
html:
embed-resources: true
---
Submit: Submit your Quarto Notebook or shared Colab Notebook. You can share the Colab Notebook with me by providing the links in Canvas. If you use Quarto Notebook, you can submit both your .qmd and .html files. If you use Jupyter Notebooks, you can submit both your .ipynb and .html files. To have your work visible in Canvas your Notebooks need to be .html. I will not be running your .qmd or .ipynb files to view your work. - Read: Chapter 7 and Chapter 8
Problems:
- Run the code in Chapter 8.
- Convnets MNIST
- Convnets Dogs vs Cats
Quiz: (due Friday April 18, 2025)
Build the most accurate Feed-Forward Neural Network, with one or two hidden layer, for the Google Tensorflow Playground XOR data. The Github repository TFPlayground has a tiny version of the NOR data.
Using the numeric columns in the dataset build a classification model for the label variable. Add a dropout layer using a rate of .5 and compare the results without dropout.
See the iris code from Week 1 as a template. Change the iris data to the XOR data. And finally refit the model using a .5 dropout rate.
Submit: Submit your Quarto Notebook or shared Colab Notebook. You can share the Colab Notebook with me by providing the links in Canvas. If you use Quarto Notebook, you can submit both your .qmd and .html files. If you use Jupyter Notebooks, you can submit both your .ipynb and .html files. To have your work visible in Canvas your Notebooks need to be .html. I will not be running your .qmd or .ipynb files to view your work.
- Template Quarto Notebook:
Homework03: (complete by Monday April 14, 2025)
Using three Quarto or shared Colab Notebooks produce your output from running the code from the book in Chapter 5.
At the top of your first page of each Notebook you should include Name, Class, Section, and homework assignment.
The header of your Quarto Notebooks should include
---
title: "Stat. 654 Homework 3"
author: "Your name"
date: "April 14, 2025"
format:
html:
embed-resources: true
---
Submit: Submit your Quarto Notebooks or shared Colab Notebooks. You can share the Colab Notebooks with me by providing the links in Canvas. If you use Quarto Notebooks, you can submit both your .qmd and .html files. If you use Jupyter Notebooks, you can submit both your .ipynb and .html files. To have your work visible in Canvas your Notebooks need to be .html. I will not be running your .qmd or .ipynb files to view your work.
- Template Quarto Notebooks:
- Read: Chapter 5 and Chapter 6
- Problems:
- Watch the YouTube video series 3Blue1Brown Neural Networks
- You can download the code for the book from this link.
- Run the code in Chapter 5 related to the mnist data. Split the code into three Quarto Notebooks. Give a descriptive title to each Notebook. Copy the code into separate code chunks and explain what the code is doing directly above each code chunk.
Homework02: (complete by Monday April 7, 2023)
Using three Quarto or shared Colab Notebooks produce your output from running the code from the book in Chapter 4.
At the top of your first page of each Notebook you should include Name, Class, Section, and homework assignment.
The header of your Quarto Notebooks should include
---
title: "Stat. 654 Homework 2"
author: "Your name"
date: "April 7, 2025"
format:
html:
embed-resources: true
---
Submit: Submit your Quarto Notebooks or shared Colab Notebooks. You can share the Colab Notebooks with me by providing the links in Canvas. If you use Quarto Notebooks, you can submit both your .qmd and .html files. If you use Jupyter Notebooks, you can submit both your .ipynb and .html files. To have your work visible in Canvas your Notebooks need to be .html. I will not be running your .qmd or .ipynb files to view your work.
- Template Quarto Notebooks:
- Read: Chapter 3 and Chapter 4
- Problems:
- You can download the code for the book from this link.
- Make three separate Quarto Notebooks or shared Colab Notebooks for the three examples from Chapter 4.
Homework01: (complete by Monday March 24, 2025)
Using four separate Quarto or shared Colab Notebooks produce your output from running the code from the examples and from the book Chapter 2.
At the top of your first page of each Notebook you should include Name, Class, Section, and homework assignment.
The header of your Quarto Notebooks should include
---
title: "Stat. 654 Homework 1"
author: "Your name"
date: "March 24, 2025"
format:
html:
embed-resources: true
---
Submit: Submit four Quarto Notebooks or shared Colab Notebooks. You can share the Colab Notebooks with me by providing the links in Canvas. If you use Quarto Notebooks, you can submit both your .qmd and .html files. If you use Jupyter Notebooks, you can submit both your .ipynb and .html files. To have your work visible in Canvas your Notebooks need to be .html. I will not be running your .qmd or .ipynb files to view your work. - Github: - Deep Learning with R Notebooks - Deep Learning with Python Notebooks
- Template Quarto Notebooks:
- Read: Chapter 1 and Chapter 2
- Install R and RStudio, if you do not have them installed. Run the reticulate::install_python() to download and install a version of Python that is compatible with Tensorflow.
- Install the R packages tensorflow and keras (for use with a CPU).
- Problems:
- Run the cars Example.
- Run the concrete Example.
- Run the iris Example.
- Run the code in Chapter 2 related to the mnist data. You can download the code for the book from this link. Copy the code into separate code chunks and explain what the code is doing directly above each code chunk. Do not include the other code that is not related to the mnist data.