rasbt / machine-learning-book

Code Repository for Machine Learning with PyTorch and Scikit-Learn
https://sebastianraschka.com/books/#machine-learning-with-pytorch-and-scikit-learn
MIT License
3.64k stars 1.31k forks source link

Chapter 14 #146

Closed AbdelrahimKoura closed 7 months ago

AbdelrahimKoura commented 1 year ago

To load dataset using this statement celeba_train_dataset = torchvision.datasets.CelebA( image_path, split='train', target_type='attr', download=True ) dataset can not load why?

acmoudleysa commented 1 year ago

https://drive.google.com/file/d/1m8-EBPgi5MRubrm6iQjafK2QMHDBMSfJ/view

Use this link.

rasbt commented 7 months ago

Sorry for the hassle here. It's a bit frustrating that it doesn't work out of the box via torchvision anymore.

This was also shared as an issue here: https://github.com/pytorch/vision/issues/1920

What I did is I downloaded the files from here: https://drive.google.com/drive/folders/0B7EVK8r0v71pWEZsZE9oNnFzTm8?resourcekey=0-5BR16BdXnb8hVj6CNHKzLg

For simplicity, you can also use my link here where I already prepared the directory structure: https://drive.google.com/file/d/1m8-EBPgi5MRubrm6iQjafK2QMHDBMSfJ/view?usp=share_link

Download that zip file and place it in the celeba folder. Then unzip img_align_celeba.zip. And it should work:

Screenshot 2024-04-25 at 12 26 31 PM

Let me know in case it still doesn't work, and please feel free to reopen this issue then.