Computer Lab

The topic of this year's computer lab is deep learning. The lab is carried out in groups of two students. To pass the course, you must pass the computer lab. No written report is required, but you need to come to the lab session, work actively on the material and complete the lab to pass. The lab is graded (U/G) based on the students presenting their solutions to the teacher at the end of the lab session. The mandatory preparatory exercises must be completed and submitted to Studium before the first scheduled lab session.

Important Deadlines: 

Lab group sign-up and the Studium page where you submit the preparatory exercises will be published closer to the lab.

• 18th of February: Sign up to a lab group

• 28th  of February: Submit your solutions to the preparatory exercises 

The goal of this laboratory work is to:

• Learn how to build and train a neural network
• Learn how to improve the neural network model and its training.
• Application 1: Learn how to classify hand-written digits using neural networks.
• Application 2: See how a state-of-the-art deep neural network performs at classifying real-world images
• Get a glimpse of a state-of-the-art software library (PyTorch) for deep learning.

The lab instructions and other lab materials can be found at the bottom of this page. You are welcome (and recommended) to start looking at the lab material before the lab session. This will make the lab session more efficient. If you complete the lab before the lab session, you can come to the session to present your solutions to the teacher. 

Lab groups:

Make sure you sign up for the session you wish to attend. The schedule will be found below closer to the lab.

Group 1-25:         Mon 3/3         13.15 - 17.00  
Group 26-50:       Tue 4/3           08.15 - 12.00    
Group 51-75:       Wed  5/3        13.15 - 17.00  
Group 76-100:     Thu 6/3          08.15 - 12.00   
Group 101-125:   Thu 6/3         13.15 - 17.00
Group 126-150:   Fri  7/3           08.15 - 12.00  

Preparatory exercises:

1. Read Chapter 6 and Section 5.4 in the SML course book.

2. Read Chapters 1 and 2 in the lab instructions. If you are new to PyTorch, have a look at the Introduction to PyTorch notebook before the lab session. Reading and running the notebook is highly recommended since it introduces important concepts and commands that are required in the lab session. The instructions and introduction notebook can be found at the bottom of this page. 

3. Read Chapter 3 in the lab instructions. Solve the preparatory exercises found in this chapter and submit your solutions on Studium. You can discuss the preparatory exercises with other students, but each student must submit their solutions. The deadline for submitting the solutions to the preparatory exercises is stated above.

4. (Optional) Feel free to start working on the main part of the lab before the lab session. Since the lab can be time consuming for many students, we recommend getting familiar with the problem formulation of the lab by working through the lab exercises 4.1.1-4.1.3 before the lab session. This can help avoid a presentation queue at the end of the lab session, if many groups finish at the same time. If you choose to start working on the lab before the lab session, please work together in your lab group.

Installation:

We recommend using Google Colab to work with PyTorch online. This cloud platform also optionally provides access to GPUs which might speed up some computations. Another option is to work locally. PyTorch is installed on the Linux systems in the computer rooms where the laboratory session is scheduled. You can use these computers during the lab or bring your own computer. If you choose to use your own computer, you must have PyTorch properly installed before the lab (or use Google Colab). The lab assistants will not be able to assist you with the installation process during the lab. Please consult the PyTorch documentation for more information about the installation procedure.

Topic Material

Prepatory exercises

lab_instructions.pdf Download lab_instructions.pdf

Lab instructions

instructions.pdf Links to an external site.
Introduction to PyTorch

Notebook Links to an external site.

Open in colab Links to an external site.

mnist_onelayer.ipynb 

Notebook Links to an external site.

Open in colab Links to an external site.

ResNet.ipynb

Notebook Links to an external site.

Open in colab Links to an external site.

CLIP.ipynb

Notebook Links to an external site.

Open in colab Links to an external site.