concept grad attribute in category deep learning

appears as: grad attribute
Deep Learning with PyTorch

This is an excerpt from Manning's book Deep Learning with PyTorch.

Using the grad attribute

Notice the requires_grad=True argument to the tensor constructor? That argument is telling PyTorch to track the entire family tree of tensors resulting from operations on params. In other words, any tensor that will have params as an ancestor will have access to the chain of functions that were called to get from params to that tensor. In case these functions are differentiable (and most PyTorch tensor operations will be), the value of the derivative will be automatically populated as a grad attribute of the params tensor.