Solved by ptrblck in post #4 
              
              
                I’m still unsure, what might be causing the issue, as this code snippet works fine for me: 
import torch
from torch.utils.data import Dataset, DataLoader, TensorDataset

print(torch.__version__)
dataset = TensorDataset(torch.randn(100, 1), torch.randn(100, 1))
loader = DataLoader(dataset, batch_size…