
About this Book
This book was written for anyone who wishes to explore deep learning from scratch or broaden their understanding of deep learning. Whether you’re a practicing machine-learning engineer, a software developer, or a college student, you’ll find value in these pages.
This book offers a practical, hands-on exploration of deep learning. It avoids mathematical notation, preferring instead to explain quantitative concepts via code snippets and to build practical intuition about the core ideas of machine learning and deep learning.
You’ll learn from more than 30 code examples that include detailed commentary, practical recommendations, and simple high-level explanations of everything you need to know to start using deep learning to solve concrete problems.
The code examples use the Python deep-learning framework Keras, with TensorFlow as a backend engine. Keras, one of the most popular and fastest-growing deep-learning frameworks, is widely recommended as the best tool to get started with deep learning.
After reading this book, you’ll have a solid understand of what deep learning is, when it’s applicable, and what its limitations are. You’ll be familiar with the standard workflow for approaching and solving machine-learning problems, and you’ll know how to address commonly encountered issues. You’ll be able to use Keras to tackle real-world problems ranging from computer vision to natural-language processing: image classification, timeseries forecasting, sentiment analysis, image and text generation, and more.
This book is written for people with Python programming experience who want to get started with machine learning and deep learning. But this book can also be valuable to many different types of readers:
- If you’re a data scientist familiar with machine learning, this book will provide you with a solid, practical introduction to deep learning, the fastest-growing and most significant subfield of machine learning.
- If you’re a deep-learning expert looking to get started with the Keras framework, you’ll find this book to be the best Keras crash course available.
- If you’re a graduate student studying deep learning in a formal setting, you’ll find this book to be a practical complement to your education, helping you build intuition around the behavior of deep neural networks and familiarizing you with key best practices.
Even technically minded people who don’t code regularly will find this book useful as an introduction to both basic and advanced deep-learning concepts.
In order to use Keras, you’ll need reasonable Python proficiency. Additionally, familiarity with the Numpy library will be helpful, although it isn’t required. You don’t need previous experience with machine learning or deep learning: this book covers from scratch all the necessary basics. You don’t need an advanced mathematics background, either—high school–level mathematics should suffice in order to follow along.
This book is structured in two parts. If you have no prior experience with machine learning, I strongly recommend that you complete part 1 before approaching part 2. We’ll start with simple examples, and as the book goes on, we’ll get increasingly close to state-of-the-art techniques.
Part 1 is a high-level introduction to deep learning, providing context and definitions, and explaining all the notions required to get started with machine learning and neural networks:
- Chapter 1 presents essential context and background knowledge around AI, machine learning, and deep learning.
- Chapter 2 introduces fundamental concepts necessary in order to approach deep learning: tensors, tensor operations, gradient descent, and backpropagation. This chapter also features the book’s first example of a working neural network.
- Chapter 3 includes everything you need to get started with neural networks: an introduction to Keras, our deep-learning framework of choice; a guide for setting up your workstation; and three foundational code examples with detailed explanations. By the end of this chapter, you’ll be able to train simple neural networks to handle classification and regression tasks, and you’ll have a solid idea of what’s happening in the background as you train them.
- Chapter 4 explores the canonical machine-learning workflow. You’ll also learn about common pitfalls and their solutions.
Part 2 takes an in-depth dive into practical applications of deep learning in computer vision and natural-language processing. Many of the examples introduced in this part can be used as templates to solve problems you’ll encounter in the real-world practice of deep learning:
- Chapter 5 examines a range of practical computer-vision examples, with a focus on image classification.
- Chapter 6 gives you practice with techniques for processing sequence data, such as text and timeseries.
- Chapter 7 introduces advanced techniques for building state-of-the-art deep-learning models.
- Chapter 8 explains generative models: deep-learning models capable of creating images and text, with sometimes surprisingly artistic results.
- Chapter 9 is dedicated to consolidating what you’ve learned throughout the book, as well as opening perspectives on the limitations of deep learning and exploring its probable future.
All of this book’s code examples use the Keras deep-learning framework (https://keras.io), which is open source and free to download. You’ll need access to a UNIX machine; it’s possible to use Windows, too, but I don’t recommend it. Appendix A walks you through the complete setup.
I also recommend that you have a recent NVIDIA GPU on your machine, such as a TITAN X. This isn’t required, but it will make your experience better by allowing you to run the code examples several times faster. See section 3.3 for more information about setting up a deep-learning workstation.
If you don’t have access to a local workstation with a recent NVIDIA GPU, you can use a cloud environment, instead. In particular, you can use Google Cloud instances (such as an n1-standard-8 instance with an NVIDIA Tesla K80 add-on) or Amazon Web Services (AWS) GPU instances (such as a p2.xlarge instance). Appendix B presents in detail one possible cloud workflow that runs an AWS instance via Jupyter notebooks, accessible in your browser.
All code examples in this book are available for download as Jupyter notebooks from the book’s website, www.manning.com/books/deep-learning-with-python, and on GitHub at https://github.com/fchollet/deep-learning-with-python-notebooks.
Purchase of Deep Learning with Python includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum, go to https://forums.manning.com/forums/deep-learning-with-python. You can also learn more about Manning’s forums and the rules of conduct at https://forums.manning.com/forums/about.
Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It isn’t a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking him some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.