Solved by albanD in post #4 
              
              
                Hi, 
If you consider a function f that has n_input and n_output. And a Jacobian matrix containing all its partial derivatives J_f of size (n_output x n_input). 
Then what backpropagation (or AD whichever way you want to name it) does is to compute v^T J_f for a given v. 
If your function has a singl…