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 thispersondoesnotexist.com 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.

Banner


Call For Code 2024 Focuses On Generative AI
01/03/2024

This year's Call for Code challenge has been launched with a theme of the use of generative AI technology for solutions that aim to improve equitable access to resources and opportunities for historic [ ... ]



Google Adds Multiple Database Support To Firestore
04/03/2024

Google has announced the general availability of Firestore Multiple Databases, which can be used to manage multiple Firestore databases within a single Google Cloud project.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 26 December 2022 )