Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Neural Networks with Keras

You're reading from  Hands-On Neural Networks with Keras

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789536089
Pages 462 pages
Edition 1st Edition
Languages
Author (1):
Niloy Purkait Niloy Purkait
Profile icon Niloy Purkait

Table of Contents (16) Chapters

Preface Section 1: Fundamentals of Neural Networks
Overview of Neural Networks A Deeper Dive into Neural Networks Signal Processing - Data Analysis with Neural Networks Section 2: Advanced Neural Network Architectures
Convolutional Neural Networks Recurrent Neural Networks Long Short-Term Memory Networks Reinforcement Learning with Deep Q-Networks Section 3: Hybrid Model Architecture
Autoencoders Generative Networks Section 4: Road Ahead
Contemplating Present and Future Developments Other Books You May Enjoy

Testing and visualizing the results

It's time to see whether the CNN really does hold up to our image reconstruction task at hand. We simply define a helper function that allows us to plot out a number of sampled examples that are generated from the test set and compare them to the original test inputs. Then, in the code cell that follows, we define a variable to hold the results of our model's inferences on the test set by using the .predict() method on our model object. This will generate a NumPy ndarray containing all of the decoded images for the inputs from the test set. Finally, we call the compare_outputs() function, using the test set and the decoded predictions thereof as arguments to visualize the results:

def compare_outputs(x_test, decoded_imgs=None, n=10):
    plt.figure(figsize=(22, 5))
    for i in range(n):
        ax = plt.subplot(2, n, i+1)
  ...
lock icon The rest of the chapter is locked
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 $15.99/month. Cancel anytime}