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

  1. 312 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et 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

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Hands-On Generative Adversarial Networks with PyTorch 1.x est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Hands-On Generative Adversarial Networks with PyTorch 1.x par John Hany, Greg Walters en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Neural Networks. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2019
ISBN
9781789534283
Édition
1
Sous-sujet
Neural Networks

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

Table des matiĂšres