Machine Learning with TensorFlow, Second Edition
Chris A. Mattmann
  • MEAP began January 2020
  • Publication in August 2020 (estimated)
  • ISBN 9781617297717
  • 350 pages (estimated)
  • printed in black & white
free previous edition eBook included
An eBook copy of the previous edition of this book is included at no additional cost. It will be automatically added to your Manning Bookshelf within 24 hours of purchase.
Updated with new code, new projects, and new chapters, Machine Learning with TensorFlow, Second Edition gives readers a solid foundation in machine-learning concepts and the TensorFlow library. Written by NASA JPL Deputy CTO and Principal Data Scientist Chris Mattmann, all examples are accompanied by downloadable Jupyter Notebooks for a hands-on experience coding TensorFlow with Python. New and revised content expands coverage of core machine learning algorithms, and advancements in neural networks such as VGG-Face facial identification classifiers and deep speech classifiers.

About the Technology

TensorFlow, Google’s library for large-scale machine learning, makes powerful ML techniques easily accessible. It simplifies often-complex computations by representing them as graphs that are mapped to machines in a cluster or to the processors of a single machine. Offering a complete ecosystem for all stages and types of machine learning, TensorFlow’s end-to-end functionality empowers machine learning engineers of all skill levels to solve their problems with ML.

About the book

This fully revised second edition of Machine Learning with TensorFlow teaches you the foundational concepts of machine learning, and how to utilize the TensorFlow library to rapidly build powerful ML models. You’ll learn the basics of regression, classification, and clustering algorithms, applying them to solve real-world challenges such as call center volume prediction and sentiment analysis of movie reviews. Once you’ve mastered core ML concepts, you’ll move on to the money chapters: exploring cutting-edge neural network techniques such as deep speech classifiers, facial identification, and auto-encoding with CIFAR-10. Digest this book, and you’ll be able to start modelling your everyday problems as automated machine learning tasks.
Table of Contents detailed table of contents


1 A machine-learning odyssey

1.1 Machine-learning fundamentals

1.1.1 Parameters

1.1.2 Learning and inference

1.2 Data representation and features

1.3 Distance metrics

1.4 Types of learning

1.4.1 Supervised learning

1.4.2 Unsupervised learning

1.4.3 Reinforcement learning

1.4.4 Meta-learning

1.5 TensorFlow

1.6 Overview of future chapters

1.7 Summary

2 TensorFlow essentials

2.1 Ensuring that TensorFlow works

2.2 Representing tensors

2.3 Creating operators

2.4 Executing operators with sessions

2.5 Understanding code as a graph

2.5.1 Setting session configurations

2.6 Writing code in Jupyter

2.7 Using variables

2.8 Saving and loading variables

2.9 Visualizing data using TensorBoard

2.9.1 Implementing a moving average

2.9.2 Visualizing the moving average

2.10 Putting it all together: The TensorFlow System Architecture and. API

2.11 Summary


3 Linear regression and beyond

3.1 Formal notation

3.1.1 How do you know the regression algorithm is working?

3.2 Linear regression

3.3 Polynomial model

3.4 Regularization

3.5 Application of linear regression

3.6 Summary

4 Using regression for call center volume prediction

4.1 What is 3-1-1?

4.2 Cleaning the data for regression

4.3 What’s in a bell curve: predicting Gaussian distributions

4.4 Training your call prediction regressor

4.5 Visualizing the results and plotting the error

4.6 Regularization and train test splits

4.7 Summary

5 A gentle introduction to classification

5.1 Formal notation

5.2 Measuring performance

5.2.1 Accuracy

5.2.2 Precision and recall

5.2.3 Receiver operating characteristic curve

5.3 Using linear regression for classification

5.4 Using logistic regression

5.4.1 Solving one-dimensional logistic regression

5.4.2 Solving two-dimensional logistic regression

5.5 Multiclass classifier

5.5.1 One-versus-all

5.5.2 One-versus-one

5.5.3 Softmax regression

5.6 Application of classification

5.7 Summary

6 Sentiment classification: large movie review dataset

6.1 The Bag of Words model

6.1.1 Applying the Bag of Words model to Movie Reviews

6.1.2 Cleaning all the movie reviews

6.1.3 Exploratory Data Analysis on your Bag of Words

6.2 Building a sentiment classifier using logistic regression

6.2.1 Setting up the training for your model

6.2.2 Performing the training for your model

6.3 Making predictions using your sentiment classifier

6.4 Measuring the effectiveness of your classifier

6.5 Creating the softmax-regression sentiment classifier

6.6 Submit your results to Kaggle

6.7 Summary

7 Automatically clustering data

7.1 Traversing files in TensorFlow

7.2 Extracting features from audio

7.3 K-means clustering

7.4 Audio segmentation

7.5 Clustering using a self-organizing map

7.6 Application of clustering

7.7 Summary

8 Inferring user activity from Android accelerometer data

8.1 The user activity from walking dataset

8.1.1 Creating the dataset

8.1.2 Computing jerk and extracting the feature vector

8.2 Clustering similar participants based on jerk magnitudes

8.3 Different classes of user activity for a single participant: climbing, standing, walking, talking, and working

8.4 Summary

9 Hidden Markov models

9.1 Example of a not-so-interpretable model

9.2 Markov model

9.3 Hidden Markov model

9.4 Forward algorithm

9.5 Viterbi decoding

9.6 Uses of hidden Markov models

9.6.1 Modeling a video

9.6.2 Modeling DNA

9.6.3 Modeling an image

9.7 Application of hidden Markov models

9.8 Summary

10 Part of speech tagging and word sense disambiguation

10.1 Review the HMM example: rainy or sunny and what it’s actually doing

10.2 Part-of-speech tagging

10.2.1 The big picture: training and predicting PoS with HMMs

10.2.2 Generating the ambiguity PoS tagged dataset

10.3 Algorithms for building the Hidden Markov Model for PoS disamguiation

10.3.1 Generating the emission probabilities

10.4 Running the HMM and evaluating its output

10.5 Getting more training data using the Brown corpus

10.6 Defining error bars and metrics for PoS tagging

10.7 Summary


11 A peek into autoencoders

11.1 Neural networks

11.2 Autoencoders

11.3 Batch training

11.4 Working with images

11.5 Application of autoencoders

11.6 Summary

12 Applying autoencoders: the CIFAR-10 image dataset

12.1 What is CIFAR-10

12.1.1 Evaluating your CIFAR-10 Autoencoder

12.2 Autoencoders as classifiers

12.2.1 Using the Autoencoder as a classifier via loss

12.3 De-noising autoencoders

12.4 Stacked deep autoencoders

12.5 Summary

13 Reinforcement learning

13.1 Formal Notions

13.1.1 Policy

13.1.2 Utility

13.2 Applying reinforcement learning

13.3 Implementing reinforcement learning

13.4 Exploring other applications of reinforcement learning

13.5 Summary

14 Convolutional neural networks

14.1 Drawback of neural networks

14.2 Convolutional neural networks

14.3 Preparing the image

14.3.1 Generating filters

14.3.2 Convolving using filters

14.3.3 Max pooling

14.4 Implementing a convolutional neural network in TensorFlow

14.4.1 Measuring performance

14.4.2 Training the classifier

14.5 Tips and tricks to improve performance

14.6 Application of convolutional neural networks

14.7 Summary

15 Building a real-world CNN: VGG-Face and VGG-Face Lite

15.1 Making a real-world CNN architecture for CIFAR-10

15.1.1 Loading and preparing the CIFAR-10 image data

15.1.2 Data augmentation

15.2 Building a deeper CNN architecture for CIFAR-10

15.2.1 CNN optimizations for increasing learned parameter resilience

15.3 Training and applying a better CIFAR-10 CNN

15.4 Testing and evaluating your CNN for CIFAR-10

15.4.1 CIFAR-10 accuracy results and ROC curves

15.4.2 Evaluating the softmax predictions per class

15.5 Building VGG-Face for Facial Recognition

15.5.1 Picking a subset of VGG-Face for training VGG-Face Lite

15.5.2 TensorFlow’s Dataset API and data augmentation

15.5.3 Creating a TensorFlow Dataset

15.5.4 Training using TensorFlow datasets

15.5.5 VGG Face lite model and training

15.5.6 Training and evaluating VGG Face lite

15.5.7 Evaluating and predicting with VGG Face lite

15.6 Summary

16 Recurrent neural networks

17 LSTMs and automatic speech recognition

18 Sequence-to-sequence models for chatbots

19 Utility landscape


Appendix A: A Installing Python

A.1 Installing TensorFlow by using Docker

A.1.1 Installing Docker on Windows

A.1.2 Installing Docker on Linux

A.1.3 Installing Docker on macOS

A.1.4 How to use Docker

A.2 Installing Matplotlib

What's inside

  • Matching your tasks to the right machine-learning or deep-learning approach
  • Visualizing algorithms with TensorBoard
  • Sharing your results with collaborators using other frameworks
  • Understanding and using neural networks
  • Reproducing and employing predictive science
  • Downloadable Jupyter Notebooks for all examples
  • Questions to test your knowledge
  • Examples use the super-stable 1.14.1 branch of TensorFlow

About the reader

Written for developers experienced with Python and algebraic concepts like vectors and matrices.

About the author

Chris Mattmann is the Deputy Chief Technology and Innovation Officer at NASA Jet Propulsion Lab, where he has been recognised as JPL's first Principal Scientist in the area of Data Science. Chris has applied TensorFlow to challenges he’s faced at NASA, including building an implementation of Google’s Show & Tell algorithm for image captioning using TensorFlow. He contributes to open source as a former Director at the Apache Software Foundation, and teaches graduate courses at USC in Content Detection and Analysis, and in Search Engines and Information Retrieval.

Nishant Shukla wrote the first edition of Machine Learning with TensorFlow.

placing your order...

Don't refresh or navigate away from the page.
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.
print book $34.99 $49.99 pBook + eBook + liveBook
includes previous edition eBook
Additional shipping charges may apply
Machine Learning with TensorFlow, Second Edition (print book) added to cart
continue shopping
go to cart

eBook $27.99 $39.99 3 formats + liveBook
includes previous edition eBook
Machine Learning with TensorFlow, Second Edition (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks