'Are there some efficient ways to combine two loss functions?
I am trying to optimize my model and tried several loss functions. I have three test datasets. The loss function MSE is the best in two of them, and loss function SNR is the best in another one (also SNR is not bad for the other two datasets, so does the MSE).
So I wonder if there is a way to combine the loss functions and get a global best.
loss1=(-SNR)
loss2=mse
What I've tried:
loss = loss1 + 1000*loss2
loss = loss1 + loss2/(tf.stop_gradient(loss2/loss1)+eps) (align loss2 to loss1)
loss = loss1 + mean(log(square(error))) (logarithm+logarithm)
But all of them didn't work for me. I would be very grateful if someone could give me guidance! Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
