|
Algorithm 1 DualBranch-AMR |
|
Require: Labeled data , Unlabeled data , Initial model f
|
| 1: for each in do
|
| 2: {Equation (7)} |
| 3: {Equation (8)} |
| 4: end for
|
| 5: {Equations (9) and (10)} |
| 6: for each epoch in all epoch do
|
| 7: for each batch do
|
| 8: {Equation (11)} |
| 9: {Equation (12)} |
| 10: end for
|
| 11: for each unlabeled sample x in do
|
| 12: for each model m in do
|
| 13: Determine if x is stable for m {Equations (13) and (14)} |
| 14: end for
|
| 15: if both and find x stable then
|
| 16: Calculate loss L {Equations (15)–(18)} |
| 17: end if
|
| 18: end for
|
| 19: Update and using total loss L
|
| 20: end for
|