# Explicitly Define Gradient for Certain Computation

Say there is function F . which cannot be computed exactly but it’s gradient can be perfectly defined can I define function s.t I tell the autograd , how gradient should be computed instead of autograd figuring about by computation graph. So my requirement is as following,

``````function F(x) :
#cannot be computed exactly
approx = some_decent_approx_of_F(x)
return approx
``````
``````function Grad_of_F(x):
#can be computed exactly