Lab 10: Pytorch

2025-07-23

In today’s class, we will learn the basics of PyTorch, a popular deep learning framework, and use it to build and train a simple Multi-Layer Perceptron (MLP) model.

We will cover:

  • Basic PyTorch tensors and operations
  • Defining an MLP model using nn.Module
  • Setting up loss functions and optimizers
  • Training
  • Improving your model (mini-batch, dropout)
  • Evaluating model performance on a validation set

Please find this file

Exercise

You can find the training set from the following links:

Try to build your own model and let’s see whose model is the best on test set!

Test set: