For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
Manning Publications Co.
2021 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.
front matter
preface
As a Googler, one of my duties is to educate software engineers on how to use machine learning. I already had experience creating online tutorials, meetups, conference presentations, training workshops, and coursework for private coding schools and university graduate studies, but I am always looking for new ways to effectively teach.
Prior to Google, I worked in Japanese IT as a principal research scientist for 20 yearsall without deep learning. Almost everything I see today, we were doing in innovation labs 15 years ago; the difference is we needed a room full of scientists and a vast budget. Its incredible how things have so rapidly changed as a result of deep learning.
Back in the late 2000s, I was working with small structured datasets with geospatial data from national and international sources all over the world. Coworkers called me a data scientist, but nobody knew what a data scientist really was. Then came big data, and I didnt know the big data tools and frameworks, and suddenly I wasnt a data scientist. What? I had to scramble and learn the tools and concepts behind big data and once again I was a data scientist.
Then emerged machine learning on big datasets, like linear/logistic regression and CART analysis, and I hadnt used statistics since graduate school decades ago, and once again I was not a data scientist. What? I had to scramble to learn statistics all over again, and once again I was a data scientist. Then came deep learning, and I didnt know the theory and frameworks for neural networks and suddenly I wasnt a data scientist. What? I scrambled again and learned deep learning theory and other deep learning frameworks. And once again, I am a data scientist.
acknowledgments
I would like to thank all those at Manning who helped throughout this process. Frances Lefkowitz, my development editor; Deirdre Hiam, my project editor; Sharon Wilkey, my copyeditor; Keri Hales, my proofreader; and Aleksandar Dragosavljevi, my reviewing editor.
To all the reviewers: Ariel Gamino, Arne Peter Raulf, Barry Siegel, Brian R. Gaines, Christopher Marshall, Curtis Bates, Eros Pedrini, Hilde Van Gysel, Ishan Khurana, Jen Lee, Karthikeyarajan Rajendran, Michael Kareev, Muhammad Sohaib Arif, Nick Vazquez, Ninoslav Cerkez, Oliver Korten, Piyush Mehta, Richard Tobias, Romit Singhai, Sayak Paul, Sergio Govoni, Simone Sguazza, Udendran Mudaliyar, Vishwesh Ravi Shrimali, and Viton Vitanis, your suggestions helped make this a better book.
To all Google Cloud AI staff who have shared their personal and customer insights, your insights helped the book cover a broader audience.
about this book
Who should read this book
Welcome to my latest endeavor, Deep Learning Patterns and Practices. This book is for software engineers; machine learning engineers; and junior, mid-level, and senior data scientists. Although you might assume that the initial chapters would be redundant for the latter group, my unique approach will likely leave you with additional insight and a welcomed refresher. The book is structured so that every reader reaches the point of ignition and is able to self-propel forward into deep learning.
I teach the design patterns and practices mostly in the context of computer vision, as this is where design patterns for deep learning first evolved. Developments in natural-language understanding and structured data models lagged behind and continued to be focused on classical approaches. But as they caught up, these fields developed their own deep learning design patterns, and I discuss those patterns and practices throughout the book.
Though I provide code for the computer vision models, my emphasis is on the concepts underlying the approaches and innovations: how they are set up and why they are set up that way. These underlying concepts are applicable to natural-language processing, structured data, signal processing, and other domains, and by generalizing, you should be able to adapt the concepts, methods, and techniques to the problems in your field. Many of the models and techniques I discuss are domain-agnostic, and throughout the book I also discuss key innovations in natural-language processing, natural-language understanding, and structured data domains where appropriate.
As for general background, you should know at least the basics of Python. Its OK if you still struggle with what a comprehension is or what a generator is, or if you still have some confusion about the weird multidimensional array slicing, and this thing about which objects are mutable and nonmutable on the heap. For this book, thats OK.
For those software engineers wanting to become machine learning engineerswhat does that mean? A machine learning engineer (MLE) is an applied engineer. You dont need to know statistics (really, you dont!), and you dont need to know computational theory. If you fell asleep in your college calculus class on what a derivative is, thats OK, and if somebody asks you to do a matrix multiplication, feel free to ask, Why?