Hands-On Generative Adversarial Networks with Keras
eBook - ePub

Hands-On Generative Adversarial Networks with Keras

Your guide to implementing next-generation generative adversarial networks

  1. 272 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Generative Adversarial Networks with Keras

Your guide to implementing next-generation generative adversarial networks

Book details
Book preview
Table of contents
Citations

About This Book

Develop generative models for a variety of real-world use-cases and deploy them to production

Key Features

  • Discover various GAN architectures using Python and Keras library
  • Understand how GAN models function with the help of theoretical and practical examples
  • Apply your learnings to become an active contributor to open source GAN applications

Book Description

Generative Adversarial Networks (GANs) have revolutionized the fields of machine learning and deep learning. This book will be your first step towards understanding GAN architectures and tackling the challenges involved in training them.

This book opens with an introduction to deep learning and generative models, and their applications in artificial intelligence (AI). You will then learn how to build, evaluate, and improve your first GAN with the help of easy-to-follow examples. The next few chapters will guide you through training a GAN model to produce and improve high-resolution images. You will also learn how to implement conditional GANs that give you the ability to control characteristics of GAN outputs. You will build on your knowledge further by exploring a new training methodology for progressive growing of GANs. Moving on, you'll gain insights into state-of-the-art models in image synthesis, speech enhancement, and natural language generation using GANs. In addition to this, you'll be able to identify GAN samples with TequilaGAN.

By the end of this book, you will be well-versed with the latest advancements in the GAN framework using various examples and datasets, and you will have the skills you need to implement GAN architectures for several tasks and domains, including computer vision, natural language processing (NLP), and audio processing.

Foreword by Ting-Chun Wang, Senior Research Scientist, NVIDIA

What you will learn

  • Learn how GANs work and the advantages and challenges of working with them
  • Control the output of GANs with the help of conditional GANs, using embedding and space manipulation
  • Apply GANs to computer vision, NLP, and audio processing
  • Understand how to implement progressive growing of GANs
  • Use GANs for image synthesis and speech enhancement
  • Explore the future of GANs in visual and sonic arts
  • Implement pix2pixHD to turn semantic label maps into photorealistic images

Who this book is for

This book is for machine learning practitioners, deep learning researchers, and AI enthusiasts who are looking for a perfect mix of theory and hands-on content in order to implement GANs using Keras. Working knowledge of Python is expected.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Hands-On Generative Adversarial Networks with Keras by Rafael Valle in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9781789535136
Edition
1

Section 1: Introduction and Environment Setup

This section features an introduction to the basics of deep learning, how to set up a deep learning environment with Python and Keras, and how to go about acquiring data. You will also benefit from an introduction to generative models, including Generative Adversarial Networks (GANs), Variational Autoencoders (VAEs), and Normalizing Flow (NF).
The following chapters will be covered in this section:
  • Chapter 1, Deep Learning Basics and Environment Setup
  • Chapter 2, Introduction to Generative Models

Deep Learning Basics and Environment Setup

In this chapter, we offer you essential knowledge for building and training deep learning models, including Generative Adversarial Networks (GANs). We are going to explain the basics of deep learning, starting with a simple example of a learning algorithm based on linear regression. We will also provide instructions on how to set up a deep learning programming environment using Python and Keras. We will also talk about the importance of computing power in deep learning; we are going to describe guidelines to fully take advantage of NVIDIA GPUs by maximizing the memory footprint, enabling the CUDA Deep Neural Network library (cuDNN), and eventually using distributed training setups with multiple GPUs. Finally, in addition to installing the libraries that will be necessary for upcoming projects in this book, you will test your installation by building, from scratch, a simple and efficient Artificial Neural Network (ANN) that will learn from data how to classify images of handwritten digits.
The following major topics will be covered in this chapter:
  • Deep learning basics
  • Deep learning environment setup
  • The deep learning environment test

Deep learning basics

Deep learning is a subset of machine learning, which is a field of artificial intelligence that uses mathematics and computers to learn from data and map it from some input to some output. Loosely speaking, a map or a model is a function with parameters that maps the input to an output. Learning the map, also known as mode, occurs by updating the parameters of the map such that some expected empirical loss is minimized. The empirical loss is a measure of distance between the values predicted by the model and the target values given the empirical data.
Notice that this learning setup is extremely powerful because it does not require having an explicit understanding of the rules that define the map. An interesting aspect of this setup is that it does not guarantee that you will learn the exact map that maps the input to the output, but some other maps, as expected, predict the correct output.
This learning setup, however, does not come without a price: some deep learning methods require large amounts of data, specially when compared with methods that rely on feature engineering. Fortunately, there is a large availability of free data, specially unlabeled, in many domains.
Meanwhile, the term deep learning refers to the use of multiple layers in an ANN to form a deep chain of functions. The term ANN suggests that such models informally draw inspiration from theoretical models of how learning could happen in the brain. ANNs, also referred to as deep neural networks, are the main class of models considered in this book.

Artificial Neural Networks (ANNs)

Despite its recent success in many applications, deep learning is not new and according to Ian Goodfellow, Yoshua Bengio, and Aaron Courville, there have been three eras:
  • Cybernetics between the 1940s and the 1960s
  • Connectionism between the 1980s and the 1990s
  • The current deep learning renaissance beginning in 2006
Mathematically speaking, a neural network is a graph consisting of non-linear equations whose parameters can be estimated using methods such as stochastic gradient descent and backpropagation. We will introduce ANNs step by step, starting with linear and logistic regression.
Linear regression is used to estimate the parameters of a model to describe the relationship between an output variable and the given input variables. It can be mathematically described as a weighted sum of input varia...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. About Packt
  4. Foreword
  5. Contributors
  6. Preface
  7. Section 1: Introduction and Environment Setup
  8. Deep Learning Basics and Environment Setup
  9. Introduction to Generative Models
  10. Section 2: Training GANs
  11. Implementing Your First GAN
  12. Evaluating Your First GAN
  13. Improving Your First GAN
  14. Section 3: Application of GANs in Computer Vision, Natural Language Processing, and Audio
  15. Progressive Growing of GANs
  16. Generation of Discrete Sequences Using GANs
  17. Text-to-Image Synthesis with GANs
  18. TequilaGAN - Identifying GAN Samples
  19. Whats next in GANs