I have a simple neural network and I want to modify the value of the output layer for a given input ‘I’ to the input layer.
Pytorch documentation has this tutorial which says -
"
We’ve inspected the weights and the gradients. But how about inspecting / modifying the output and grad_output of a layer?
We introduce hooks for this purpose.
"
The tutorial just says this can be done but does not show how to actually do it. Can someone please provide some code that shows how to change/set the outputs?