Solved by ptrblck in post #2 
              
              
                Yes, that’s possible and you could directly pass the output of net2 to net1, compute the loss, and call loss.backward() to compute the gradients. 
If you don’t want to train net1, you could freeze all parameters of it via: 
for param in net1.parameters():
    param.requires_grad = False

To update t…