What are Generative Adversarial Networks
GAN (Generative Adversarial Networks) came into existence in 2014, so it is true that this technology is in its initial step, but it is gaining very much popularity due it's generative as well as discrimination power. This technology is considered a child of Generative model family. It is a division of unsupervised learning which makes it more handful because it can also handle unsupervised learning which is itself a big plus.
Basically, it is a combination of two sub-models. First sub model has a task to generate data samples and second sub-model do the task of receiving these data samples and do the discrimination between training data and these data samples which results in the accurately distinguished data.
How Generative Adversarial Networks work
The concept is simple here one part generate new data and other part has the responsibility to validate the these new instances with the help of old data which is passed to the model. It can be visualized with the help of the example of fake money creator (Generator) and a cop (Discriminator). Fake money creator generates fake money and cop has a task to identify the fake money. The beauty of this model is both model train themselves and both them try to enhance themselves.
Following steps provide a brief detail of the process in a more technical way –
- The generator import indiscriminate number of data samples and return an example of data.
- This generated example of data is feeded to the discriminator with actual data.
- Now the concept of probability comes into the play here. The discriminator has the task to provide a probability score (in between 0 and 1 where 0 signifies fake and 1 signifies valid instance).
- So broadly speaking there are two continuous vice-versa procedure run inside the GAN under which discriminator shares a responsive loop with the real images to explore the ground truth (by determining which data instance is fake and which is rea). On the other hand generator shares a responsive loop with discriminator to determine the results of discriminator without giving any concern to the truthness.
Generative Adversarial Networks Benefits
There are some points which make GAN different from other Image handling models and which can be considered as the benefits –
- GAN have the capability to predict the corresponding new frame in a video.
- In the case of Image handling, it can also give a boost to the resolution of an Image.
- If there is a necessity of Image to Image interpretation, for this purpose GAN model can be used. It means a firmly new image can be generated from an old image with the help of a GAN model.
- With the help of GAN model text to an image generation is also possible which means provide the description in the form of text to the GAN model, and it can generate a pragmatic photo of the specification.
Why Adopting Generative Adversarial Network matters?
The reasons why a generative model specifically a GAN model is important are –
- It can signify and change the probability distribution which have higher dimensionality.
- It can also be treated as neural network example which is also covering the basics of reinforcement learning.
- It can also handle the missing the data and can do the predictions on missing data which also signify a support to the concept of semi-supervised learning.
- It has the capability to work with different modal outputs.
- Last but least, If there is task related to the generation of the data. GAN is the one of the model to go with.
How to adopt Generative Adversarial Network
So the basic steps which should be used to train a Generative Adversarial Networks –
The basic step of any Deep Learning/Machine Learning is to understand the objectives and defining them as problem.
Next step is to construct the architecture of a GAN neural network. Here the nature of the discriminator and Generator is decided for example whether it should be like a Convolution Neural Network or it should be as similar as a multi layer perceptrons. This decision will totally depend on the nature of the problem.
Choose the number for the epochs. These epochs will be used to train the discriminator. The number can be anything between 1 and infinity.
The fake data will be generated by the generator and the discriminator will be trained on this fake output.
Now repeat the process in vice-versa manner that means the generator should be trained on the output of discriminator.
Now select a number for another loop process and in this looping process all steps from 3 to5 will be repeated.
Now validate the fake generated data if it seems to be nearly similar to the original data, the training should be stopped.
Generative Adversarial Network Best practices
There are some tips to follow to export the best results from a GAN model –
Before training the generator part, the discriminator part should be trained. This step will set up a bright gradient before starting the whole process.
Generator as well as discriminator both are the equally important part of the GAN. They should be equally good so that a equilibrium in between these models can be established.
It takes a long due of time to train a GAN models. In the age of powerful GPUs, it can take hours to train themselves with the help of a GPU so in the case of a CPU it can takes days. That is why it is better to use a GPU to train a GAN model.
During the training of the Generator part, the values of the discriminator part should be kept as constant and in the same manner the value of the generator part should be kept as constant while training a discriminator.
Generative Adversarial Network Frameworks
With all the different sub-modules and highly complex architecture, at the end of the day GAN is a neural network by heart so tools (such as WEKA) which are used to compose a deep learning architecture can also be used to architect a GAN model.
Languages such as Python, R etc. can also be used for architectural GAN model.
As stated above it is deep learning type of model that is why the frameworks which are suitable for framing deep learning model, can also be used to architect the GAN model.
Some of the examples of this framework are –
A Comprehensive Approach
To understand more about unsupervised learning machine learning task that includes automatically identifying and reading patterns in input data for producing new outputs we advise taking the following steps –
How useful was this post?