Solved by Blueberry in post #2 
              
              
                when you use SubsetRandomSampler it by defaults suffles the dataset so you can’t use shuffle while using it. 
train_loader = DataLoader(dataset=hotdog_dataset_train,  batch_size=8)
val_loader = DataLoader(dataset=hotdog_dataset_val, batch_size=8)

Should work. 
Or you can directly use following comm…