Could you post your code please?
This small example works for me:
dataset = datasets.MNIST(root='./data',
                         download=False,
                         transform=transforms.ToTensor())
loader = DataLoader(dataset)

for i, data in enumerate(loader):
    print(i)