CSE 4311 - Neural Networks and Deep Learning
Spring 2025 Schedule and Lecture Slides
NOTE: the schedule of future lecture topics is tentative and subject to change.
- Mon 01/13: Lecture 1.
- Topics: Syllabus Overview, Introduction to Machine Learning.
- Slides: Overview of course syllabus. PPT, PDF.
- Slides: Using Microsoft Teams. PPT, PDF.
- Slides: Introduction to Machine Learning. PPT,
PDF.
- Wed 01/15: Lecture 2.
- Topic: Introduction to Machine Learning (continued).
- Fri 01/17: Lecture 3.
- Topic: Introduction to Neural Networks.
- Slides: Neural Networks, Introduction.
PPT,
PDF.
- Wed 01/22: Lecture 4.
- Topic: Introduction to Neural Networks (continued).
- Fri 01/24 - Lecture 5.
- Topic: Optimization, Gradient Descent.
- Slides: Optimization and Gradient Descent.
PPT,
PDF.
- Mon 01/27: Lecture 6.
- Wed 01/29: Lecture 7.
- Topics: Google Colab, numpy, Training Perceptrons, Multiclass Problems.
- Slides: Using Google Colab.
PPT,
PDF.
- Slides: Introduction to numpy.
PPT,
PDF.
- Code: numpy_examples.py or notebook version numpy_examples.ipynb: Some basics of using the numpy library.
- Code: numpy_benchmarks.py. Simple benchmarks comparing the running time of doing array operations using built-in numpy functions with the running time of code written in standard python using loops.
- Slides: Training Perceptrons, Multiclass Problems.
PPT,
PDF.
- WEDNESDAY JANUARY 29: CENSUS DATE.
- Fri 01/31: Lecture 8.
- Topic: Training Perceptrons, Multiclass Problems (continued).
- Mon 02/03: Lecture 9.
- Topic: The Backpropagation Algorithm for Training.
- Slides: Neural Networks: Training with Backpropagation.
PPT,
PDF.
- Wed 02/05: Lecture 10.
- Topic: The Backpropagation Algorithm for Training (continued).
- Fri 02/07: Lecture 11.
- Topic: The Backpropagation Algorithm for Training (continued), UCI Datasets.
- Slides: The UCI Datasets Used in the Assignment.
PPT,
PDF.
- Data: The UCI Datasets. You can download the entire directory as a ZIP file from this link: uci_datasets.zip.
- Mon 02/10: Lecture 12.
- Topic: Introduction to Tensorflow and Keras.
- Slides: Keras and Colab.
PPT,
PDF.
- Code:
- uci_data.py: a file containing some helper functions for loading UCI datasets.
- keras_101.py: code that implements multi-layer neural networks in Keras, with fully connected layers and the sigmoid activation function.
- keras_102.py: a longer version of keras_101.py, that includes data normalization and computing the output of the trained model given an input vector.
- Wed 02/12: Lecture 13.
- Topic: Expanding Our Options in Building Neural Networks: Activation Functions, Loss Functions, Optimizers, Batch Size, Dropout.
- Slides: Various Options for Building Neural Networks.
PPT,
PDF.
- Fri 02/14: Lecture 14.
- Topic: Images and Convolutions.
- Slides: Images and Convolutions.
PPT,
PDF.
- Code:
- mnist_dense1.py. Code that trains and tests a neural network on the MNIST dataset. There is one hidden layer, fully connected. Here, a "Flatten" layer is used to vectorize the images.
- mnist_dense2.py. A variation of the previous code. Here, we explicitly vectorize the images using the numpy reshape method.
- Mon 02/17: Lecture 15.
- Topic: Images and Convolutions (continued).
- Wed 02/19: Lecture 16.
- Topic: Images and Convolutions (continued).
- Fri 02/21: Lecture 17.
- Topics: Images and Convolutions (continued), Convolutional Neural Networks.
- Slides: Convolutional Neural Networks.
PPT,
PDF.
- Code: keras_cnn_mnist.py. Defines a convolutional neural network using Keras, trains and tests the network on the MNIST dataset.
- Mon 02/24: Lecture 18.
- Topic: Convolutional Neural Networks (continued).
- Wed 02/26: Lecture 19.
- Topic: Transfer Learning.
- Slides: Transfer Learning.
PPT,
PDF.
- Code: tl_mnist.py. An example of transfer learning, using information from five classes of the MNIST dataset to improve classification accuracy on the other five classes.
- Code: utilities_300.py. Defines some auxiliary functions used in tl_mnist.py.
- Code: mnist_vgg.py. An example of transfer learning, where we start with a VGG-16 model, pretrained on ImageNet, and we build a model to recognize five MNIST classes using only 100 training examples from MNIST.
- Code: cifar_vgg.py. An example of transfer learning, where we start with a VGG-16 model, pretrained on ImageNet, and we build a model to recognize classes in the CIFAR10 dataset, using only 1000 training examples from CIFAR10.
- Fri 02/28: Lecture 20.
- Topic: Transfer Learning (continued).
- Mon 03/03: Lecture 21.
- Topic: Transfer Learning (continued).
- Wed 03/05: Lecture 22.
- Fri 03/07: Lecture 23.
- Topics: Time Series (continued), Recurrent Neural Networks.
- Slides: Recurrent Neural Networks.
PPT,
PDF.
- Mon 03/17: Lecture 24.
- Topic: Recurrent Neural Networks (continued).
- Wed 03/19: Lecture 25.
- Topic: Text Classification with Bags of Words.
- Slides: Text Classification with Bags of Words.
PPT,
PDF.
- Data: aclImdb.zip. A zip file containing the Large Movie Review Dataset. The data contained in the zip file has been processed as described in the slides, to remove the aclImdb/train/unsup directory, and to create a validation set of 5,000 files.
- Code: movie_preprocessing.py. This is for reference only, you should NOT run it on the aclImdb.zip data. This is the code that was used to create the validation set in the aclImdb.zip file.
- Code: text_bow.py. This is the code contained in the slides, that vectorizes text, creates bag-of-words vectors, and uses those vectors to train and test a neural network model.
- Fri 03/21: Lecture 26.
- Topic: Text Classification with Bags of Words (continued).
- Mon 03/24: Lecture 27.
- Topic: Text Classification with Bags of Words (continued).
- Wed 03/26: Lecture 28.
- Topic: Text Classification with Bags of Words (continued).
- Code: text_tfidf.py. This is
code that vectorizes text documents using the TF-IDF method, and then trains
and tests a fully connected model using those vectors.
- Fri 03/28: Lecture 29.
- Topics: Functional API, Text Classification with RNNs and Word Embeddings.
- Slides: The Functional API.
PPT,
PDF.
- Slides: RNNs and Word Embeddings.
PPT,
PDF.
- Code: functional_api.py. This code shows examples of using Keras's Functional API to create some simple models.
- Code: text_rnn.py. Code training and testing RNN models for the movie review dataset. One RNN uses word embeddings.
- Code: glove.py. Code training and testing an RNN model using pre-trained GloVe word embeddings.
- Data: download and unzip this GloVe embeddings file, which is about 822MB in size.
- FRIDAY MARCH 28: LAST DAY TO DROP CLASSES. Submit requests to advisor prior to 4:00 pm.
- Mon 03/31: Lecture 30.
- Topic: Sequence-to-Sequence Translation with RNNs.
- Slides: Sequence-to-Sequence Translation with RNNs.
PPT,
PDF.
- Code: rnn_seq2seq_train.py. This code shows how to train an RNN model that translates from English to Spanish. It takes about 9 hours to run on my computer. Before running it, make sure you download and unzip the spa-eng.zip file from the link below.
- Code: rnn_seq2seq_test.py. This code loads an RNN from file, and uses it to translate English text to Spanish. This way you can experiment with a trained model without having to run the training code. Before running it, make sure you download the model and all data files from the links below.
- Code: tv_to_file.py. Auxiliary code, used in both training and testing, to ensure that the text vectorization layers are identical in both cases.
- Data: spa.txt. The dataset that we use for our English to Spanish application. You can also download it as a ZIP file from this link: spa-eng.zip.
- Data: eng_spa_train.txt. The training set used for training the model below. You need to download this file to run the code in rnn_seq2seq_test.py.
- Data: eng_spa_test.txt. The test set used in rnn_seq2seq_test.py.
- Model: eng_spa_rnn.keras. A Keras RNN model for translating English to Spanish, that was trained using the code in rnn_seq2seq_train.py. It took about 9 hours to train that model on my computer.
- Wed 04/02: First Midterm Exam
- Fri 04/04: Lecture 32.
- Topic: Sequence-to-Sequence Translation with RNNs (continued).
- Mon 04/07: Lecture 33.
- Topic: Sequence-to-Sequence Translation with RNNs (continued).
- Wed 04/09: Lecture 34.
- Topic: Transformers.
- Slides: Transformers.
PPT,
PDF.
- Code: self_attention.py. Code to compute self-attention scores using GloVe word embeddings. You will also need to download and unzip this GloVe embeddings file, which is about 822MB in size, and was also posted on an earlier lecture.
- Code: transformers_common.py. Auxiliary code that is used in the case studies below.
- Code: tv_to_file.py. Auxiliary code that is used in the case studies below.
- Case study: a transformer model for movie review classification:
- Fri 04/11: Lecture 35.
- Topic: Transformers (continued).
- Mon 04/14: Lecture 36.
- Topic: Transformers (continued).
- Wed 04/16: Second Midterm Exam
- Fri 04/18: Lecture 38.
- Topic: (Optional Material) Transformers for Sequence-to-Sequence Translation.
- Slides: Transformers for Sequence-to-Sequence Translation.
PPT,
PDF.
- Case study: a transformer model for English-to-Spanish translation:
- Mon 04/21: Lecture 39.
- Topic: (Optional Material) Generative Adversarial Networks (GANs).
- Slides: Generative Adversarial Networks.
PPT,
PDF.
- Case study: a GAN network that learns to generate MNIST-like images of digits:
- Code: mnist_gan.py. Code for training the GAN model on MNIST images. The simpler model (versions v1 of the discriminator and generator) takes about 3 minutes per epoch. Version 2 of the model takes about 15 minutes per epoch.
- Code: celeba_gan.py. Code for training the GAN model on CelebA face images. I did not run this code for more than a fraction of an epoch, it was taking about 13 hours per epoch on my desktop computer.
- Results: mnist_results_v1.zip. These are results from training the simplest version of the model. The folder includes 10 generated images for each of the 100 epochs of training.
- Results: mnist_results_v2.zip. These are results from training the second version of the model, that has more parameters. The folder includes 10 generated images for each of the 100 epochs of training.
- Wed 04/23: Lecture 40.
- Topic: (Optional Material) Gradient Ascent for Adversarial Inputs and Network Visualization.
- Slides: Gradient Ascent.
PPT,
PDF.
- Case study: using gradient ascent to change images in a way that tricks a model to misclassify them:
- Code: adversarial_input.py. Implementation in Tensorflow.
- Results: adversarial_imagenet.zip. The data folder contains 24 real images from the ImageNet dataset. Folder generated_200_1_7 contains 24 real images and 264 generated images, produced using learning_rate = 1. Folder generated_200_10_7 contains 24 real images and 264 generated images, produced using learning_rate = 10. See the slides for more details on these images.
- Case study: using gradient ascent to visualize the behavior of filters in convolutional layers:
- Code: gradient_ascent_mnist.py. Implementation in Tensorflow.
- Base model: mnist_cnn_1.keras. This is a convolutional model pre-trained on the MNIST dataset. The code computes images that maximize the resposes of specific filters in this convolutional model.
- Fri 04/25: Lecture 41.
- Topic: (Optional Material) Hand Pose Estimation and Segmentation.
- Slides: Hand Pose Estimation and Segmentation.
PPT,
PDF.
- Mon 04/28: Lecture 43
LAST DAY FOR HOMEWORK RESUBMISSIONS IS TUESDAY APRIL 29, AT 11:59PM.
THERE WILL BE NO FINAL EXAM.
Back to the CSE 4311 home page.