digital brain

Neural Networks with Pytorch

This five-week workshop series was held at the University of York in April and May, 2025. It introduces participants to PyTorch and its applications in deep learning. Designed for researchers and students interested in machine learning, the sessions provide hands-on experience with neural networks, from basic tensor operations to training custom models on real-world data.


Workshop Structure

This repository hosts Jupyter notebooks which take participants from having no understanding of machine learning with Pytorch through to being able to create their own architectures and execute training on their own datasets. This repository also hosts brief slides presented during each workshop session to introduce various concepts.

The broad structure of each session is as follows:

Session 1 - Introduction to Pytorch
  • Get familiar with PyTorch and Tensor operations
  • DNNs and how they work
  • Key terms
  • Using/demoing built-in models
Session 2 - Creating and Training a Neural Network
  • Learn how to define and train a Basic Neural Network
  • The forward pass
  • Layer choices, activation functions, optimisers, and loss functions
  • Implementing the training loop + the backward pass
  • Choice of output-layer activation
Session 3 - Convolutional Neural Networks
  • Learn the fundamentals of CNNs
  • Compare CNNs to MLPs, and learn their use-cases
  • Running models on CPUs vs GPUs

Session 4 - Using your own data
  • Learn how to test and validate your model and bring everything together
  • Writing custom datasets and dataloaders
  • Saving/loading a trained network
  • Training/validation/test splits
  • An exercise on writing a network of your own definition to train on a provided toy dataset.

Session 5 - Advanced concepts
  • Learn more advanced topics and how to tailor your model for a specific project
  • Unsupervised learning with Autoencoders and Variational Autoencoders
  • Writing your own loss function
  • Transfer learning
Audience and Pre-requisites

With hands-on coding exercises and practical demos, this workshop is perfect for early career researchers looking to apply neural networks in their research or deepen their understanding of neural networks and their applications. PhD students and Post-Docs are welcome to take part.

You do not need any experience in machine learning to attend, but Basic Python Programming and some Basic Linear Algebra knowledge is required.



Go to the Neural Networks with Pytorch GitHub repository

How to use this repository

We recommend importing the notebooks into Google Colab, which is generally free, and also allows the use of a certain amount of free GPU time. You may also download the notebooks to run locally, or simply follow along with the tutorials by writing your own code locally.

Return to article index