To my knowledge, the autograd.backward() function is used to determine the gradient of the loss with respect to the output of the network, which ultimately gets propagated back through the network via chain rule.
Is it possible to manually set the initial gradient (gradient of loss w.r.t. output), and use the backward() function to propagate this artificial gradient back through the network to the inputs?
If so, how might I go about doing this?
This post 6 asked a similar question, but the answer claims that there is some way to set a gradient param in the backward() function. However, I do not see this in the documentation.
Thanks!