median-research-group / LibMTL

A PyTorch Library for Multi-Task Learning
MIT License
1.94k stars 181 forks source link

question about uw #40

Closed WBS-123 closed 1 year ago

WBS-123 commented 1 year ago

In the uw original paper, the objective function is: image and according to the paper, 截屏2023-05-16 15 53 12 the second item 截屏2023-05-16 16 12 34 is diffirent with first item 截屏2023-05-16 16 13 44 in denominators. But in you code, loss = (losses/(2*self.loss_scale.exp())+self.loss_scale/2).sum(), without distinction between the denominators of these two. Is that correct?

Baijiong-Lin commented 1 year ago

The implementation in our code is according to Eq. (7) in the original paper, which is quite general since it just needs an assumption that each task output follows a Gaussian distribution and it does not need to know what type of loss function for each task. In some cases, you can deduce it again according to the loss functions you use (like Eq. (10) in the original UW paper).

Baijiong-Lin commented 1 year ago

Closed as no further updates.