Good evening,
I’m using at the moment for my approach two loss functions and weight them with a factor:
loss_1= loss_1_function(output, args)
loss_2= loss_2_function(output, args)



overall_loss_tensorboard = args.alpha_loss*loss_1.item() + (1-args.alpha_loss)*loss_2.item()
(args.alpha_loss*loss_1+ (1-args.alpha_loss)*loss_2).backward()


Is this the right way, how one would weight two losses and combine them?
Thanks and best regards
Jonas