Say I compute gradients of a model parameter manually. I then want to set the model parameter gradient to this value and use an optimizer to update the model parameter. How would one go about doing that? And what if the model parameter was instead a Variable?
That is, I don’t use .backward() at any time.
I don’t want to accidentally grow my graph at every update.