3 Introduction to deep learning frameworks: TensorFlow, PyTorch, JAX, and Keras

 

This chapter covers

  • A closer look at all major deep-learning frameworks and their relationship
  • An overview of how core deep learning concepts translate to code across all frameworks

This chapter is meant to give you everything you need to start doing deep learning in practice. First, you’ll get familiar with three popular deep learning frameworks that can be used with Keras:

Then, building on top of the first contact you’ve had with Keras in chapter 2, we’ll review the core components of neural networks and how they translate to Keras APIs.

By the end of this chapter, you’ll be ready to move on to practical, real-world applications – which will start with chapter 4.

3.1 A brief history of deep learning frameworks

In the real world, you’re not going to be writing low-level code from scratch like we did at the end of chapter 2. Instead, you’re going to use a framework. Besides Keras, the main deep learning frameworks today are JAX, TensorFlow, and PyTorch. This book will teach you about all four.

3.2 How these frameworks relate to each other

3.3 Introduction to TensorFlow

3.3.1 First steps with TensorFlow

3.3.2 An end-to-end example: a linear classifier in pure TensorFlow

3.3.3 What makes the TensorFlow approach unique

3.4 Introduction to PyTorch

3.4.1 First steps with PyTorch

3.4.2 An end-to-end example: a linear classifier in pure PyTorch

3.4.3 What makes the PyTorch approach unique

3.5 Introduction to JAX

3.5.1 First steps with JAX

3.5.2 Tensors in JAX

3.5.3 Random tensors

3.5.4 An end-to-end example: a linear classifier in pure JAX

3.5.5 What makes the JAX approach unique

3.6 Introduction to Keras

3.6.1 First steps with Keras