Hi,
This function allows you to get finer control of what the autograd computes even after the forward pass.
.backward() will populate all the .grad fields of leaf variables that require gradients.
autograd.grad() will compute and return the gradients of a set of specified Tensors.
You use grad for example to compute gradient to then compute gradient penalties.