Solved by suraj.pt in post #2 
              
              
                Hello Hwarang, 
It is correct to combine loss and backpropagate it this way. Your network parameters will be updated with respect to ce_loss and dice.