GAN Lab: Generated Adversarial Networks In Your Browser!
Many of us have heard about generative adversarial systems, but they probably still seem mysterious. Here is an interactive demo that lets you interact, watch, and learn.
Join the DZone community and get the full member experience.
Join For FreeThis GitHub project is a highly interactive graphic demonstration of the features and operations of a generated adversarial network using TensorFow.js. It is based on work done by Minsuk Kahng, Nikhil Thorat, Duen Horng (Polo) Chau, Fernanda B. Viegas, and Martin Wattenberg in their paper: GAN Lab: Understanding Complex Deep Generative Models using Interactive Visual Experimentation.
Full disclosure: The data sets are small enough and simple enough to demonstrate the technology but clearly are not full-blown image processing examples, which can often consume a lot (CPU/years?) of computer time. But these small examples provide an excellent introduction into what is going on. It takes away the spooky magic...which is a good thing!
One nice thing about this interactive demo is that it doesn't try to make things too simple. It does make pretty moving pictures of the system in action. And it does provide slightly mesmerizing animations of learning in action that would please kids in kindergarten and, for that matter, kids of all ages. It won't teach much to a seasoned AI scientist, but it will create rewarding "aha" moments for smart, curious developers working in other computer science fields. Here's what the control panel looks like:
Generative Adversarial Networks (GANs) are a relatively new breed of Neural Networks. Most practitioners in the field would credit Ian J Goodfellow et al. as one of the key introductory papers on the topic: Generative Adversarial Nets published in 2014.
Here is a short video showing how it works:
GAN Lab cleanly demonstrates the power of TensorFlow.js. All of the AI functionality is actually done in your browser via JavaScript! And the reason it works so well is because TensorFlow.js takes advantage of the GPUs that are integral to your PC's high-performance graphics processing (which is pretty standard these days). Before diving into the demo, I would recommend reading their extremely clear and genuinely helpful description of the project on their GANLAB GitHub page. The introductory and educational descriptions are well worth the five-minute read and can be found immediately below the interactive demo proper.
Another nice and cognitively intuitive feature is the ability to input data sets and a graphical gestural manner. You can just spray some data points on the grid and see what happens.
There are other interesting controls too. One I found useful while trying to understand exactly what was happening through the epochs of training was the ability to select normal, slow motion, and even single step functionality. This allows you to see the big picture, but for me, it was interesting to watch individual data points and see how they behaved individually.
You can even peek under the hood and see what's happening inside the generator (the part of the system that creates variations to be tested) as well as peer into the inner workings of the discriminator (the part of the system that quantifies how different the generated adversaries are).
So, if you're interested in learning about generated adversarial networks, then I recommend GAN Lab as a fun, educational, and stimulating playground!
Opinions expressed by DZone contributors are their own.
Comments