Unable to load SVHN dataset

When I try to load SVHN dataset with “svhn=dset.SVHN(root=“SVHN”, download=True)” I get this error: AttributeError: ‘module’ object has no attribute ‘SVHN’
(I can load CIFAR10 and other datasets.)

Even when I manually add the svhn.py (from vision/torchvision/datasets) to my working folder, I get this error “TypeError: batch must contain tensors, numbers, or lists; found <type ‘numpy.uint8’>” when I try to iterate through the data loader.

update your torchvision to master via:

pip install https://github.com/pytorch/vision/archive/master.zip

That should fix it.

tried the method mentioned, still

module ‘torchvision.datasets’ has no attribute ‘FashionMNIST’

1 Like