Hello everyone! I have a very huge data of image, so huge that 10 seconds need to create one  batch.
For solving this problem i decided to use parameter “num_workers” in torch.utils.data.DataLoade.  For example:
trainset = datasets.ImageFolder(data_dir, data_transforms)
train_loader = torch.utils.data.DataLoader(trainset, batch_size=256, shuffle=True, num_workers=4)
But It works only for small batch size, for example for 32 workers, but for 64 it  does not work. For batch size like 64 it works only for num_workers=0
Can you help me and explain for me such phenomena?