Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Generative Adversarial Networks with Keras

You're reading from   Hands-On Generative Adversarial Networks with Keras Your guide to implementing next-generation generative adversarial networks

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789538205
Length 272 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rafael Valle Rafael Valle
Author Profile Icon Rafael Valle
Rafael Valle
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Section 1: Introduction and Environment Setup
2. Deep Learning Basics and Environment Setup FREE CHAPTER 3. Introduction to Generative Models 4. Section 2: Training GANs
5. Implementing Your First GAN 6. Evaluating Your First GAN 7. Improving Your First GAN 8. Section 3: Application of GANs in Computer Vision, Natural Language Processing, and Audio
9. Progressive Growing of GANs 10. Generation of Discrete Sequences Using GANs 11. Text-to-Image Synthesis with GANs 12. TequilaGAN - Identifying GAN Samples 13. Whats next in GANs

The deep learning environment test

We are going to verify our deep learning environment installation by building and training a simple fully-connected neural network to perform classification on images of handwritten digits from the MNIST dataset. MNIST is an introductory dataset that contains 70,000 images, thus enabling us to quickly train a small model on a CPU and extremely fast on the GPU. In this simple example, we are only interested in testing our deep learning setup.

We start by using the keras built-in function to download and load the train and test datasets associated with MNIST:

import numpy as np
from keras.datasets import mnist
from keras.models import Sequential
from keras.utils import np_utils
from keras.optimizers import SGD
from keras.layers.core import Dense,Activation

The training set has 60,000 samples and the test set has 10,000 samples. The dataset is balanced...

You have been reading a chapter from
Hands-On Generative Adversarial Networks with Keras
Published in: May 2019
Publisher: Packt
ISBN-13: 9781789538205
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime