google/tangent
An open-source Python library from Google that performs ahead-of-time automatic differentiation on source code and produces readable Python derivative code.

Tangent performs automatic differentiation by analyzing Python source code ahead-of-time, unlike PyTorch which traces execution at runtime or TensorFlow which differentiates a staged data-flow graph. It generates human-readable Python code for derivatives, enabling researchers and students to read, debug, and verify the automatically-generated derivative code. The library targets a large subset of Python, works with TensorFlow and NumPy, and provides autodiff capabilities not found in other Python ML frameworks.
Frequently asked
- What is google/tangent?
- An open-source Python library from Google that performs ahead-of-time automatic differentiation on source code and produces readable Python derivative code.
- Is tangent open source?
- Yes — google/tangent is open source, released under the Apache-2.0 license.
- What language is tangent written in?
- google/tangent is primarily written in Python.
- How popular is tangent?
- google/tangent has 2.3k stars on GitHub.
- Where can I find tangent?
- google/tangent is on GitHub at https://github.com/google/tangent.