data = DataLoader(dataset, batch_size = 8, num_workers = 4, pin_memory = True, shuffle = True, drop_last = False)

@Minseok for instance lets consider the above DataLoader, in order to enable batch shuffling you need to pass shuffle = True…num_workers, batch_size, pin_memory depends on your hardware, optimal selection of these parameters reduce the overheads and loads the data from CPU to GPU faster.