Solved by Abhilash_Srivastava in post #2 
              
              
                modify this to: 
for batch_idx, sample in enumerate(dataloader):
        data, target = sample['data'].cuda(), sample['target'].cuda() # or something similar