An Easy Introduction To Generative Adversarial Networks
Written by Nikos Vaggalis   
Monday, 26 December 2022

We frequently report on breakthroughs in AI achieved by GANs - but exactly what is a GAN? Let Google provide the answer with this guide to GANs for beginners which comes  with great illustrations, step-by-step guidance and down-to-earth language.

With an unimaginative title, plainly called Generative Adversarial Networks, this course is part of a wider collection of advanced courses on machine learning by Google. The rest are:

  • Decision Forests
  • Recommendation Systems
  • Clustering
  • Image Classification
  • Fairness in Perspective API

All of them have as a prerequisite completing the fundamental Machine Learning Crash Course, which we covered in Take Google's Machine Learning Crash Course in January
and rated very highly:

Google opened the doors to its Machine Learning Crash Course, which had already been taken by more than 18, 000 Googlers, in March 2018. This free course forms the starting point for anyone to learn about and practice ML concepts and comprises 15 hours of material, including instructional videos, interactive visualizations and exercises

While there's many and great Machine Learning courses, the intended audience varies but amongst the beginner friendly ones this one gets the crown. Although tackling it requires knowledge in a few things, namely Numpy and Pandas, there's two very quick onboarding tutorials available on those topics too. In any case only a basic understanding is necessary.

Following on its steps, this one on GANs is again very noteworthy. Split into four distinct sections, Overview, GAN Anatomy, Real world GANs and using TF-GANs, it gives answers to the most common questions regarding GANs:

  • what are they used for
  • what a generator and a discriminator are
  • how a GAN is trained
  • what Loss functions are
  • what the common failure and problems are
  • which GAN variations are there

As a high-level overview, GANs comprise two neural networks; the generator, which learns to produce the target output, and the discriminator, which learns to distinguish true data from the output of the generator. The generator, well, generates data and the discriminator decides whether that data is valid and acceptable. The goal is to create new but always realistic data based on the consumed training data set.

GANs are used mainly in image generation, video generation, and voice generation. For example the photographs on are generated by a GAN that it is trained on pictures of people. Similarly, a GAN trained on poems can then create poetry by itself. And what about using the nowadays trending "prompts" to generate faces using natural language powered by GPT-3? Like "Generate a female face with blonde hair and green eyes"

Usually you would think that concepts like that are too difficult to grasp. Fear not, this course makes them easy to comprehend,
reinforced by clear diagrams and illustrations. While focused largely on the theoretical aspect of the matter, it does also give room for practicing in code under the Codelabs based TF-GAN Tutorial (for Tensor Flow GAN) where you get to write Python code for generating hand-written digits.

By the end of the course you should be able to :

  • Understand the difference between generative and discriminative models.

  • Identify problems that GANs can solve.

  • Understand the roles of the generator and discriminator in a GAN system.

  • Understand the advantages and disadvantages of common GAN loss functions.

  • Identify possible solutions to common problems with GAN training.

  • Use the TF GAN library to make a GAN.

Great stuff!


More Information

Google GANs

Related Articles

Take Google's Machine Learning Crash Course

Learn Machine Learning Algorithms From Scratch With Python

GANPaint: Using AI For Art  

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


VLOGGER - AI Does Talking Heads

Developed by Google researchers VLOGGER AI is a system that can create realistic videos of people talking and moving from a single still image and an audio clip as input. 

The Experience AI Challenge

The Raspberry Pi Foundation in collaboration with Google DeepMind has announced the Experience AI Challenge. Its intention is to guide young people under the age of 18, and their mentors, through [ ... ]

More News

raspberry pi books



or email your comment to:

Last Updated ( Monday, 26 December 2022 )