GAN or Generative Adversarial Network are a type of Deep Learning architecture for training powerful generator models.
Its is a backbone to almost every genrative model out there may it be OpenAI's DALL-E 2, Google Brain's Imagen, Midjourney or Stable Diffusion. Yann Lecun, Chief AI Scientist at Meta, said it was “the most interesting idea in the last 10 years in machine learning” A one dimentinal simple implementation of GAN using TensorFlow's library Keras
GAN is composed of a generator model and a descriminator model competing with each other. Hence the name 'adversarial'.
This project is based on GAN, Sequential model from Keras. We will have one node for input, 25 nodes in hidden layer and one output layer for our discriminator model.
Checkout resouces section for more details and some references to learn more about GANs models
- pip install graphviz
- pip install pydot
- pip install tensorflow
- pip install keras
- pip install numpy
- pip install matplotlib
if you are facing any dependancy error its because you don't have installed some library which above libraries internally depend on, read the error message for such library and update
We are doing total of 10,000 epochs and plotting a progress graph every 2,000 epochs. Five differnt plots. Below I am pasting the first and last one of those.
This below first plot is created after 2,000 iterations and shows real (red) vs. fake (blue) samples. The model performs poorly initially with a cluster of generated points only in the positive input domain, although with the right functional relationship
-
How to develop separate discriminator and generator models, as well as a composite model for training the generator via the discriminator’s predictive behavior.
-
How to subjectively evaluate generated samples in the context of real examples from the problem domain.