If you are lazily loading and transforming the data, you could save each sample in your __getitem__ method.
However, I don’t think this is a good idea, as you will just store the same number of samples after preprocessing and transforming them.
If your workload is large enough (i.e. if your model is not a small one and the GPU needs some time for the training), your data loading and processing might be fast enough to provide batches in the background.
Are you seeing a data loading bottleneck at the moment?