GAN not converging

have wriiten a python code for a General Adverserial Network which generates CIFAR-10 like images.

I have trained the GAN on 100 epochs and after every 10 epoch, I am displaying the error and accuracy of the GAN. My GAN model is training but there are no outputs no matter for how much time do I train the model. What could be the problem with my model? Is it vanishing gradient? How to solve it?

A link to my colab sheet is here

I tried changing the hyperparameters of the GAN but on every refernce site, I am getting the same hyperparameters.

I trained a Deep Network GAN on MNIST dataset and that worked pretty well but this one, with the CNN is not converging.

Hi @Manas_Sharma,

Sorry for the delay in response.
I could see the issue in train_gan(), you are training the discriminator and generator but the training dynamics are not balanced.To resolve this I suggest few things, start by ensuring that the labels (Y_train) are processed as float values (np.float32), simplify the discriminator by reducing stride values to 1 and adjusting filter sizes for simple downsampling. In your training loop, update the discriminator first (on both real and fake data), followed by the generator through the GAN model.In addition, adjust the generator architecture to use more upsampling layers (instead of large strides) to output images of size 32x32 and ensure your batch size is consistent throughout the code.

Hope this helps.Thank You.