Book Image

Hands-On Convolutional Neural Networks with TensorFlow

By : Iffat Zafar, Giounona Tzanidou, Richard Burton, Nimesh Patel, Leonardo Araujo
Book Image

Hands-On Convolutional Neural Networks with TensorFlow

By: Iffat Zafar, Giounona Tzanidou, Richard Burton, Nimesh Patel, Leonardo Araujo

Overview of this book

Convolutional Neural Networks (CNN) are one of the most popular architectures used in computer vision apps. This book is an introduction to CNNs through solving real-world problems in deep learning while teaching you their implementation in popular Python library - TensorFlow. By the end of the book, you will be training CNNs in no time! We start with an overview of popular machine learning and deep learning models, and then get you set up with a TensorFlow development environment. This environment is the basis for implementing and training deep learning models in later chapters. Then, you will use Convolutional Neural Networks to work on problems such as image classification, object detection, and semantic segmentation. After that, you will use transfer learning to see how these models can solve other deep learning problems. You will also get a taste of implementing generative models such as autoencoders and generative adversarial networks. Later on, you will see useful tips on machine learning best practices and troubleshooting. Finally, you will learn how to apply your models on large datasets of millions of images.
Table of Contents (17 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Generative adversarial networks


Generative adversarial networks (GAN) are another very recent type of generative model that got attention due to their impressive results. A GAN is composed of two networks together: a generator network and a discriminator network. During training, they both play a zero-sum game, where the discriminator network tries to discover whether the images input to it are real or fake. At the same time, the generator network tries to create fake images that are good enough to fool the discriminator.

The idea is that after some time of training, both the discriminator and the generator become very good at their tasks. As a result, the generator is forced to try and create images that look closer and closer to the original dataset. To be able to do this, it must capture the probability distribution of the dataset.

The following diagram gives an overview of how this GAN model looks:

Both discriminator and generator will have their own loss function, but both of their losses...