Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Enhancing Deep Learning with Bayesian Inference
Enhancing Deep Learning with Bayesian Inference

Enhancing Deep Learning with Bayesian Inference: Create more powerful, robust deep learning systems with Bayesian deep learning in Python

By Matt Benatan , Jochem Gietema , Marian Schneider
$49.99 $34.98
Book Jun 2023 386 pages 1st Edition
eBook
$49.99 $34.98
Print
$59.99
Subscription
$15.99 Monthly
eBook
$49.99 $34.98
Print
$59.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon AI Assistant (beta) to help accelerate your learning
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now
Table of content icon View table of contents Preview book icon Preview Book

Enhancing Deep Learning with Bayesian Inference

Chapter 1
Bayesian Inference in the Age of Deep Learning

Over the last fifteen years, machine learning (ML) has gone from a relatively little-known field to a buzzword in the tech community. This is due in no small part to the impressive feats of neural networks (NNs). Once a niche underdog in the field, deep learning’s accomplishments in almost every conceivable application have resulted in a near-meteoric rise in its popularity. Its success has been so pervasive that, rather than being impressed by features afforded by deep learning, we’ve come to expect them. From applying filters in social networking apps, through to relying on Google Translate when on vacation abroad, it’s undeniable that deep learning is now well and truly embedded in the technology landscape.

But, despite all of its impressive accomplishments, and the variety of products and features it’s afforded us, deep learning has not yet surmounted its final hurdle. As sophisticated neural...

1.1 Technical requirements

All of the code for this book can be found on the GitHub repository for the book: https://github.com/PacktPublishing/Enhancing-Deep-Learning-with-Bayesian-Inference.

1.2 Wonders of the deep learning age

Over the last 10 to 15 years, we’ve seen a dramatic shift in the landscape of ML thanks to the enormous success of deep learning. Perhaps one of the most impressive feats of the universal impact of deep learning is that it has affected fields from medical imaging and manufacturing all the way through to tools for translation and content creation.

While deep learning has only seen great success over recent years, many of its core principles are already well established. Researchers have been working with neural networks for some time – in fact, one could argue that the first neural network was introduced by Frank Rosenblatt as early as 1957! This, of course, wasn’t as sophisticated as the models we have today, but it was an important component of these models: the perceptron, as shown in Figure 1.1.

PIC

Figure 1.1: Diagram of a single perceptron

The 1980s saw the introduction of many now-familiar concepts, with the introduction...

1.3 Understanding the limitations of deep learning

As we’ve seen, deep learning has achieved some remarkable feats, and it’s undeniable that it’s revolutionizing the way that we deal with data and predictive modeling. But deep learning’s short history also comprises darker tales: stories that bring with them crucial lessons for developing systems that are more robust, and, crucially, safer.

In this section, we’ll introduce a couple of key cases in which deep learning failed, and we will discuss how a Bayesian perspective could have helped to produce a better outcome.

1.3.1 Bias in deep learning systems

We’ll start with a textbook example of bias, a crucial problem faced by data-driven methods. This example centers around Amazon. Now a household name, the e-commerce company started out by revolutionizing the world of book retail, before becoming literally the one-stop shop for just about anything: from garden furniture to a new laptop, or even...

1.4 Core topics

The aim of this book is to provide you with the tools and knowledge you need to develop your own BDL solutions. To this end, while we assume some familiarity with concepts of statistical learning and deep learning, we will still provide a refresher of these fundamental concepts.

In Chapter 2, Fundamentals of Bayesian Inference, we’ll go over some of the key concepts from Bayesian inference, including probabilities and model uncertainty estimates. In Chapter 3, Fundamentals of Deep Learning, we’ll cover important key aspects of deep learning, including learning via backpropagation, and popular varieties of NNs. With these fundamentals covered, we’ll start to explore BDL in Chapter 4, Introducing Bayesian Deep Learning. In Chapters 5 and 6 we’ll delve deeper into BDL; we’ll first learn about principled methods, before going on to understand more practical methods for approximating Bayesian neural networks.

In Chapter ...

1.5 Setting up the work environment

To complete the practical elements of the book, you’ll need a Python 3.9 environment with the necessary prerequisites. We recommend using conda, a Python package manager specifically designed for scientific computing applications. To install conda, simply head to https://conda.io/projects/conda/en/latest/user-guide/install/index.html and follow the instructions for your operating system.

With conda installed, you can set up the conda environment that you’ll use for the book:

 
conda create -n bdl python=3.9

When you hit Enter to execute this command, you’ll be asked if you wish to continue installing the required packages; simply type y and hit Enter. conda will now proceed to install the core packages.

You can now activate your environment by typing the following:

 
conda activate bdl

You’ll now see that your shell prompt contains bdl, indicating that your conda environment is active. Now you...

1.6 Summary

In this chapter, we’ve revisited the successes of deep learning, renewing our understanding of its enormous potential, and its ubiquity within today’s technology. We’ve also explored some key examples of its shortcomings: scenarios in which deep learning has failed us, demonstrating the potential for catastrophic consequences. While BDL can’t eliminate these risks, it can allow us to build more robust ML systems that incorporate both the flexibility of deep learning and the caution of Bayesian inference.

In the next chapter, we’ll dive deeper into the latter as we cover some of the core concepts of Bayesian inference and probability, in preparation for our foray into BDL.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Gain insights into the limitations of typical neural networks
  • Acquire the skill to cultivate neural networks capable of estimating uncertainty
  • Discover how to leverage uncertainty to develop more robust machine learning systems

Description

Deep learning has an increasingly significant impact on our lives, from suggesting content to playing a key role in mission- and safety-critical applications. As the influence of these algorithms grows, so does the concern for the safety and robustness of the systems which rely on them. Simply put, typical deep learning methods do not know when they don’t know. The field of Bayesian Deep Learning contains a range of methods for approximate Bayesian inference with deep networks. These methods help to improve the robustness of deep learning systems as they tell us how confident they are in their predictions, allowing us to take more in how we incorporate model predictions within our applications. Through this book, you will be introduced to the rapidly growing field of uncertainty-aware deep learning, developing an understanding of the importance of uncertainty estimation in robust machine learning systems. You will learn about a variety of popular Bayesian Deep Learning methods, and how to implement these through practical Python examples covering a range of application scenarios. By the end of the book, you will have a good understanding of Bayesian Deep Learning and its advantages, and you will be able to develop Bayesian Deep Learning models for safer, more robust deep learning systems.

What you will learn

Understand advantages and disadvantages of Bayesian inference and deep learning Understand the fundamentals of Bayesian Neural Networks Understand the differences between key BNN implementations/approximations Understand the advantages of probabilistic DNNs in production contexts How to implement a variety of BDL methods in Python code How to apply BDL methods to real-world problems Understand how to evaluate BDL methods and choose the best method for a given task Learn how to deal with unexpected data in real-world deep learning applications

Product Details

Country selected

Publication date : Jun 30, 2023
Length 386 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803246888
Category :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon AI Assistant (beta) to help accelerate your learning
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Jun 30, 2023
Length 386 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803246888
Category :
Concepts :

Table of Contents

11 Chapters
Preface Chevron down icon Chevron up icon
1. Chapter 1: Bayesian Inference in the Age of Deep Learning Chevron down icon Chevron up icon
2. Chapter 2: Fundamentals of Bayesian Inference Chevron down icon Chevron up icon
3. Chapter 3: Fundamentals of Deep Learning Chevron down icon Chevron up icon
4. Chapter 4: Introducing Bayesian Deep Learning Chevron down icon Chevron up icon
5. Chapter 5: Principled Approaches for Bayesian Deep Learning Chevron down icon Chevron up icon
6. Chapter 6: Using the Standard Toolbox for Bayesian Deep Learning Chevron down icon Chevron up icon
7. Chapter 7: Practical Considerations for Bayesian Deep Learning Chevron down icon Chevron up icon
8. Chapter 8: Applying Bayesian Deep Learning Chevron down icon Chevron up icon
9. Chapter 9: Next Steps in Bayesian Deep Learning Chevron down icon Chevron up icon
10. Why subscribe? Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.