mattpoggi / mono-uncertainty

CVPR 2020 - On the uncertainty of self-supervised monocular depth estimation
235 stars 24 forks source link

How to deal with the negative loss? #1

Closed Mrils closed 4 years ago

Mrils commented 4 years ago

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?

minygd commented 4 years ago

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

Mrils commented 4 years ago

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

mattpoggi commented 4 years ago

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.

Mrils commented 4 years ago

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

mattpoggi commented 4 years ago

Correct. In our experiments, this occurred quite early

Mrils commented 4 years ago

Got it! Thank you

jilner commented 4 years ago

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!