Hi,
.backward() is very convenient when working with torch.nn because it does not require the user to specify which Tensors we want the gradients for (and the optimizer knows where to look for these gradients).
.grad() requires you to specify the Tensors you want the gradients for and won’t populate the .grad field.
You could re-implement one with the other but they are just slightly different APIs for different use cases.