3 Introduction to TensorFlow, PyTorch, JAX, and Keras
This chapter covers
- The major deep learning frameworks and their relationships
- 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:
- TensorFlow (https://tensorflow.org)
- PyTorch (https://pytorch.org)
- JAX (https://jax.readthedocs.io)
Then, building on your first contact 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 starting in 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 as 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.
If you’re just getting started with deep learning, it may seem like all these frameworks have existed forever. In reality, they’re all recent, with Keras being the oldest (launched in March 2015). The ideas behind these frameworks, however, have a long history: the first paper about automatic differentiation was published in 1964 (R. E. Wengert, “A Simple Automatic Derivative Evaluation Program”).