|
Algorithm 1 Training the proposed adaptive weighted multitask network. |
Require: Training ECG signals , validation ECG signals
Ensure: Multitask neural network model to BP estimation
-
1:
Initialize task loss’ weight ← 1/3
-
2:
Initialize multitask network weights including sharing weights and task-specific weights
-
3:
Initialize maximum iterated epochs N
-
4:
fordo
-
5:
# Training phase
-
6:
Load
-
7:
Update parameters of with loss function of Equation (4)
-
8:
# Validation phase
-
9:
Load , dividing into M batches
-
10:
Load trained and validate
-
11:
Compute mean value and standard deviation of losses of M batches
-
12:
if
then
-
13:
Compute trend of mean value of losses based on Equation (8)
-
14:
Compute trend of standard deviation of losses based on Equation (9)
-
15:
Compute task-specific weight based on Equation (10)
-
16:
end if
-
17:
end for
|