Open
Description
I cannot understand your code for computing derivatives:
#first_derivative
first_derivative = tf.exp(cost)[0][label_index]*target_conv_layer_grad
#second_derivative
second_derivative = tf.exp(cost)[0][label_index]*target_conv_layer_grad*target_conv_layer_grad
#triple_derivative
triple_derivative = tf.exp(cost)[0][label_index]*target_conv_layer_grad*target_conv_layer_grad*target_conv_layer_grad
My questions are,
- Why did you multiply exp(cost) ?
- How the second/triple derivatives are calculated through the code? I think it should be like this:
second derivative:tf.gradient(tf.gradient(Y, A), A)
triple derivative:tf.gradient(tf.gradient(tf.gradient(Y, A), A), A)
Can you help me?
Metadata
Metadata
Assignees
Labels
No labels