I just tried this basic sanity check, and it seems to work fine:
import torch
import torchvision
a=torchvision.datasets.MNIST(root='.', download=True, transform=torchvision.transforms.ToTensor())
iter(torch.utils.data.DataLoader(a)).next()

for some reason dataiter in your case is remaining an inbuilt function, i’m not sure why.