Some of the tensorflow functions are only differentiable by some of the arguments.
I want to know if tf.pow(x, y) is differentiable by y? (I am pretty sure it is differentiable by x.)
tf.pow(x, y) is differentiable by y in tensorflow.
You can test the following scenario.
x = tf.Variable(3.0) y = tf.Variable(3.0) with tf.GradientTape() as tape: z = tf.pow(x, y) dz_dy = tape.gradient(z, y)
(x^y)*log(x) so we should get a value of
(3^3)*(log(3)) which is exactly what we see with
dz_dy.numpy() = 29.662533
Answered By – Max Feinberg