Regarding the first epoch being slower (mostly when data is on hdd):
  
      stackoverflow.com
  
  
      
    
  

  pytorch DataLoader extremely slow first epoch 42



  python, multiprocessing, pytorch, dataloader



  asked by
  
  
    Slavka
  
  on 05:26AM - 30 Aug 20 UTC


  
  
    
    
  
  


Regarding the post you shared, I actually saw it and tried to transfer my Image folder (of imagenet) to lmdb and using lmdb dataset, it didn’t help much.
I guess due to the shuffle=True in the Dataloader, the OS can’t optimize the caching if it can’t fit the whole data in the RAM