davidADSP / Generative_Deep_Learning_2nd_Edition

The official code repository for the second edition of the O'Reilly book Generative Deep Learning: Teaching Machines to Paint, Write, Compose and Play.
https://www.oreilly.com/library/view/generative-deep-learning/9781098134174/
Apache License 2.0
1.11k stars 418 forks source link

Lesson No. 3: Variational autoencoder code for CelebA dataset takes too long to load #25

Closed loganx-26x closed 10 months ago

loganx-26x commented 10 months ago

Specifically this code,

train_data = utils.image_dataset_from_directory( "celeba-dataset/img_align_celeba/img_align_celeba", labels = None, color_mode="rgb", image_size = (64, 64), batch_size = 128, shuffle=True, seed=42, interpolation="bilinear", )

takes about 20-30 minutes to load all of the 57,000 images from 'img_align_celeba' directory. Is everyone facing this issue or is it just me?

Edit: Attached the image for preview. It took 21 minutes this time as calculated with time module in Python:

image

loganx-26x commented 10 months ago

Issue resolved. I was using CPU instead of GPU on my docker that's why it took this long. Now taking atmost 8-15 seconds. Thanks.

image

loganx-26x commented 10 months ago

We can close this issue for now