Solved by Mona_Jalal in post #2 
              
              
                Changing the batch_size from 64 to 2 here solved the problem: 
train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=2, shuffle=True, num_workers=4)