Creating Custom Dataset with LightningDataModule

prepare_data function is not designed to return anything. It is used to handle functionality like downloading the data and saving to your disk, etc. It is for stuff before you do any functions on the data.

If you already have all the data downloaded and are in place for further steps, then you can even skip defining this function.

Use this method to do things that might write to disk or that need to be done only from a single GPU in distributed settings.

taken from the documentation

1 Like