: A function that processes the images (e.g., converting them from PIL images to PyTorch tensors). 2. Preparing the Data for Training
: The path to the folder where the data will be saved. If the folder doesn't exist, PyTorch will create it.
To download the dataset, you use the torchvision.datasets.CIFAR10 class. The most critical parameter is download=True , which triggers the automatic download if the files aren't already in your specified directory.
Simply downloading the data isn't enough for training; you need to normalize it and prepare batches using a DataLoader . Data Normalization
: When True , PyTorch checks the root directory. If it doesn't see the data, it pulls it from the internet.