mattpoggi / mono-uncertainty

CVPR 2020 - On the uncertainty of self-supervised monocular depth estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to deal with the negative loss?

Mrils opened this issue · comments

commented

Hi!
When I try to increase the uncertainty part (described as the log section in your paper) in the network, the loss changed to negative.
Is this normal? How did you solve it?

I think it's fine, as log(x) can always have a negative value when x < 1.

commented

So what is the direction of network optimization?
Minimize the absolute value of network loss?

Hi @Mrils
that's correct. The optimization process pushes the denominator in Eq. 12,13 to be high, thus avoiding both the second term and the total loss to reach -infinite.

commented

So will the loss stabilize around a negative value after some epochs?

Correct. In our experiments, this occurred quite early

commented

Got it! Thank you

Dear Mrils, I have trouble writing the loss function when reproduction the training, could you share me the loss function codes and I would be very grateful to you!