Hands-On Generative Adversarial Networks with PyTorch 1.x
eBook - ePub

Hands-On Generative Adversarial Networks with PyTorch 1.x

Implement next-generation neural networks to build powerful GAN models using Python

John Hany, Greg Walters

Condividi libro
  1. 312 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Hands-On Generative Adversarial Networks with PyTorch 1.x

Implement next-generation neural networks to build powerful GAN models using Python

John Hany, Greg Walters

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Apply deep learning techniques and neural network methodologies to build, train, and optimize generative network models

Key Features

  • Implement GAN architectures to generate images, text, audio, 3D models, and more
  • Understand how GANs work and become an active contributor in the open source community
  • Learn how to generate photo-realistic images based on text descriptions

Book Description

With continuously evolving research and development, Generative Adversarial Networks (GANs) are the next big thing in the field of deep learning. This book highlights the key improvements in GANs over generative models and guides in making the best out of GANs with the help of hands-on examples.

This book starts by taking you through the core concepts necessary to understand how each component of a GAN model works. You'll build your first GAN model to understand how generator and discriminator networks function. As you advance, you'll delve into a range of examples and datasets to build a variety of GAN networks using PyTorch functionalities and services, and become well-versed with architectures, training strategies, and evaluation methods for image generation, translation, and restoration. You'll even learn how to apply GAN models to solve problems in areas such as computer vision, multimedia, 3D models, and natural language processing (NLP). The book covers how to overcome the challenges faced while building generative models from scratch. Finally, you'll also discover how to train your GAN models to generate adversarial examples to attack other CNN and GAN models.

By the end of this book, you will have learned how to build, train, and optimize next-generation GAN models and use them to solve a variety of real-world problems.

What you will learn

  • Implement PyTorch's latest features to ensure efficient model designing
  • Get to grips with the working mechanisms of GAN models
  • Perform style transfer between unpaired image collections with CycleGAN
  • Build and train 3D-GANs to generate a point cloud of 3D objects
  • Create a range of GAN models to perform various image synthesis operations
  • Use SEGAN to suppress noise and improve the quality of speech audio

Who this book is for

This GAN book is for machine learning practitioners and deep learning researchers looking to get hands-on guidance in implementing GAN models using PyTorch. You'll become familiar with state-of-the-art GAN architectures with the help of real-world examples. Working knowledge of Python programming language is necessary to grasp the concepts covered in this book.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Hands-On Generative Adversarial Networks with PyTorch 1.x è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Hands-On Generative Adversarial Networks with PyTorch 1.x di John Hany, Greg Walters in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Neural Networks. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781789534283
Edizione
1

Section 1: Introduction to GANs and PyTorch

In this section, you will be introduced to the basic concepts of GANs, how to install PyTorch 1.0, and how you can build your own models with PyTorch.
This section contains the following chapters:
  • Chapter 1, Generative Adversarial Networks Fundamentals
  • Chapter 2, Getting Started with PyTorch 1.3
  • Chapter 3, Best Practices in Model Design and Training

Generative Adversarial Networks Fundamentals

Generative Adversarial Networks (GANs) have brought about a revolutionary storm in the machine learning (ML) community. They, to some extent, have changed the way people solve practical problems in Computer Vision (CV) and Natural Language Processing (NLP). Before we dive right into the storm, let's prepare you with the fundamental insights of GANs.
In this chapter, you will understand the idea behind adversarial learning and the basic components of a GAN model. You will also get a brief understanding on how GANs work and how it can be built with NumPy.
Before we start exploiting the new features in PyTorch, we will first learn to build a simple GAN with NumPy to generate sine signals so that you may have a profound understanding of the mechanism beneath GANs. By the end of this chapter, you may relax a little as we walk you through many showcases about how GANs are used to address practical problems in CV and NLP fields.
The following topics will be covered in this chapter:
  • Fundamentals of machine learning
  • Generator and discriminator networks
  • What GAN we do?
  • References and a useful reading list

Fundamentals of machine learning

To introduce how GANs work, let's use an analogy:
A long, long time ago, there were two neighboring kingdoms on an island. One was called Netland, and the other was called Ganland. Both kingdoms produced fine wine, armor, and weapons. In Netland, the king demanded that the blacksmiths who specialized in making armor worked at the east corner of the castle, while those who made swords worked at the west side so that the lords and knights could choose the best equipment the kingdom had to offer. The king of Ganland, on the other hand, put all of the blacksmiths in the same corner and demanded that the armor makers and sword makers should test their work against each other every day. If a sword broke through the armor, the sword would sell at a good price and the armor would be melted and reforged. If it didn't, the sword would be remade and men would strive to buy the armor. One day, the two kings were arguing over which kingdom made better wine until the quarrel escalated into war. Though outnumbered, the soldiers of Ganland wore the armor and swords that had been improved for years in the daily adversarial tests, and the Netland soldiers could not break their strong armor nor withstand their sharp swords. In the end, the defeated king of Netland, however reluctant he was, agreed that Ganland had better wine and blacksmiths.

Machine learning – classification and generation

ML is the study of recognizing patterns from data without hardcoded rules given by humans. The recognizing of patterns (Pattern Recognition or PR) is the automatic discovering of the similarities and differences among raw data, which is an essential way to realize Artificial Intelligence (AI) that only exists in novels and movies. Although it is hard to tell when exactly real AI will come to birth in the future, the development of ML has given us much confidence in recent years. ML has already been vastly used in many fields, such as CV, NLP, recommendation systems, Intelligent Transportation Systems (ITS), medical diagnoses, robotics, and advertising.
A ML model is typically described as a system that takes in data and gives certain outputs based on the parameters it contains. The learning of the model is actually adjusting the parameters to get better outputs. As illustrated in the following diagram, we feed training data into the model and get a certain output. We then use one or several criteria to measure the output, to tell how well our model performs. In this step, a set of desired outputs (or ground truth) with respect to the training data would be very helpful. If ground truth data is used in training, this process is often called supervised learning. If not, it is often regarded as unsupervised learning.
We constantly adjust the model's parameters based on its performance (in other words, whether it gives us the results we want) so that it yields better results in the future. This process is called model training. The training of a model takes as long as it pleases us. Typically, we stop the training after a certain number of iterations or when the performance is good enough. When the training process has finished, we apply the trained model to predict on new data (testing data). This process is called model testing. Sometimes, people use different sets of data for training and testing to see how well the model performs on samples it never meets, which is called the generalization capability. Sometimes an additional step called model evaluation is involved, when the parameters of the model are so complicated that we need another set of data to see whether our model or training process has been designed well:
A typical machine learning system, with model training and testing
What types of problems this model can solve is essentially determined by the types of input and out...

Indice dei contenuti