Solved by Vishal_Mhasawade in post #4 
              
              
                Hi, 
I managed to solve the problem. I still don’t know what went wrong with the torch data loader internally but here is what worked for me. 
When I was creating dataset class instance, I was doing something like this 
train_dataset = Generator(cfg, mode='Train')

In the init() function of Generato…