title: How can i process multi loss in pytorch?
body: <p><a href="https://i.stack.imgur.com/yBrXW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yBrXW.png" alt="enter image description here"></a></p>
  
  <p>Such as this, I want to using some auxiliary loss to promoting my model performance.<br/>
  Which type code can implement it in pytorch?</p>
  
  <pre><code>#one
  loss1.backward()
  loss2.backward()
  loss3.backward()
  optimizer.step()
  #two
  loss1.backward()
  optimizer.step() 
  loss2.backward()
  optimizer.step() 
  loss3.backward()
  optimizer.step()   
  #three
  loss = loss1+loss2+loss3
  loss.backward()
  optimizer.step()
  </code></pre>
  
  <p>Thanks for your answer!</p>