Here are some of the pointers that I could think of, just to start with:


you can use torch.autograd.grad() 35 for calculating gradient for subset of nodes.  (or)


When you want to update only certain nodes, freeze the params of other nodes, do a backprop and update the weights.