Get startedGet started for free

Usage of the LightningModule

The LightningModule is at the core of PyTorch Lightning's approach to structuring deep learning projects. It centralizes model architecture, forward passes, and training logic, leaving the orchestration of training loops and device configuration to the Trainer.

Which statement best describes the main role of the LightningModule in PyTorch Lightning?

This exercise is part of the course

Scalable AI Models with PyTorch Lightning

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise