HiLab-git / SSL4MIS

Semi Supervised Learning for Medical Image Segmentation, a collection of literature reviews and code implementations.
MIT License
2.19k stars 387 forks source link

The difference between the code and the official implementation of mean teacher #17

Closed tea321000 closed 3 years ago

tea321000 commented 3 years ago

Hi Xiangde,

I checked the official implementation of mean teacher and found that consistency loss is calculated on the samples in the entire batch, not just unlabeled samples.

cons_logit is assigned from logit1 or logit2 according to different settings of args.logit_distance_cost, and they are calculated through different fully connected layers to loosen the link between the classification prediction and the consistency cost.

I was wondering if my understanding of the code is biased, or if there is a bug in the implementation.

Sincerely, tea

Luoxd1996 commented 3 years ago

Hi, It's just my implementation, but in my experiments, I found that our implementation can achieve better results, you can implement or adapt the official implementation for your own tasks. Best, Xiangde.

tea321000 commented 3 years ago

Got it. Thanks for your quick reply.