With information on the web exponentially increasing, it has become more difficult than ever to navigate through everything to find reliable content that will help you get started with deep learning. This book is designed to help you if you're a beginner looking to work on deep learning and build deep learning models from scratch, and you already have the basic mathematical and programming knowledge required to get started.
The book begins with a basic overview of machine learning, guiding you through setting up popular Python frameworks. You will also understand how to prepare data by cleaning and preprocessing it for deep learning, and gradually go on to explore neural networks. A dedicated section will give you insights into the working of neural networks by helping you get hands-on with training single and multiple layers of neurons. Later, you will cover popular neural network architectures such as CNNs, RNNs, AEs, VAEs, and GANs with the help of simple examples, and learn how to build models from scratch. At the end of each chapter, you will find a question and answer section to help you test what you've learned through the course of the book.
By the end of this book, you'll be well-versed with deep learning concepts and have the knowledge you need to use specific algorithms with various tools for different tasks.
Author(s): Dr. Pablo Rivas
Publisher: Packt
Year: 2020
Language: English
Tags: Python; Deep Learning
Cover
Title Page
Copyright and Credits
About Packt
Foreword
Contributors
Table of Contents
Preface
Section 1: Getting Up to Speed
Chapter 1: Introduction to Machine Learning
Diving into the ML ecosystem
Training ML algorithms from data
Introducing deep learning
The model of a neuron
The perceptron learning algorithm
Shallow networks
The input-to-hidden layer
The hidden-to-hidden layer
The hidden-to-output layer
Deep networks
Why is deep learning important today?
Summary
Questions and answers
References
Chapter 2: Setup and Introduction to Deep Learning Frameworks
Introduction to Colaboratory
Introduction and setup of TensorFlow
Setup
TensorFlow with GPU support
Principles behind TensorFlow
Introduction and setup of Keras
Setup
Principles behind Keras
Introduction to PyTorch
Introduction to Dopamine
Other deep learning libraries
Caffe
Theano
Honorable mentions
Summary
Questions and answers
References
Chapter 3: Preparing Data
Binary data and binary classification
Binary targets on the Cleveland Heart Disease dataset
Binarizing the MNIST dataset
Binarizing the images
Binarizing the targets
Categorical data and multiple classes
Converting string labels to numbers
Converting categories to one-hot encoding
Real-valued data and univariate regression
Scaling to a specific range of values
Standardizing to zero mean and unit variance
Altering the distribution of data
Data augmentation
Rescaling
Adding noise
Rotating
Other augmentation techniques
Data dimensionality reduction
Supervised algorithms
Linear discriminant analysis
Unsupervised techniques
Kernel PCA
Large datasets
Sparse PCA
Dictionary Learning
Regarding the number of dimensions
Ethical implications of manipulating data
Summary
Questions and answers
References
Chapter 4: Learning from Data
Learning for a purpose
Classification
Binary classification
Multi-class classification
Regression
Measuring success and error
Binary classification
Multiple classes
Regression
Identifying overfitting and generalization
If we have test data
No test data? No problem – cross-validate
The art behind learning
Ethical implications of training deep learning algorithms
Reporting using the appropriate performance measures
Being careful with outliers and verifying them
Weight classes with undersampled groups
Summary
Questions and answers
References
Chapter 5: Training a Single Neuron
The perceptron model
The visual concept
Tensor operations
The perceptron learning algorithm
PLA in Python
A perceptron over non-linearly separable data
Convergence on linearly separable data
Convergence on non-linearly separable data
Summary
Questions and answers
References
Chapter 6: Training Multiple Layers of Neurons
The MLP model
Minimizing the error
Step 1 – Initialization
Step 2 – The forward pass
Step 3 – Calculating loss
Step 4 – The backward pass
Finding the best hyperparameters
Summary
Questions and answers
References
Section 2: Unsupervised Deep Learning
Chapter 7: Autoencoders
Introduction to unsupervised learning
Encoding and decoding layers
Encoding layers
Decoding layers
Loss function
Learning and testing
Applications in dimensionality reduction and visualization
MNIST data preparation
Autoencoders for MNIST
Training and visualization
Ethical implications of unsupervised learning
Summary
Questions and answers
References
Chapter 8: Deep Autoencoders
Introducing deep belief networks
Making deep autoencoders
Batch normalization
Dropout
Exploring latent spaces with deep autoencoders
CIFAR-10
MNIST
Summary
Questions and answers
References
Chapter 9: Variational Autoencoders
Introducing deep generative models
Examining the VAE model
The heart disease dataset revisited
The re-parametrization trick and sampling
Learning the posterior's parameters in the encoder
Modeling the decoder
Minimizing the loss
Training a VAE
Generating data from the VAE
Comparing a deep and shallow VAE on MNIST
Shallow VAE
Deep VAE
Encoder
Decoder
Denoising VAEs
Thinking about the ethical implications of generative models
Summary
Questions and answers
References
Chapter 10: Restricted Boltzmann Machines
Introduction to RBMs
BMs
RBMs
Bernoulli RBMs
Learning data representations with RBMs
Comparing RBMs and AEs
Summary
Questions and answers
References
Section 3: Supervised Deep Learning
Chapter 11: Deep and Wide Neural Networks
Wide neural networks
Deep learning revisited
Wide layers
Summaries
Names
The CIFAR-10 dataset
New training tools
Saving or loading models
Reducing the learning rate on the fly
Stopping the learning process early
Results
Dense deep neural networks
Building and training the model
Results
Sparse deep neural networks
Building a sparse network and training it
Results
Hyperparameter optimization
Libraries and parameters
Implementation and results
Summary
Questions and answers
References
Chapter 12: Convolutional Neural Networks
Introduction to convolutional neural networks
Convolution in n-dimensions
1-dimension
2-dimensions
n-dimensions
Convolutional layers
Conv2D
The layer+activation combo
Pooling strategies
Convolutional neural network for CIFAR-10
Implementation
Loading data
Compiling the model
Training the CNN
Results
Visualization of filters
Summary
Questions and answers
References
Chapter 13: Recurrent Neural Networks
Introduction to recurrent neural networks
Simple RNNs
Embedding layers
Word embedding and RNNs on IMDb
Long short-term memory models
Sequence-to-vector models
Unsupervised model
Results
Vector-to-sequence models
Bi-directional LSTM
Implementation and results
Sequence-to-sequence models
Ethical implications
Summary
Questions and answers
References
Chapter 14: Generative Adversarial Networks
Introducing adversarial learning
Learning using an adversary
GANs
Training a GAN
An MLP model
A convolutional model
Comparing GANs and VAEs
Thinking about the ethical implications of GANs
Summary
Questions and answers
References
Chapter 15: Final Remarks on the Future of Deep Learning
Looking for advanced topics in deep learning
Deep reinforcement learning
Self-supervised learning
System 2 algorithms
Learning with more resources from Packt
Reinforcement learning
Self-supervised learning
Summary
References
Other Books You May Enjoy
Index