A leaf Tensor is a Tensor that does not have history. You can check it with your_tensor.is_leaf().
When calling .backward(), it will populate the .grad field of all the leaf Tensors that require gradients that were use in the computation of the output.