Episode 4: Implementing a PyTorch Trainer: PyTorch Lightning Trainer and callbacks under-the-hood

This is the 4th video in our PyTorch Lightning MasterClass, taking you from basic PyTorch to all the latest AI best practices with PyTorch Lightning.

In the previous video, we create a PyTorch classification model from scratch and set up training on GPUs using the lightning trainer: https://youtu.be/OMDn66kM9Qc

To understand how the lightning trainer works, in this video we have implemented a simplified version of the trainer, step by step. Then we’ll explain what are callbacks, model hooks, and how you can use callbacks to make your code more readable and reusable.

Alfredo Canziani is a Computer Science professor at NYU (check out his deep learning class -https://www.youtube.com/playlist?list….)
Willam Falcon is an AI Ph.D. researcher at NYU, and creator and founder of PyTorch Lightning.

Chapters:
00:00 Introduction
01:44 Installs and imports
02:07 loading data
02:30 Defining the model and optimizers
04:29 Building the Trainer
05:13 Defining the fit hook
09:45 Lightning Trainer under the hood
10:59 LightningModule hooks
14:58 LightningModule training step hook
18:40 What are callbacks
21:28 Implementing a smiple callback

Thanks for watching!

Source of this PyTorch Lightning Video

AI video(s) you might be interested in …