multi-task-learning-example icon indicating copy to clipboard operation
multi-task-learning-example copied to clipboard

MergeLoss with regular item is \log_{sigma} in paper but \log_{sigma}^2 in code

Open songzeballboy opened this issue 5 years ago • 3 comments

songzeballboy avatar Feb 25 '19 08:02 songzeballboy

I see that as well, should it not be ( precision**2 )/ 2 instead of just precision?

JadTawil-theonly avatar Oct 06 '19 00:10 JadTawil-theonly

So, what is the correct? Did you try them?

antgr avatar Oct 15 '19 16:10 antgr

if ‘precision = K.exp(-log_var[0])’,then the network learning $\log{\sigma}^2$,'precision * (y_true - y_pred)**2. + log_var[0]' is $\frac{1}{\sigma ^ 2} L(w) + 2 * \log{\sigma}$;

if ‘precision = K.exp(-log_var[0]) ** 2 / 2’,then the network learning $\log{\sigma}$,'precision * (y_true - y_pred)**2. + log_var[0]' is $\frac{1}{2 * \sigma ^ 2} L(w) + \log{\sigma}$;

The difference between the two is the coefficient 2,for network training ,they are the same.

knighthappy avatar Oct 29 '19 07:10 knighthappy