Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
JAX for PyTorch Users
·
Module 3
Pytrees: Structure, Manipulation, and Custom Nodes
1
Understanding JAX Pytrees: Leaves and Containers
Define what a pytree is in JAX and identify pytree leaves vs container nodes.
2
JAX Tree Utilities in Practice
Use jax.tree_util.tree_map, tree_leaves, tree_structure, and tree_flatten/unflatten in practice.
3
Transformations on Pytrees
Apply transformations like vmap and grad to functions operating on pytrees of arrays.
4
Registering Custom Pytree Nodes
Register a custom Python class as a pytree node using register_pytree_node_class.
5
Static vs. Dynamic Pytree Fields
Distinguish between static and dynamic fields when registering a custom pytree.
6
Surgical PyTree Updates with `equinox.tree_at`
Use equinox.tree_at and filter utilities to surgically update fields of a pytree.
7
Debugging Pytree Errors
Diagnose common pytree errors such as treedef mismatches and leaf-type inconsistencies.
Previous module
Core Function Transformations: jit, grad, vmap
Next module
Automatic Differentiation in Depth