You don’t need to use multiprocessing manually and can simply set the num_workers in your DataLoader to a larger number than 0.
This will use multiprocessing under the hood and each worker will load a complete batch in the background.