This is the official code of MICCAI23 paper "Source-Free Domain Adaptation for Medical Image Segmentation via Prototype-Anchored Feature Alignment and Contrastive Learning"
26
stars
6
forks
source link
Implementation bug? It seems like the last layer is not frozen? #18
Hey, I noticed that you freeze the last layer with this line:
self.model.outc.requires_grad = False
But outc is nn.module, and according to this thread: https://discuss.pytorch.org/t/requires-grad-doesnt-propagate-to-the-parameters-of-the-module/9979/2And my experience, comparing the source with the after-pfa model, this does not freeze the last layer.