Tensorflow: intercepting, changing gradient and continuing backpropagation
Is it possible to intercept the inverse gradient from some arbitrary layer, change its values and continue unfolding back to the beginning of the network, updating the inverse gradients of all previous layers based on the changed gradient values that you specified?
I know that you can directly modify the gradients themselves before applying the update , but as far as I know it would only change the gradients of the specified layer without propagating to the gradients of the previous layers.
+3
source to share
1 answer
You should be able to create a modified custom gradient operation that does this for you using the approach described here: Tensorflow: How to replace or modify a gradient?
0
source to share