Help!!
Similar problem is happening to me when
I used directory processed_celeba/ when loading images from folder.
but surprisingly , when i used the original celeba dataset and unzipped in same folder as directory as

- processed_celeba/
      - celeba

It works finely,
but when i used my own celebrity dataset images and stored in processed_celeba/celeba/
Started throwing error as above.
Thanks for help  .

def get_dataloader(batch_size, image_size, data_dir='processed_celeba_small/'):
    transformed = transforms.Compose([
    transforms.Resize(image_size),
    transforms.ToTensor(),
    ])
    data = datasets.ImageFolder(data_dir, transform=transformed)  
    dataloader = torch.utils.data.DataLoader(data, batch_size=batch_size,  shuffle=True, num_workers=0)
    return dataloader