Hi there, im a newbie at pytorch.
I am running into the warning: “UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won’t be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead.”
I am not sure which tensor in my procedure is raising the warning, or what exactly is happening. I tried using .retain_grad() on several of these tensors, but that just turns them into NoneType objects. Any tips on how I can solve this problem (“if it even is a problem”)