thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

The implementation of Debiased Mean Teacher #205

Closed PilgrimMay closed 1 year ago

PilgrimMay commented 1 year ago

In Debiased Mean Teacher, the student has clean head and pseudo head while the teacher only has clean head. However, when creating stundet and teacher, they should have the same model architecture. So, could you please provide the code for Debiased Mean Teacher. I would appreciate it a lot

thucbx99 commented 1 year ago

Figure 11 in the Appendix in our paper illustrates the idea of Debiased Mean Teacher.

image

Here is a small trick for implementation. We create the student and the teacher to both have clean head and pseudo head. However, the output from the pseudo head of the teacher model is never used. In this way, you can simply create the teacher model like Mean Teacher (line 85).