1. Learn
  2. /
  3. Courses
  4. /
  5. Scalable AI Models with PyTorch Lightning

Connected

Exercise

Running the Lightning Trainer

Now that you have your model defined, you are ready to configure the Lightning Trainer to run a training loop. This exercise helps you understand how to integrate your model, data loaders, and training configurations - mastering this setup is essential before moving on to more advanced training.

The torch and lightning.pytorch, imported as pl, have been preloaded for you. A model has already been initialized, using the class you defined in the previous exercise.

Instructions

100 XP
  • Configure the Trainer with 3 epochs.
  • Start a training run with the predefined model.