Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Deep Learning for Beginners

You're reading from  Deep Learning for Beginners

Product type Book
Published in Sep 2020
Publisher Packt
ISBN-13 9781838640859
Pages 432 pages
Edition 1st Edition
Languages
Author (1):
Dr. Pablo Rivas Dr. Pablo Rivas
Profile icon Dr. Pablo Rivas

Table of Contents (20) Chapters

Preface 1. Section 1: Getting Up to Speed
2. Introduction to Machine Learning 3. Setup and Introduction to Deep Learning Frameworks 4. Preparing Data 5. Learning from Data 6. Training a Single Neuron 7. Training Multiple Layers of Neurons 8. Section 2: Unsupervised Deep Learning
9. Autoencoders 10. Deep Autoencoders 11. Variational Autoencoders 12. Restricted Boltzmann Machines 13. Section 3: Supervised Deep Learning
14. Deep and Wide Neural Networks 15. Convolutional Neural Networks 16. Recurrent Neural Networks 17. Generative Adversarial Networks 18. Final Remarks on the Future of Deep Learning 19. Other Books You May Enjoy

Convolutional neural network for CIFAR-10

We have reached the point where we can actually implement a fully functional CNN after looking at the individual pieces: understanding the convolution operation, understanding pooling, and understanding how to implement convolutional layers and pooling. Now we will be implementing the CNN architecture shown in Figure 12.3.

Implementation

We will be implementing the network in Figure 12.3 step by step, broken down into sub-sections.

Loading data

Let's load the CIFAR-10 dataset as follows:

from tensorflow.keras.datasets import cifar10
from tensorflow.keras.utils import to_categorical
import numpy as np

# The data, split between train and test sets:
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
x_train = x_train.astype('float32') / 255.
x_test = x_test.astype('float32') / 255.

y_train = to_categorical(y_train, 10)
y_test = to_categorical(y_test, 10)
print('x_train shape:', x_train.shape)
print('x_test shape...
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}