Solved by albanD in post #2 
              
              
                Hi, 
This problem is not linked to pytorch itself. 
Doing numerical differentiation with finite difference (what gradcheck does) can be quite far from the truth depending on the function, which point you differentiate and the value of epsilon you use. 
The autograd in any framework you will use do t…