Deep learning is applicable to a widening range of artificial intelligence problems, such as image classification, speech recognition, text classification, question answering, text-to-speech, and optical character recognition. It is the technology behind photo tagging systems at Facebook and Google, self-driving cars, speech recognition systems on your smartphone, and much more.

In particular, Deep learning excels at solving machine perception problems: understanding the content of image data, video data, or sound data. Here's a simple example: say you have a large collection of images, and that you want tags associated with each image, for example, "dog," "cat," etc. Deep learning can allow you to create a system that understands how to map such tags to images, learning only from examples. This system can then be applied to new images, automating the task of photo tagging. A deep learning model only has to be fed examples of a task to start generating useful results on new data.

# Part 1: The fundamentals of Deep Learning

## 1. What is Deep Learning?

### 1.1. Artificial intelligence

#### 1.1.1. Machine Learning

#### 1.1.2. Learning representations from data

#### 1.1.3. The "deep" in deep learning

#### 1.1.4. Understanding how deep learning works in three figures

#### 1.1.5. What deep learning has achieved so far

#### 1.1.6. Don't believe the short-term hype

#### 1.1.7. The promise of AI

### 1.2. Before deep learning: a brief history of machine learning

#### 1.2.1. Probabilistic modeling

#### 1.2.2. Early neural networks

#### 1.2.3. Kernel methods

#### 1.2.4. Decision trees, Random Forests and Gradient Boosting Machines

#### 1.2.5. Back to neural networks

#### 1.2.6. What makes deep learning different

#### 1.2.7. The modern machine learning landscape

### 1.3. Why deep learning, why now?

#### 1.3.1. Hardware

#### 1.3.2. Data

#### 1.3.3. Algorithms

#### 1.3.4. A new wave of investment

#### 1.3.5. The democratization of deep learning

#### 1.3.6. Will it last?

## 2. Before we start: the mathematical blocks of neural networks

### 2.1. A first look at a neural network

### 2.2. Data representations for neural networks

#### 2.2.1. Scalars (0D tensors)

#### 2.2.2. Vectors (1D tensors)

#### 2.2.3. Matrices (2D tensors)

#### 2.2.4. 3D tensors and higher-dimensional tensors

#### 2.2.5. Key attributes

#### 2.2.6. Manipulating tensors in Numpy

#### 2.2.7. The notion of data batch

#### 2.2.8. Real-world examples of data tensors

#### 2.2.9. Vector data

#### 2.2.10. Timeseries data or sequence data

#### 2.2.11. Image data

#### 2.2.12. Video data

### 2.3. The gears of neural networks: tensor operations

#### 2.3.1. Element-wise operations

#### 2.3.2. Broadcasting

#### 2.3.3. Tensor dot

#### 2.3.4. Tensor reshaping

#### 2.3.5. Geometric interpretation of tensor operations

#### 2.3.6. A geometric interpretation of deep learning

### 2.4. The engine of neural networks: gradient-based optimization

#### 2.4.1. What's a derivative?

#### 2.4.2. Derivative of a tensor operation: the gradient

#### 2.4.3. Stochastic gradient descent

#### 2.4.4. Chaining derivatives: the backpropagation algorithm

#### 2.4.5. In summary: training neural networks using gradient descent

### 2.5. Looking back on our first example

## 3. Getting started with neural networks

### 3.1. Anatomy of a neural network

#### 3.1.1. Layers: the Lego(r) blocks of deep learning

#### 3.1.2. Models: networks of layers

#### 3.1.3. Loss functions and optimizers: keys to configuring the learning process

### 3.2. Introduction to Keras

#### 3.2.1. Keras, TensorFlow, and Theano

#### 3.2.2. Developing with Keras: a quick overview

### 3.3. Setting up a deep learning workstation

#### 3.3.1. Preliminary considerations

#### 3.3.2. What is the best GPU for deep learning?

#### 3.3.3. Overview of the installation process

#### 3.3.4. Installing the Python scientific suite

#### 3.3.5. Setting up GPU support

#### 3.3.6. Installing TensorFlow without GPU support

#### 3.3.7. Installing TensorFlow with GPU support

#### 3.3.8. Installing Theano

#### 3.3.9. Installing Keras

### 3.4. Classifying movie reviews: a binary classification example

#### 3.4.1. The IMDB dataset

#### 3.4.2. Preparing the data

#### 3.4.3. Building our network

#### 3.4.4. Validating our approach

#### 3.4.5. Using a trained network to generate predictions on new data

#### 3.4.6. Further experiments

#### 3.4.7. Conclusions

### 3.5. Classifying newswires: a multi-class classification example

#### 3.5.1. The Reuters dataset

#### 3.5.2. Preparing the data

#### 3.5.3. Building our network

#### 3.5.4. Validating our approach

#### 3.5.5. Generating predictions on new data

#### 3.5.6. A different way to handle the labels and the loss

#### 3.5.7. On the importance of having sufficiently large intermediate layers

#### 3.5.8. Further experiments

#### 3.5.9. Conclusions

### 3.6. Predicting house prices: a regression example

#### 3.6.1. The Boston Housing Price dataset

#### 3.6.2. Preparing the data

#### 3.6.3. Building our network

#### 3.6.4. Validating our approach using k-fold validation

#### 3.6.5. Conclusions

## 4. Fundamentals of machine learning

# Part 2: Deep Learning in practice

## 5. Deep learning for computer vision

## 6. Deep learning for text and sequences

## 7. Advanced neural network design

## 8. Generative deep learning

## 9. Conclusion

## About the Technology

Deep learning experts are already highly sought after by major companies, and demand is only going to increase. The question is how do you get started? Keras, the Python deep learning library, is one of the most widely used deep learning frameworks. Keras puts ease of use and accessibility front and center, making it a great fit for getting started with deep learning.

## About the book

*Deep Learning with Python* is for developers with some Python experience who want to learn how to use deep learning to solve real-world problems. The book is structured around a series of practical code examples that illustrate each new concept introduced and demonstrate best practices. You begin by finding out what deep learning is, and how it connects with Artificial Intelligence and Machine Learning, as well as why deep learning is rapidly gaining in importance right now. You will then learn the fundamentals of machine learning, and finally, you will dive deeper into practical applications in computer vision, natural language processing, and more. By the time you reach the end of this book, you will have become a Keras expert and will be able to apply deep learning in your own projects.

## What's inside

- Understanding key machine learning concepts
- Setting up a computer environment for deep learning
- Using convolutional neural networks to solve image classification tasks
- Understanding and visualizing the representations that neural networks learn
- Using recurrent neural networks to solve text and sequence classification tasks
- Using deep learning for image style transfer, text generation and image generation
- Written by the creator of Keras, the Python deep learning library

## About the reader

Readers should have Python experience. No previous experience with machine learning or deep learning is required.## About the author

**Francois Chollet**is the author of Keras, one of the most widely used libraries for deep learning in Python. He has been working with deep neural networks since 2012. Francois is currently doing deep learning research at Google. He blogs about deep learning at blog.keras.io.

**Manning Early Access Program (MEAP)**Read chapters as they are written, get the finished eBook as soon as itâ€™s ready, and receive the pBook long before it's in bookstores.

**FREE domestic shipping** on three or more pBooks