The question kind of speaks for itself, but I’ll try to explain a bit further…
As far as I understand, generally you want a Variable to have gradient if it contains some learnable parameters. However, it is possible (and can be found in some PyTorch docs code segments) that you might want the input Variables to track the gradients. Practically speaking, when might you want to do this?