how should i compute the loss in the following situation
In one forward pass i do:
Predicted_Values_1 = Model(input1)
Predicted_Values_2 = Model(input2)

in the above the same Model is used for both inputs.
now i do:

Loss_1 = loss(Predicted_Values_1,Expected_Values_1)
Loss_2 = loss(Predicted_Values_2,Expected_Values_2)

Can i consider my total loss as sum of Loss_1 and Loss_2 and then do back-propagation for it or i should do something else?
Also, is there any cases that this way of back-propagation wont work this easily and i gotta be careful?
Thanks