New
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow
A practical, project-driven introduction to machine learning and deep learning with Python
Pages
300
Published
2020
A Programmer's Guide to Building AI and Machine Learning Models with TensorFlow
Move from writing code to building intelligent systems by constructing real neural networks with TensorFlow, one working example at a time.
AI and Machine Learning for Coders by Laurence Moroney gives working programmers a direct, hands-on path into machine learning using TensorFlow. Rather than front-loading theory, each chapter builds a concrete model you can run and inspect. Written by Google's AI Developer Advocate, the book covers computer vision, natural language processing, and sequence modeling in plain terms, making it the shortest credible route from knowing how to code to knowing how to build models that learn.
Most machine learning books are written for data scientists or mathematicians. This one is written for coders. If you know how to write a function and call a library, you have everything you need to start building models that recognize images, understand text, and predict sequences.
Laurence Moroney, AI Developer Advocate at Google, has spent years teaching ML to software engineers. This book distills that experience into a series of concrete, runnable examples using TensorFlow and Keras. You will not wade through pages of calculus before writing a line of model code. You will write the model first, see it work, and then understand why it works.
The book moves through the core building blocks of modern machine learning in a deliberate order. You start with the fundamentals of how a neural network learns, then work through computer vision with convolutional networks, natural language understanding with embeddings and recurrent layers, and time-series prediction with sequence models. Each technique is introduced with a self-contained example you can extend.
By the time you finish, you will have built models across multiple domains, deployed them to the web and to mobile devices via TensorFlow Lite and TensorFlow.js, and understood the architectural decisions that separate a model that generalizes from one that merely memorizes.
This is not a survey of AI concepts. It is a practical construction manual for programmers who want working models, not just working knowledge of the vocabulary.
You build a single-neuron model that learns a numeric relationship from data, establishing the core loop of defining a model, compiling it, fitting it, and evaluating its predictions.
You train a dense neural network to classify clothing images from the Fashion MNIST dataset and observe how pixel data flows through layers to produce class probabilities.
You replace dense layers with convolutional and pooling layers, learning how filters detect spatial features and why CNNs outperform flat networks on image tasks.
You load an ImageNet-pretrained model, freeze its convolutional base, and fine-tune a new classifier head on a small custom dataset, achieving strong accuracy with minimal training.
You convert raw text into integer sequences, pad them to uniform length, and train an embedding layer that positions words in a vector space where meaning is proximity.
You build recurrent and LSTM networks to classify sentiment and generate text, and compare them to simpler approaches to understand when sequential memory earns its cost.
You model synthetic and real time-series data with windowed datasets and LSTM layers, measuring forecast error and tuning the model to generalize across unseen periods.
You convert a trained Keras model to the TensorFlow Lite flat-buffer format, run it inside a simple Android and iOS project, and measure the latency and accuracy trade-offs of on-device inference.
You export a model to TensorFlow.js format, load it in a web page, and run real-time inference in the browser without a server round-trip, using either a converted Keras model or one trained directly in JavaScript.
You need basic Python familiarity: variables, loops, functions, and importing libraries. No prior machine learning, statistics, or linear algebra is required.
The book was written for TensorFlow 2.x, specifically the version current in late 2020. Core Keras APIs used throughout the book have remained stable, though some peripheral APIs may have changed in newer releases.
It is best suited for programmers at the beginner-to-intermediate boundary. If you have already built and tuned CNNs and LSTMs on your own, you may find the early chapters familiar, though the deployment chapters on TensorFlow Lite and TensorFlow.js are useful at any level.
Yes, each chapter is built around runnable code examples. The book's code is available through O'Reilly's standard companion resources; check the publisher's page for the current download link.
No. The book is focused entirely on TensorFlow and Keras. If you need framework-agnostic ML theory or PyTorch coverage, this is not the right book.
No. The deployment chapters focus on TensorFlow Lite for mobile devices and TensorFlow.js for browsers. Cloud or server-side model serving is outside the scope of this book.
New
A practical, project-driven introduction to machine learning and deep learning with Python
New
An Iterative Process for Production-Ready Machine Learning Applications
by Chip Huyen
New
A rigorous foundation in Bayesian reasoning, probabilistic models, and modern machine learning methods
New
The definitive textbook on intelligent systems, from foundational search and logic to modern machine learning and probabilistic reasoning
by Peter Norvig, Stuart Russell