Suppose we have some function y=x^2
We can then use gradient tape to automatically calculate the gradient for us (when we provide some values of x to tensorflow
x = tf.Variable(3.0)
with tf.GradientTape() as tape:
y = x**2
dy_dx = tape.gradient(y, x)
Is there anyway I can find out what did tensorflow do to my input? For example in this case it is easy to find out the dy/dx=2x, does that mean tensorflow will multiply 2 to my input value of x and then return me 6 (which is 3*2)?
I have a very complicated function which I don't know how to differentiate so I want to find insights from tensorflow gradienttape to see how tensorflow works out the derivative using my input of x.