Probabilistic Deep Learning
With Python, Keras and TensorFlow Probability
Oliver Dürr, Beate Sick, Elvis Murina
  • MEAP began June 2019
  • Publication in September 2020 (estimated)
  • ISBN 9781617296079
  • 252 pages (estimated)
  • printed in black & white

An indispensable book that lifts the lid on the probabilistic model underpinning deep learning.

Gary Bake
Probabilistic Deep Learning: With Python, Keras and TensorFlow Probability teaches the increasingly popular probabilistic approach to deep learning that allows you to tune and refine your results more quickly and accurately without as much trial-and-error testing. Emphasizing practical techniques that use the Python-based Tensorflow Probability Framework, you’ll learn to build highly-performant deep learning applications that can reliably handle the noise and uncertainty of real-world data.

About the Technology

Probabilistic deep learning models are better suited to dealing with the noise and uncertainty of real world data — a crucial factor for self-driving cars, scientific results, financial industries, and other accuracy-critical applications. By utilizing probabilistic techniques, deep learning engineers can judge how reliable their results are, and get a better understanding of how their algorithms function.

About the book

Probabilistic Deep Learning: With Python, Keras and TensorFlow Probability shows how probabilistic deep learning models gives you the tools to identify and account for uncertainty and potential errors in your results. Starting by applying the underlying maximum likelihood principle of curve fitting to deep learning, you’ll move on to using the Python-based Tensorflow Probability framework, and set up Bayesian neural networks that can state their uncertainties. Hands-on code examples and illustrative Jupyter notebooks ensure that you’re focused on the practical applications of the abstract-but-powerful concepts of probabilistic deep learning. By the time you’re done, you’ll be able to build highly-performant applications that can account for inaccuracies without constantly running, and re-running, your models.
Table of Contents detailed table of contents

Part 1: Basics of Deep Learning

1 Introduction to deep learning

1.1 A first look at probabilistic models

1.2 A first brief look at deep learning

1.2.1 A success story

1.3 Classification

1.3.1 Traditional approach to image classification

1.3.2 Deep learning approach to image classification

1.3.3 Non-probabilistic classification

1.3.4 Probabilistic classification

1.3.5 Bayesian probabilistic classification

1.4 Curve fitting

1.4.1 Non-probabilistic curve fitting

1.4.2 1.4.2 Probabilistic curve fitting

1.4.3 Bayesian probabilistic curve fitting

1.5 When to use and when not to use DL?

1.5.1 When not to use DL

1.5.2 When to use DL

1.5.3 When to use and when not to use probabilistic models?

1.6 What you’ll learn in this book

1.7 Summary

2 Network Architectures

2.1 Fully connected neural networks

2.1.1 The biology that inspired the design of artificial NNs

2.1.2 Getting started with implementing an NN

2.1.3 Using a fully connected NN to classify images

2.2 Convolutional NNs for image-like data

2.2.1 Main ideas in a CNN architecture

2.2.2 A minimal CNN for edge lovers

2.2.3 Biological inspiration for a CNN architecture

2.2.4 Building and understanding a CNN

2.3 One dimensional CNNs for ordered data

2.3.1 Format of time-ordered data

2.3.2 What’s special about ordered data?

2.3.3 Architectures for time-ordered data

2.3.4 Using CNNs for time-ordered data

2.4 Summary

3 Principles of curve fitting

3.1 “Hello world” in curve fitting

3.1.1 Fitting a linear regression model based on a loss function

3.2 Gradient descent method

3.2.1 Loss with one free model parameter

3.2.2 Loss with two free-model parameters

3.3 Special DL sauce

3.3.1 Mini-batch gradient descent

3.3.2 Using SGD variants to speed up the learning

3.3.3 Automatic differentiation

3.4 Backpropagation in DL frameworks

3.4.1 Static graph frameworks

3.4.2 Dynamic graph frameworks

3.5 Summary

Part 2: Maximum Likelihood approaches for probabilistic DL models

4 Building loss functions with the likelihood approach

4.1 Introduction to the maximum likelihood principle, the mother of all loss functions

4.2 Deriving a loss function for a classification problem

4.2.1 Binary classification problem

4.2.2 Classification problems with more than two classes

4.2.3 Relationship between NLL, cross entropy and Kulback-Leilber divergence

4.3 Deriving a loss function for regression problems

4.3.1 Using a NN without hidden layer and one output neuron for modeling a linear relationship between input and output

4.3.2 Using a NN with hidden layers to model non-linear relations between input and output

4.3.3 Using a NN with an additional output for regression tasks with non-constant variance

4.4 Summary

5 Probabilistic deep learning models with TensorFlow Probability

5.1 Evaluating and comparing different probabilistic prediction models

5.2 Introduction to Tensorflow probability (TFP)

5.3 Modeling continuous data with TFP

5.3.1 Fitting and evaluating a linear regression model with constant variance

5.3.2 Fitting and evaluating a linear regression model with a non-constant standard deviation

5.4 Modeling count data with Tensorflow probability

5.4.1 The Poisson Distribution for count data

5.4.2 Extending the Poisson distribution to a zero-inflated Poisson (ZIP) distribution

5.5 Summary

6 Probabilistic deep learning models in the wild

6.1 Flexible probability distributions in state-of-the-art DL models

6.1.1 Multinomial distribution as a flexible distribution

6.1.2 Making sense of discretized logistic mixture

6.2 Case study: Bavarian roadkills

6.3 Go with the flow, introduction to normalizing flows (NFs)

6.3.1 The principle idea of NFs

6.3.2 The change of variable technique for probabilities

6.3.3 Fitting an NF to data

6.3.4 Going deeper by chaining flows

6.3.5 Transformation between higher dimensional spaces*

6.3.6 Using networks to control flows

6.3.7 Fun with flows: Sampling faces

6.4 Summary

Part 3: Bayesian approaches for probabilistic DL models

7 Bayesian learning

7.1 What’s wrong with non-Bayesian DL: The elephant in the room

7.2 The first encounter with Bayesian Approach

7.2.1 Bayesian model: The hackers' way

7.2.2 What did we just do?

7.3 The Bayesian approach for probabilistic models

7.3.1 Training and prediction with a Bayesian model

7.3.2 A coin toss as a Hello World example for Bayesian models

7.3.3 Revisiting the Bayesian linear regression model

7.4 Summary

8 Bayesian neural networks

8.1 Bayesian neural networks (BNNs)

8.2 Variational Inference (VI) as an approximative Bayes approach

8.2.1 Looking under the hood of VI*

8.2.2 Applying VI to the toy problem*

8.3 Variational Inference with TensorFlow Probability

8.4 MC dropout as an approximate Bayes approach

8.4.1 Classical Dropout used during training

8.4.2 MC dropout used during train and test times

8.5 Case Studies

8.5.1 Regression case study on extrapolation

8.5.2 Classification case study with novel classes

8.6 Summary


Appendix A: Glossary of terms and abbreviations

What's inside

  • The maximum likelihood principle that underlies deep learning applications
  • Probabilistic DL models that can indicate the distribution of possible outcomes
  • Bayesian deep learning models that make it possible to capture the uncertainty occurring in real-world applications
  • Normalizing flows for modeling and generating complex distributions, such as images of human faces

About the reader

Aimed at a reader experienced with developing machine learning or deep learning applications.

About the authors

Oliver Dürr is professor for data science at the University of Applied Sciences in Konstanz, Germany. Beate Sick holds a chair for applied statistics at ZHAW, and works as a researcher and lecturer at the University of Zurich, and as a lecturer at ETH Zurich. Elvis Murina is a research assistant, responsible for the extensive exercises that accompany this book.

Dürr and Sick are both experts in machine learning and statistics. They have supervised numerous bachelors, masters, and PhD theses on the topic of deep learning, and planned and conducted several postgraduate and masters-level deep learning courses. All three authors have been working with deep learning methods since 2013 and have extensive experience in both teaching the topic and developing probabilistic deep learning models.

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 $29.99 $49.99 pBook + eBook + liveBook
Additional shipping charges may apply
Probabilistic Deep Learning (print book) added to cart
continue shopping
go to cart

eBook $24.99 $39.99 3 formats + liveBook
Probabilistic Deep Learning (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