Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Neural Networks with Keras

You're reading from   Hands-On Neural Networks with Keras Design and create neural networks using deep learning and artificial intelligence principles

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789536089
Length 462 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Niloy Purkait Niloy Purkait
Author Profile Icon Niloy Purkait
Niloy Purkait
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Section 1: Fundamentals of Neural Networks FREE CHAPTER
2. Overview of Neural Networks 3. A Deeper Dive into Neural Networks 4. Signal Processing - Data Analysis with Neural Networks 5. Section 2: Advanced Neural Network Architectures
6. Convolutional Neural Networks 7. Recurrent Neural Networks 8. Long Short-Term Memory Networks 9. Reinforcement Learning with Deep Q-Networks 10. Section 3: Hybrid Model Architecture
11. Autoencoders 12. Generative Networks 13. Section 4: Road Ahead
14. Contemplating Present and Future Developments 15. Other Books You May Enjoy

Probing the data

Next, we simply load the fashion_mnist dataset that's contained in Keras. Note that while we have loaded the labels for each image as well, this is not necessary for the task we are about to perform. All we need are the input images, which our shallow autoencoder will regenerate:

(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
x_train.shape, x_test.shape, type(x_train)
((60000, 28, 28), (10000, 28, 28), numpy.ndarray)
plt.imshow(x_train[1], cmap='binary')

Following is the output:

We can proceed by checking the dimensions and types of the input images, and then plot out a single example from the training data for our own visual satisfaction. The example appears to be a casual T-shirt with some undecipherable content written on it. Great – now, we can move on to defining our autoencoder model!

...
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 $19.99/month. Cancel anytime
Banner background image