Tag Archives: autograd

Source code analysis for Autograd

Autograd is a convenient tool to automatically differentiate native Python and Numpy code. Let’s look at an example first:

The result is 3.2 f(x) = sqaure(x) + 1, its derivative is 2*x, so the result is correct. Function grad() actually return a ‘function object’, which is ‘grad_f’. When we… Read more »