Introduction to JAX

PyTorch mutates tensors. TensorFlow builds graphs. JAX compiles pure functions. That last one changes how you think about deep learning.

Build 1.5 hr Python

Prerequisites: Phase 03 Lessons 01-10, basic NumPy

#Learning Objectives

  • Write pure-function neural network code using JAX's functional API (jax.numpy, jax.grad, jax.jit, jax.vmap)
  • Explain the key design difference between PyTorch's eager mutation and JAX's functional compilation model
  • Apply jit compilation and vmap vectorization to accelerate training loops compared to naive Python
  • Train a simple network in JAX and contrast the explicit state management with PyTorch's object-oriented approach
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.