yaringal / multi-task-learning-example

A multi-task learning example for the paper https://arxiv.org/abs/1705.07115
MIT License
835 stars 204 forks source link

uncertainty for self-supervised learning #11

Open griffintin opened 4 years ago

griffintin commented 4 years ago

@yaringal

Thank you for your example, it helps a lot to understand the paper. I am currently use the proposed formula (exp(-log_var)*loss+log_var)) in self-supervised learning with uncertainty estimation.

In my project, the loss is L1 distance between input images pixels and warped images pixels, the loss works well along. But, when I take uncertainty into training together using the above formula, however, performance drops a lot.

I have totally no idea why. Do you have any advice? By the way, before taking L1 distance, diff = warp_pixel - input_pixel follows Gaussian distribution perfectly.

Harryoung commented 4 years ago

@griffintin hi, I think the problem maybe that in the uncertainty estimation, the loss item follows an L2 format(eg. Euclidean loss), instead of L1. So, maybe you can try out L2 loss, which makes the likelihood function reasonable. Here I have another question @yaringal . In a case where the loss does not follow Euclidean loss for regression or cross entropy loss for classification, can we use this adaptive loss weights based on uncertainty? In my objection detection project, the loss for location is 1 - IoU, where the IoU is not regressed by the model directly, but derived by the regressed corner coordinates and ground truth. So, it seems that I can not simply replace the loss_{loc} with exp(-log_{\sigma})*loss_{loc}+log_{\sigma}. What do you think about this problem? Maybe I can forget the 1 - IoU and turn to use L2 loss of coordinates? Or there is some transformation to handle it?