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

Connected

Exercise

Splitting data with LightningDataModule

You will complete the setup method in a LightningDataModule. Proper dataset partitioning ensures that the model is trained on one subset and validated on another, preventing overfitting.

The dataset has already been pre-imported.

Instructions

100 XP
  • Import random_split to split the dataset into training and validation.
  • Split the dataset into training (80%) and validation (20%) using random_split.