← all repositories
HIPS/autograd

Backprop through loops, ifs, and plain NumPy

It automatically differentiates ordinary Python and NumPy code—including loops, ifs, and recursion—so you can compute gradients without a heavy framework.

7.5k stars Python ML FrameworksOther AI
autograd
Not currently ranked — collecting fresh signals.
star history

What it does Autograd wraps NumPy to compute exact derivatives of native Python functions. It supports both reverse-mode (backpropagation) and forward-mode differentiation, and the two can be composed arbitrarily. The main goal is gradient-based optimization, and it will happily differentiate through loops, conditionals, recursion, and closures.

The interesting bit Rather than restricting you to a static tensor API, Autograd differentiates native Python as written. Dynamic control flow is treated as a first-class citizen—fluid simulations and neural Turing machines are included as examples.

Key highlights

  • Supports higher-order derivatives out of the box: you can differentiate the same function repeatedly.
  • Reverse-mode and forward-mode differentiation can be mixed and matched arbitrarily.
  • Handles a large subset of Python itself, including loops, if-statements, recursion, and closures.
  • End-to-end examples cover convnets, LSTMs, Gaussian processes, and backpropagating through a fluid simulation.

Verdict Autograd suits researchers and tinkerers who want gradients for dynamic, NumPy-centric Python without adopting a heavyweight framework. If you are looking for a modern, production-grade deep-learning stack, you may find it too lightweight.

Frequently asked

What is HIPS/autograd?
It automatically differentiates ordinary Python and NumPy code—including loops, ifs, and recursion—so you can compute gradients without a heavy framework.
Is autograd open source?
Yes — HIPS/autograd is open source, released under the MIT license.
What language is autograd written in?
HIPS/autograd is primarily written in Python.
How popular is autograd?
HIPS/autograd has 7.5k stars on GitHub.
Where can I find autograd?
HIPS/autograd is on GitHub at https://github.com/HIPS/autograd.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.