Can't load images using ImageFolder


I’m trying to load images using “ImageFolder”.

data_dir = './train_dog'          # directory structure is    train_dog/image
dset = datasets.ImageFolder(data_dir, transform)
train_loader =, batch_size=128, shuffle=True)

However, it seems not working. So I checked the stored data as below

print dset[0][0]

Then it shows only 3 tensors(size 64x64).
[torch.FloatTensor of size 3x64x64]

There are more than 10,000 images in the folder. How come it can’t store all data?