Lets say I have a pytorch variable as follows
p=Variable(torch.randn(800,3),requires_grad=True)
Lets also say that I have a loss function L. But I would like to back propagate L wrt p[0] rather than with respect to p.
However, when I go ahead and execute the following statements
p.is_leaf and p[0].is_leaf, the latter is false and the former is True. But now since p[0] is not a leaf, How do I back propagate  and update p[0] ? Will p[0]=p[0].detach() work?