crit = nn.MSELoss(reduction='sum').to(setting.device)
 ...
# Do I need to define two criterions 'crit1' and 'crit2'?
# Or just only one criterion 'crit' as below?
extra_loss += crit(A, target1.detach())
extra_loss += crit(B, target2.detach())

Any help is appreciated.