Thank you for your reply! I was wondering if in this case, different sets of gradient of model_1 would be used for optimizations. Because the backpropagation seems to come from both loss_1 and output_1 which is the input of model_2 that calculates loss_2 and input of criterion_1 that calculates loss_3. I am not sure if this will cause problem.