PacktPublishing / Deep-Learning-with-TensorFlow-2-and-Keras

Deep Learning with TensorFlow 2 and Keras, published by Packt
MIT License
308 stars 209 forks source link

Chapter 6 DCGAN.ipynb not working as expected any more #7

Open luke1961 opened 3 years ago

luke1961 commented 3 years ago

I use Python 3.8 and Tensorflow 2.4 and I see that at about 1000 epochs discriminator's accuracy reaches 100% and the generator's loss significantly increases and the quality of the images produced by this DCGAN goes down and never recovers. I have tried multiple times, both on my work computer and with the use of colab. In other words the training goes very differently than in https://github.com/PacktPublishing/Deep-Learning-with-TensorFlow-2-and-Keras/blob/master/Chapter%206/DCGAN.ipynb. My presumption is that some improvements in TensorFlow 2.4 cause the generator to train too well and/or too quickly. Any ideas how to fix DCGAN.ipynb?

Fardeenkhan1 commented 3 years ago

Do you find the solution why this is happening I am also stuck here.

gmcmacran commented 1 year ago

For what it is worth, this is happening to me in 2023 with tensorflow 2.10. Result quality changes run to run. Some runs produce images that resemble a few numbers, but completely missing other numbers. Some runs produce images that don't resemble the numbers at all. Just random black and white pictures.