Skip to main content
. 2023 Aug 28;23(17):7466. doi: 10.3390/s23177466
Algorithm 1 IMTL-G algorithm with random-weighted multi-task losses
Input: Initialized task-shared/specific parameters θsh/{θt} and learning rate η
Output:
1. for t = 1 to T do
2.   compute task scaled loss: L1,…Lt
3.   compute weight: wt~Dirichlet
4.   compute total loss: Ltotal = t=1TwtLt
5.   compute gradient of shared feature: gt = Ltotal
6.   compute unit-norm gradient ut = gt||gt||
7. end for
8. β~ = (1−Iβ,β), where I = (1,…,1), β IMTL-G
9. update task-shared parameters θsh = θshη θsh(t=1Tβ~tLt)
10. for t = 1 to T do
11.   update task-specific parameters θt = θt η θLt
12. end for