Solved by rasbt in post #2 
              
              
                When should I do this based on  Dataset  class? Should I do my processing step in  __getitem__() ? If yes, would it be parallel and fast? 

Yes. the __getitem__ calls are the ones run in parallel. Here’s some example: 
class CelebaDataset(Dataset):
    """Custom Dataset for loading CelebA face imag…